Skip to content

[pull] swiftwasm-release/5.4 from swift/release/5.4 #1008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 21, 2020
108 changes: 33 additions & 75 deletions clang/test/CodeGenCXX/auto-var-init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,7 @@ TEST_UNINIT(empty, empty);
// PATTERN-O1: store i8 [[I8]], {{.*}} align 1, !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_empty_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i8 0, {{.*}} align 1
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i8 0, {{.*}} align 1, !annotation [[AUTO_INIT]]

TEST_BRACES(empty, empty);
// CHECK-LABEL: @test_empty_braces()
Expand All @@ -618,9 +616,7 @@ TEST_UNINIT(small, small);
// PATTERN-O1: store i8 [[I8]], {{.*}} align 1, !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_small_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i8 0, {{.*}} align 1
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i8 0, {{.*}} align 1, !annotation [[AUTO_INIT]]

TEST_BRACES(small, small);
// CHECK-LABEL: @test_small_braces()
Expand Down Expand Up @@ -671,10 +667,8 @@ TEST_UNINIT(smallpartinit, smallpartinit);
// PATTERN-O1: store i8 42, {{.*}} align 1
// ZERO-LABEL: @test_smallpartinit_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1-LEGACY: store i16 0, i16* %uninit, align 2
// ZERO-O1-NEWPM: store i16 0, i16* %uninit, align 2
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1-LEGACY: store i16 0, i16* %uninit, align 2, !annotation [[AUTO_INIT]]
// ZERO-O1-NEWPM: store i16 0, i16* %uninit, align 2, !annotation [[AUTO_INIT]]

TEST_BRACES(smallpartinit, smallpartinit);
// CHECK-LABEL: @test_smallpartinit_braces()
Expand Down Expand Up @@ -726,14 +720,10 @@ TEST_UNINIT(padded, padded);
// CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit)
// PATTERN-LABEL: @test_padded_uninit()
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_padded_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// PATTERN-O1: store i64 [[I64]], i64* %uninit, align 8
// FIXME: !annotation dropped by optimizations
// PATTERN-O1-NOT: !annotation
// PATTERN-O1: store i64 [[I64]], i64* %uninit, align 8, !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_padded_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}})
// ZERO-O1: store i64 0, i64* %uninit, align 8
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]

TEST_BRACES(padded, padded);
// CHECK-LABEL: @test_padded_braces()
Expand All @@ -758,15 +748,16 @@ TEST_UNINIT(paddednullinit, paddednullinit);
// CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit)
// PATTERN-LABEL: @test_paddednullinit_uninit()
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_paddednullinit_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// PATTERN-O1-LEGACY: store i64 [[I64]], i64* %uninit, align 8
// PATTERN-O1-NEWPM: store i64 [[I64]], i64* %uninit, align 8
// FIXME: !annotation dropped by optimizations
// PATTERN-O1-NOT: !annotation
// PATTERN-O1-LEGACY: store i64 [[I64]], i64* %uninit, align 8, !annotation [[AUTO_INIT]]
// PATTERN-O1-NEWPM: store i64 [[I64]], i64* %uninit, align 8, !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_paddednullinit_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,
// ZERO-O1: store i64 0, i64* %uninit, align 8
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.*}}, !annotation [[AUTO_INIT]]
// ZERO-O1-LEGACY: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]
// ZERO-O1-NEWPM: store i64 0, i64* %uninit, align 8
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1-NEWPM-NOT: !annotation
// ZERO: ret


TEST_BRACES(paddednullinit, paddednullinit);
// CHECK-LABEL: @test_paddednullinit_braces()
Expand Down Expand Up @@ -922,9 +913,7 @@ TEST_UNINIT(bitfield, bitfield);
// PATTERN-O1-NOT: !annotation
// ZERO-LABEL: @test_bitfield_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i32 0, i32* %uninit, align 4
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]

