Skip to content

Commit 0e536ec

Browse files
author
iclsrc
committed
Merge from 'main' to 'sycl-web' (2 commits)
2 parents e33ada5 + d0ae239 commit 0e536ec

File tree

8 files changed

+42
-37
lines changed

8 files changed

+42
-37
lines changed

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3433,9 +3433,9 @@ llvm::DIType *CGDebugInfo::CreateTypeDefinition(const EnumType *Ty) {
34333433
unsigned Line = getLineNumber(ED->getLocation());
34343434
llvm::DIScope *EnumContext = getDeclContextDescriptor(ED);
34353435
llvm::DIType *ClassTy = getOrCreateType(ED->getIntegerType(), DefUnit);
3436-
return DBuilder.createEnumerationType(EnumContext, ED->getName(), DefUnit,
3437-
Line, Size, Align, EltArray, ClassTy,
3438-
Identifier, ED->isScoped());
3436+
return DBuilder.createEnumerationType(
3437+
EnumContext, ED->getName(), DefUnit, Line, Size, Align, EltArray, ClassTy,
3438+
/*RunTimeLang=*/0, Identifier, ED->isScoped());
34393439
}
34403440

34413441
llvm::DIMacro *CGDebugInfo::CreateMacro(llvm::DIMacroFile *Parent,

llvm/include/llvm/IR/DIBuilder.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ namespace llvm {
425425
/// \param OffsetInBits Member offset.
426426
/// \param Flags Flags to encode member attribute, e.g. private
427427
/// \param Elements class members.
428+
/// \param RunTimeLang Optional parameter, Objective-C runtime version.
428429
/// \param VTableHolder Debug info of the base class that contains vtable
429430
/// for this type. This is used in
430431
/// DW_AT_containing_type. See DWARF documentation
@@ -435,8 +436,8 @@ namespace llvm {
435436
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
436437
uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
437438
DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements,
438-
DIType *VTableHolder = nullptr, MDNode *TemplateParms = nullptr,
439-
StringRef UniqueIdentifier = "");
439+
unsigned RunTimeLang = 0, DIType *VTableHolder = nullptr,
440+
MDNode *TemplateParms = nullptr, StringRef UniqueIdentifier = "");
440441

441442
/// Create debugging information entry for a struct.
442443
/// \param Scope Scope in which this struct is defined.
@@ -579,13 +580,15 @@ namespace llvm {
579580
/// \param AlignInBits Member alignment.
580581
/// \param Elements Enumeration elements.
581582
/// \param UnderlyingType Underlying type of a C++11/ObjC fixed enum.
583+
/// \param RunTimeLang Optional parameter, Objective-C runtime version.
582584
/// \param UniqueIdentifier A unique identifier for the enum.
583-
/// \param IsScoped Boolean flag indicate if this is C++11/ObjC 'enum class'.
585+
/// \param IsScoped Boolean flag indicate if this is C++11/ObjC 'enum
586+
/// class'.
584587
DICompositeType *createEnumerationType(
585588
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
586589
uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
587-
DIType *UnderlyingType, StringRef UniqueIdentifier = "", bool IsScoped = false);
588-
590+
DIType *UnderlyingType, unsigned RunTimeLang = 0,
591+
StringRef UniqueIdentifier = "", bool IsScoped = false);
589592
/// Create debugging information entry for a set.
590593
/// \param Scope Scope in which this set is defined.
591594
/// \param Name Set name.

llvm/lib/IR/DIBuilder.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,14 +476,15 @@ DICompositeType *DIBuilder::createClassType(
476476
DIScope *Context, StringRef Name, DIFile *File, unsigned LineNumber,
477477
uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
478478
DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements,
479-
DIType *VTableHolder, MDNode *TemplateParams, StringRef UniqueIdentifier) {
479+
unsigned RunTimeLang, DIType *VTableHolder, MDNode *TemplateParams,
480+
StringRef UniqueIdentifier) {
480481
assert((!Context || isa<DIScope>(Context)) &&
481482
"createClassType should be called with a valid Context");
482483

483484
auto *R = DICompositeType::get(
484485
VMContext, dwarf::DW_TAG_structure_type, Name, File, LineNumber,
485486
getNonCompileUnitScope(Context), DerivedFrom, SizeInBits, AlignInBits,
486-
OffsetInBits, Flags, Elements, 0, VTableHolder,
487+
OffsetInBits, Flags, Elements, RunTimeLang, VTableHolder,
487488
cast_or_null<MDTuple>(TemplateParams), UniqueIdentifier);
488489
trackIfUnresolved(R);
489490
return R;
@@ -534,15 +535,17 @@ DISubroutineType *DIBuilder::createSubroutineType(DITypeRefArray ParameterTypes,
534535
return DISubroutineType::get(VMContext, Flags, CC, ParameterTypes);
535536
}
536537

537-
DICompositeType *DIBuilder::createEnumerationType(
538-
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
539-
uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
540-
DIType *UnderlyingType, StringRef UniqueIdentifier, bool IsScoped) {
538+
DICompositeType *
539+
DIBuilder::createEnumerationType(DIScope *Scope, StringRef Name, DIFile *File,
540+
unsigned LineNumber, uint64_t SizeInBits,
541+
uint32_t AlignInBits, DINodeArray Elements,
542+
DIType *UnderlyingType, unsigned RunTimeLang,
543+
StringRef UniqueIdentifier, bool IsScoped) {
541544
auto *CTy = DICompositeType::get(
542545
VMContext, dwarf::DW_TAG_enumeration_type, Name, File, LineNumber,
543546
getNonCompileUnitScope(Scope), UnderlyingType, SizeInBits, AlignInBits, 0,
544-
IsScoped ? DINode::FlagEnumClass : DINode::FlagZero, Elements, 0, nullptr,
545-
nullptr, UniqueIdentifier);
547+
IsScoped ? DINode::FlagEnumClass : DINode::FlagZero, Elements,
548+
RunTimeLang, nullptr, nullptr, UniqueIdentifier);
546549
AllEnumTypes.emplace_back(CTy);
547550
trackIfUnresolved(CTy);
548551
return CTy;

llvm/lib/IR/DebugInfo.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,13 +1465,12 @@ LLVMMetadataRef LLVMDIBuilderCreateClassType(LLVMDIBuilderRef Builder,
14651465
auto Elts = unwrap(Builder)->getOrCreateArray({unwrap(Elements),
14661466
NumElements});
14671467
return wrap(unwrap(Builder)->createClassType(
1468-
unwrapDI<DIScope>(Scope), {Name, NameLen},
1469-
unwrapDI<DIFile>(File), LineNumber,
1470-
SizeInBits, AlignInBits, OffsetInBits,
1471-
map_from_llvmDIFlags(Flags), unwrapDI<DIType>(DerivedFrom),
1472-
Elts, unwrapDI<DIType>(VTableHolder),
1473-
unwrapDI<MDNode>(TemplateParamsNode),
1474-
{UniqueIdentifier, UniqueIdentifierLen}));
1468+
unwrapDI<DIScope>(Scope), {Name, NameLen}, unwrapDI<DIFile>(File),
1469+
LineNumber, SizeInBits, AlignInBits, OffsetInBits,
1470+
map_from_llvmDIFlags(Flags), unwrapDI<DIType>(DerivedFrom), Elts,
1471+
/*RunTimeLang=*/0, unwrapDI<DIType>(VTableHolder),
1472+
unwrapDI<MDNode>(TemplateParamsNode),
1473+
{UniqueIdentifier, UniqueIdentifierLen}));
14751474
}
14761475

14771476
LLVMMetadataRef

llvm/test/Transforms/InstCombine/sub-of-negatible-inseltpoison.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ define void @phi_with_duplicate_incoming_basic_blocks(i32 %x, i32 %y, i1 %should
499499
; CHECK: lookup:
500500
; CHECK-NEXT: [[TO_LOOKUP:%.*]] = phi i32 [ [[Y:%.*]], [[ENTRY:%.*]] ], [ [[METAVAL_NEG:%.*]], [[LOOP]] ]
501501
; CHECK-NEXT: switch i32 [[TO_LOOKUP]], label [[END:%.*]] [
502-
; CHECK-NEXT: i32 0, label [[LOOP]]
503-
; CHECK-NEXT: i32 42, label [[LOOP]]
502+
; CHECK-NEXT: i32 0, label [[LOOP]]
503+
; CHECK-NEXT: i32 42, label [[LOOP]]
504504
; CHECK-NEXT: ]
505505
; CHECK: loop:
506506
; CHECK-NEXT: [[METAVAL_NEG]] = phi i32 [ [[X_INC_NEG]], [[LOOKUP]] ], [ [[X_INC_NEG]], [[LOOKUP]] ], [ -84, [[ENTRY]] ]

llvm/test/Transforms/InstCombine/sub-of-negatible.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,8 @@ define void @phi_with_duplicate_incoming_basic_blocks(i32 %x, i32 %y, i1 %should
523523
; CHECK: lookup:
524524
; CHECK-NEXT: [[TO_LOOKUP:%.*]] = phi i32 [ [[Y:%.*]], [[ENTRY:%.*]] ], [ [[METAVAL_NEG:%.*]], [[LOOP]] ]
525525
; CHECK-NEXT: switch i32 [[TO_LOOKUP]], label [[END:%.*]] [
526-
; CHECK-NEXT: i32 0, label [[LOOP]]
527-
; CHECK-NEXT: i32 42, label [[LOOP]]
526+
; CHECK-NEXT: i32 0, label [[LOOP]]
527+
; CHECK-NEXT: i32 42, label [[LOOP]]
528528
; CHECK-NEXT: ]
529529
; CHECK: loop:
530530
; CHECK-NEXT: [[METAVAL_NEG]] = phi i32 [ [[X_INC_NEG]], [[LOOKUP]] ], [ [[X_INC_NEG]], [[LOOKUP]] ], [ -84, [[ENTRY]] ]

llvm/test/Transforms/LoopVectorize/if-conversion-nest.ll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ define i32 @foo(ptr nocapture %A, ptr nocapture %B, i32 %n) {
1717
; CHECK-NEXT: [[TMP2:%.*]] = zext i32 [[TMP1]] to i64
1818
; CHECK-NEXT: [[TMP3:%.*]] = shl nuw nsw i64 [[TMP2]], 2
1919
; CHECK-NEXT: [[TMP4:%.*]] = add nuw nsw i64 [[TMP3]], 4
20-
; CHECK-NEXT: [[UGLYGEP:%.*]] = getelementptr i8, ptr [[A:%.*]], i64 [[TMP4]]
21-
; CHECK-NEXT: [[UGLYGEP1:%.*]] = getelementptr i8, ptr [[B:%.*]], i64 [[TMP4]]
22-
; CHECK-NEXT: [[BOUND0:%.*]] = icmp ugt ptr [[UGLYGEP1]], [[A]]
23-
; CHECK-NEXT: [[BOUND1:%.*]] = icmp ugt ptr [[UGLYGEP]], [[B]]
20+
; CHECK-NEXT: [[SCEVGEP:%.*]] = getelementptr i8, ptr [[A:%.*]], i64 [[TMP4]]
21+
; CHECK-NEXT: [[SCEVGEP1:%.*]] = getelementptr i8, ptr [[B:%.*]], i64 [[TMP4]]
22+
; CHECK-NEXT: [[BOUND0:%.*]] = icmp ugt ptr [[SCEVGEP1]], [[A]]
23+
; CHECK-NEXT: [[BOUND1:%.*]] = icmp ugt ptr [[SCEVGEP]], [[B]]
2424
; CHECK-NEXT: [[FOUND_CONFLICT:%.*]] = and i1 [[BOUND0]], [[BOUND1]]
2525
; CHECK-NEXT: br i1 [[FOUND_CONFLICT]], label [[SCALAR_PH]], label [[VECTOR_PH:%.*]]
2626
; CHECK: vector.ph:
@@ -29,9 +29,9 @@ define i32 @foo(ptr nocapture %A, ptr nocapture %B, i32 %n) {
2929
; CHECK: vector.body:
3030
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
3131
; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[INDEX]]
32-
; CHECK-NEXT: [[WIDE_LOAD:%.*]] = load <4 x i32>, ptr [[TMP5]], align 4, !alias.scope !0, !noalias !3
32+
; CHECK-NEXT: [[WIDE_LOAD:%.*]] = load <4 x i32>, ptr [[TMP5]], align 4, !alias.scope [[META0:![0-9]+]], !noalias [[META3:![0-9]+]]
3333
; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds i32, ptr [[B]], i64 [[INDEX]]
34-
; CHECK-NEXT: [[WIDE_LOAD2:%.*]] = load <4 x i32>, ptr [[TMP6]], align 4, !alias.scope !3
34+
; CHECK-NEXT: [[WIDE_LOAD2:%.*]] = load <4 x i32>, ptr [[TMP6]], align 4, !alias.scope [[META3]]
3535
; CHECK-NEXT: [[TMP7:%.*]] = icmp sgt <4 x i32> [[WIDE_LOAD]], [[WIDE_LOAD2]]
3636
; CHECK-NEXT: [[TMP8:%.*]] = icmp sgt <4 x i32> [[WIDE_LOAD]], <i32 19, i32 19, i32 19, i32 19>
3737
; CHECK-NEXT: [[TMP9:%.*]] = icmp slt <4 x i32> [[WIDE_LOAD2]], <i32 4, i32 4, i32 4, i32 4>
@@ -41,7 +41,7 @@ define i32 @foo(ptr nocapture %A, ptr nocapture %B, i32 %n) {
4141
; CHECK-NEXT: [[TMP13:%.*]] = and <4 x i1> [[TMP7]], [[TMP12]]
4242
; CHECK-NEXT: [[PREDPHI:%.*]] = select <4 x i1> [[TMP11]], <4 x i32> <i32 3, i32 3, i32 3, i32 3>, <4 x i32> <i32 9, i32 9, i32 9, i32 9>
4343
; CHECK-NEXT: [[PREDPHI3:%.*]] = select <4 x i1> [[TMP13]], <4 x i32> [[TMP10]], <4 x i32> [[PREDPHI]]
44-
; CHECK-NEXT: store <4 x i32> [[PREDPHI3]], ptr [[TMP5]], align 4, !alias.scope !0, !noalias !3
44+
; CHECK-NEXT: store <4 x i32> [[PREDPHI3]], ptr [[TMP5]], align 4, !alias.scope [[META0]], !noalias [[META3]]
4545
; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 4
4646
; CHECK-NEXT: [[TMP14:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]
4747
; CHECK-NEXT: br i1 [[TMP14]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP5:![0-9]+]]

llvm/test/Transforms/LoopVectorize/runtime-check.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ define void @test_runtime_check(ptr %a, float %b, i64 %offset, i64 %offset2, i64
133133
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], [[VECTOR_BODY]] ]
134134
; CHECK-NEXT: [[TMP5:%.*]] = getelementptr float, ptr [[A]], i64 [[INDEX]]
135135
; CHECK-NEXT: [[TMP6:%.*]] = getelementptr float, ptr [[TMP5]], i64 [[OFFSET]]
136-
; CHECK-NEXT: [[WIDE_LOAD:%.*]] = load <4 x float>, ptr [[TMP6]], align 4, !alias.scope !15, !noalias !18
136+
; CHECK-NEXT: [[WIDE_LOAD:%.*]] = load <4 x float>, ptr [[TMP6]], align 4, !alias.scope [[META15:![0-9]+]], !noalias [[META18:![0-9]+]]
137137
; CHECK-NEXT: [[TMP7:%.*]] = getelementptr float, ptr [[A]], i64 [[INDEX]]
138138
; CHECK-NEXT: [[TMP8:%.*]] = getelementptr float, ptr [[TMP7]], i64 [[OFFSET2]]
139-
; CHECK-NEXT: [[WIDE_LOAD4:%.*]] = load <4 x float>, ptr [[TMP8]], align 4, !alias.scope !18
139+
; CHECK-NEXT: [[WIDE_LOAD4:%.*]] = load <4 x float>, ptr [[TMP8]], align 4, !alias.scope [[META18]]
140140
; CHECK-NEXT: [[TMP9:%.*]] = fmul fast <4 x float> [[BROADCAST_SPLAT]], [[WIDE_LOAD4]]
141141
; CHECK-NEXT: [[TMP10:%.*]] = fadd fast <4 x float> [[WIDE_LOAD]], [[TMP9]]
142-
; CHECK-NEXT: store <4 x float> [[TMP10]], ptr [[TMP6]], align 4, !alias.scope !15, !noalias !18
142+
; CHECK-NEXT: store <4 x float> [[TMP10]], ptr [[TMP6]], align 4, !alias.scope [[META15]], !noalias [[META18]]
143143
; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 4
144144
; CHECK-NEXT: [[TMP11:%.*]] = icmp eq i64 [[INDEX_NEXT]], [[N_VEC]]
145145
; CHECK-NEXT: br i1 [[TMP11]], label [[MIDDLE_BLOCK:%.*]], label [[VECTOR_BODY]], !llvm.loop [[LOOP20:![0-9]+]]

0 commit comments

Comments
 (0)