Skip to content

Commit a554fe5

Browse files
committed
Merge Flang LLVM changes from release_60 to the release_70 branch.
1 parent 65ce2e5 commit a554fe5

28 files changed

+1500
-29
lines changed

include/llvm/Analysis/TargetLibraryInfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ class TargetLibraryInfoImpl {
8787
enum VectorLibrary {
8888
NoLibrary, // Don't use any vector library.
8989
Accelerate, // Use Accelerate framework.
90-
SVML // Intel short vector math library.
90+
SVML, // Intel short vector math library.
91+
PGMATH // PGI math library.
9192
};
9293

9394
TargetLibraryInfoImpl();

include/llvm/Bitcode/LLVMBitCodes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ enum MetadataCodes {
311311
METADATA_INDEX_OFFSET = 38, // [offset]
312312
METADATA_INDEX = 39, // [bitpos]
313313
METADATA_LABEL = 40, // [distinct, scope, name, file, line]
314+
METADATA_STRING_TYPE = 41, // [distinct, name, size, align, ...]
315+
METADATA_FORTRAN_ARRAY_TYPE = 42, // [distinct, name, [bounds ...], ...]
316+
METADATA_FORTRAN_SUBRANGE = 43, // [distinct, lbound, lbnde, ubound, ubnde]
314317
};
315318

316319
// The constants block (CONSTANTS_BLOCK_ID) describes emission for each

include/llvm/IR/DIBuilder.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ namespace llvm {
192192
DIBasicType *createBasicType(StringRef Name, uint64_t SizeInBits,
193193
unsigned Encoding);
194194

195+
/// Create debugging information entry for a string
196+
/// type.
197+
/// \param Name Type name.
198+
/// \param SizeInBits Size of the type.
199+
DIStringType *createStringType(StringRef Name, uint64_t SizeInBits);
200+
195201
/// Create debugging information entry for a qualified
196202
/// type, e.g. 'const int'.
197203
/// \param Tag Tag identifing type, e.g. dwarf::TAG_volatile_type
@@ -479,6 +485,14 @@ namespace llvm {
479485
DICompositeType *createArrayType(uint64_t Size, uint32_t AlignInBits,
480486
DIType *Ty, DINodeArray Subscripts);
481487

488+
/// Create debugging information entry for a Fortran array.
489+
/// \param Size Array size.
490+
/// \param AlignInBits Alignment.
491+
/// \param Ty Element type.
492+
/// \param Subscripts Subscripts.
493+
DIFortranArrayType *createFortranArrayType(
494+
uint64_t Size, uint32_t AlignInBits, DIType *Ty, DINodeArray Subs);
495+
482496
/// Create debugging information entry for a vector type.
483497
/// \param Size Array size.
484498
/// \param AlignInBits Alignment.
@@ -562,6 +576,12 @@ namespace llvm {
562576
DISubrange *getOrCreateSubrange(int64_t Lo, int64_t Count);
563577
DISubrange *getOrCreateSubrange(int64_t Lo, Metadata *CountNode);
564578

579+
/// Create a descriptor for a value range. This
580+
/// implicitly uniques the values returned.
581+
DIFortranSubrange *getOrCreateFortranSubrange(
582+
int64_t CLBound, int64_t CUBound, bool NoUBound, Metadata *Lbound,
583+
Metadata * Lbndexp, Metadata *Ubound, Metadata * Ubndexp);
584+
565585
/// Create a new descriptor for the specified variable.
566586
/// \param Context Variable scope.
567587
/// \param Name Name of the variable.

include/llvm/IR/DebugInfoFlags.def

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ HANDLE_DI_FLAG((1 << 23), TypePassByReference)
4848
HANDLE_DI_FLAG((1 << 24), FixedEnum)
4949
HANDLE_DI_FLAG((1 << 25), Thunk)
5050
HANDLE_DI_FLAG((1 << 26), Trivial)
51+
HANDLE_DI_FLAG((1 << 27), Pure)
52+
HANDLE_DI_FLAG((1 << 28), Elemental)
53+
HANDLE_DI_FLAG((1 << 29), Recursive)
5154

5255
// To avoid needing a dedicated value for IndirectVirtualBase, we use
5356
// the bitwise or of Virtual and FwdDecl, which does not otherwise
@@ -57,7 +60,7 @@ HANDLE_DI_FLAG((1 << 2) | (1 << 5), IndirectVirtualBase)
5760
#ifdef DI_FLAG_LARGEST_NEEDED
5861
// intended to be used with ADT/BitmaskEnum.h
5962
// NOTE: always must be equal to largest flag, check this when adding new flag
60-
HANDLE_DI_FLAG((1 << 26), Largest)
63+
HANDLE_DI_FLAG((1 << 29), Largest)
6164
#undef DI_FLAG_LARGEST_NEEDED
6265
#endif
6366

0 commit comments

Comments
 (0)