TEST_BRACES(bitfield, bitfield);
// CHECK-LABEL: @test_bitfield_braces()
Expand Down Expand Up @@ -953,9 +942,7 @@ TEST_UNINIT(bitfieldaligned, bitfieldaligned);
// PATTERN-O1-NOT: !annotation
// ZERO-LABEL: @test_bitfieldaligned_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i64 0, i64* %uninit, align 8
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]

TEST_BRACES(bitfieldaligned, bitfieldaligned);
// CHECK-LABEL: @test_bitfieldaligned_braces()
Expand Down Expand Up @@ -1007,9 +994,7 @@ TEST_UNINIT(arraytail, arraytail);
// PATTERN-O1: store i32 [[I32]], {{.*}} align 4, !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_arraytail_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i32 0, {{.*}} align 4
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i32 0, {{.*}} align 4, !annotation [[AUTO_INIT]]

TEST_BRACES(arraytail, arraytail);
// CHECK-LABEL: @test_arraytail_braces()
Expand Down Expand Up @@ -1053,9 +1038,7 @@ TEST_UNINIT(int1, int[1]);
// PATTERN-O1: store i32 [[I32]], {{.*}} align 4, !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_int1_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i32 0, {{.*}} align 4
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i32 0, {{.*}} align 4, !annotation [[AUTO_INIT]]

TEST_BRACES(int1, int[1]);
// CHECK-LABEL: @test_int1_braces()
Expand Down Expand Up @@ -1109,9 +1092,7 @@ TEST_UNINIT(bool4, bool[4]);
// PATTERN-O1-NOT: !annotation
// ZERO-LABEL: @test_bool4_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i32 0, i32* %uninit, align 4
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]

TEST_BRACES(bool4, bool[4]);
// CHECK-LABEL: @test_bool4_braces()
Expand Down Expand Up @@ -1244,7 +1225,7 @@ TEST_UNINIT(atomicnotlockfree, _Atomic(notlockfree));
// PATTERN-LABEL: @test_atomicnotlockfree_uninit()
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_atomicnotlockfree_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// PATTERN-O1: bitcast
// PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}, i8 [[I8]], i64 32
// PATTERN-O1: call void @llvm.memset{{.*}}({{.*}}, i8 [[I8]], i64 32{{.*}}
// FIXME: !annotation dropped by optimizations
// PATTERN-O1-NOT: !annotation
// ZERO-LABEL: @test_atomicnotlockfree_uninit()
Expand All @@ -1256,14 +1237,10 @@ TEST_UNINIT(atomicpadded, _Atomic(padded));
// CHECK-NEXT: call void @{{.*}}used{{.*}}%uninit)
// PATTERN-LABEL: @test_atomicpadded_uninit()
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_atomicpadded_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// PATTERN-O1: store i64 [[IPTR]], i64* %uninit, align 8
// FIXME: !annotation dropped by optimizations
// PATTERN-O1-NOT: !annotation
// PATTERN-O1: store i64 [[IPTR]], i64* %uninit, align 8, !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_atomicpadded_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i64 0, i64* %uninit, align 8
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]

TEST_UNINIT(atomictailpad, _Atomic(tailpad));
// CHECK-LABEL: @test_atomictailpad_uninit()
Expand All @@ -1273,9 +1250,7 @@ TEST_UNINIT(atomictailpad, _Atomic(tailpad));
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_atomictailpad_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_atomictailpad_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i32 0, i32* %uninit, align 4
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i32 0, i32* %uninit, align 4, !annotation [[AUTO_INIT]]

TEST_UNINIT(complexfloat, _Complex float);
// CHECK-LABEL: @test_complexfloat_uninit()
Expand All @@ -1291,9 +1266,7 @@ TEST_UNINIT(complexfloat, _Complex float);

// ZERO-LABEL: @test_complexfloat_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i64 0, i64* %uninit, align 8
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]

TEST_BRACES(complexfloat, _Complex float);
// CHECK-LABEL: @test_complexfloat_braces()
Expand Down Expand Up @@ -1372,9 +1345,7 @@ TEST_UNINIT(semivolatile, semivolatile);
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_semivolatile_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_semivolatile_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i64 0, i64* %uninit, align 8
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i64 0, i64* %uninit, align 8, !annotation [[AUTO_INIT]]

TEST_BRACES(semivolatile, semivolatile);
// CHECK-LABEL: @test_semivolatile_braces()
Expand Down Expand Up @@ -1433,8 +1404,7 @@ TEST_UNINIT(base, base);
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1-LEGACY: store i64 0, {{.*}} align 8
// ZERO-O1-NEWPM: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_ZTV4base, i64 0, inrange i32 0, i64 2) to i32 (...)**), {{.*}}, align 8
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1-NOT-NEWPM: !annotation

TEST_BRACES(base, base);
// CHECK-LABEL: @test_base_braces()
Expand All @@ -1454,10 +1424,8 @@ TEST_UNINIT(derived, derived);
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_derived_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_derived_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1-LEGACY: store i64 0, {{.*}} align 8
// ZERO-O1: store i64 0, {{.*}} align 8, !annotation [[AUTO_INIT]]
// ZERO-O1-NEWPM: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_ZTV7derived, i64 0, inrange i32 0, i64 2) to i32 (...)**), {{.*}} align 8
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation

TEST_BRACES(derived, derived);
// CHECK-LABEL: @test_derived_braces()
Expand Down Expand Up @@ -1497,9 +1465,7 @@ TEST_UNINIT(matching, matching);
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_matching_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_matching_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i32 0, {{.*}} align 4
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i32 0, {{.*}} align 4, !annotation [[AUTO_INIT]]

TEST_BRACES(matching, matching);
// CHECK-LABEL: @test_matching_braces()
Expand Down Expand Up @@ -1529,9 +1495,7 @@ TEST_UNINIT(matchingreverse, matchingreverse);
// PATTERN-O1: store float 0xFFFFFFFFE0000000, {{.+}}, !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_matchingreverse_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0,{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i32 0, {{.*}} align 4
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i32 0, {{.*}} align 4, !annotation [[AUTO_INIT]]

TEST_BRACES(matchingreverse, matchingreverse);
// CHECK-LABEL: @test_matchingreverse_braces()
Expand Down Expand Up @@ -1559,9 +1523,7 @@ TEST_UNINIT(unmatched, unmatched);
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_unmatched_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_unmatched_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i32 0, {{.*}} align 4
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i32 0, {{.*}} align 4, !annotation [[AUTO_INIT]]

TEST_BRACES(unmatched, unmatched);
// CHECK-LABEL: @test_unmatched_braces()
Expand Down Expand Up @@ -1589,9 +1551,7 @@ TEST_UNINIT(unmatchedreverse, unmatchedreverse);
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_unmatchedreverse_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_unmatchedreverse_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i32 0, {{.*}} align 4
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i32 0, {{.*}} align 4, !annotation [[AUTO_INIT]]

TEST_BRACES(unmatchedreverse, unmatchedreverse);
// CHECK-LABEL: @test_unmatchedreverse_braces()
Expand Down Expand Up @@ -1619,9 +1579,7 @@ TEST_UNINIT(unmatchedfp, unmatchedfp);
// PATTERN-O0: call void @llvm.memcpy{{.*}} @__const.test_unmatchedfp_uninit.uninit{{.+}}), !annotation [[AUTO_INIT]]
// ZERO-LABEL: @test_unmatchedfp_uninit()
// ZERO-O0: call void @llvm.memset{{.*}}, i8 0, {{.+}}), !annotation [[AUTO_INIT]]
// ZERO-O1: store i64 0, {{.*}} align 8
// FIXME: !annotation dropped by optimizations
// ZERO-O1-NOT: !annotation
// ZERO-O1: store i64 0, {{.*}} align 8, !annotation [[AUTO_INIT]]

TEST_BRACES(unmatchedfp, unmatchedfp);
// CHECK-LABEL: @test_unmatchedfp_braces()
Expand Down
61 changes: 55 additions & 6 deletions llvm/include/llvm/IR/IRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
#include "llvm-c/Types.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/ConstantFolder.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
Expand Down Expand Up @@ -91,7 +93,28 @@ class IRBuilderCallbackInserter : public IRBuilderDefaultInserter {

/// Common base class shared among various IRBuilders.
class IRBuilderBase {
DebugLoc CurDbgLocation;
/// Pairs of (metadata kind, MDNode *) that should be added to all newly
/// created instructions, like !dbg metadata.
SmallVector<std::pair<unsigned, MDNode *>, 2> MetadataToCopy;

/// Add or update the an entry (Kind, MD) to MetadataToCopy, if \p MD is not
/// null. If \p MD is null, remove the entry with \p Kind.
void AddOrRemoveMetadataToCopy(unsigned Kind, MDNode *MD) {
if (!MD) {
erase_if(MetadataToCopy, [Kind](const std::pair<unsigned, MDNode *> &KV) {
return KV.first == Kind;
});
return;
}

for (auto &KV : MetadataToCopy)
if (KV.first == Kind) {
KV.second = MD;
return;
}

MetadataToCopy.emplace_back(Kind, MD);
}

protected:
BasicBlock *BB;
Expand Down Expand Up @@ -125,7 +148,7 @@ class IRBuilderBase {
template<typename InstTy>
InstTy *Insert(InstTy *I, const Twine &Name = "") const {
Inserter.InsertHelper(I, Name, BB, InsertPt);
SetInstDebugLocation(I);
AddMetadataToInst(I);
return I;
}

Expand Down Expand Up @@ -182,16 +205,42 @@ class IRBuilderBase {
}

/// Set location information used by debugging information.
void SetCurrentDebugLocation(DebugLoc L) { CurDbgLocation = std::move(L); }
void SetCurrentDebugLocation(DebugLoc L) {
AddOrRemoveMetadataToCopy(LLVMContext::MD_dbg, L.getAsMDNode());
}

/// Collect metadata with IDs \p MetadataKinds from \p Src which should be
/// added to all created instructions. Entries present in MedataDataToCopy but
/// not on \p Src will be dropped from MetadataToCopy.
void CollectMetadataToCopy(Instruction *Src,
ArrayRef<unsigned> MetadataKinds) {
for (unsigned K : MetadataKinds)
AddOrRemoveMetadataToCopy(K, Src->getMetadata(K));
}

/// Get location information used by debugging information.
const DebugLoc &getCurrentDebugLocation() const { return CurDbgLocation; }
DebugLoc getCurrentDebugLocation() const {
for (auto &KV : MetadataToCopy)
if (KV.first == LLVMContext::MD_dbg)
return {cast<DILocation>(KV.second)};

return {};
}

/// If this builder has a current debug location, set it on the
/// specified instruction.
void SetInstDebugLocation(Instruction *I) const {
if (CurDbgLocation)
I->setDebugLoc(CurDbgLocation);
for (const auto &KV : MetadataToCopy)
if (KV.first == LLVMContext::MD_dbg) {
I->setDebugLoc(DebugLoc(KV.second));
return;
}
}

/// Add all entries in MetadataToCopy to \p I.
void AddMetadataToInst(Instruction *I) const {
for (auto &KV : MetadataToCopy)
I->setMetadata(KV.first, KV.second);
}

/// Get the return type of the current function that we're emitting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ namespace llvm {
}

/// Get location information used by debugging information.
const DebugLoc &getCurrentDebugLocation() const {
DebugLoc getCurrentDebugLocation() const {
return Builder.getCurrentDebugLocation();
}

Expand Down
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,8 @@ void PassManagerBuilder::populateModulePassManager(
// new unnamed globals.
MPM.add(createNameAnonGlobalPass());
}

MPM.add(createAnnotationRemarksLegacyPass());
return;
}

Expand Down
Loading