Port LICM to the new pass manager.
Details
Diff Detail
Event Timeline
The new LoopInvariantCodeMotion struct/class needs to live in an header in the new PM.
You also don't need to convert all the tests, just one or two of them should be enough.
Some comments.
include/llvm/Transforms/Scalar/LICM.h | ||
---|---|---|
2 | LoopSimplifyCFG.cpp -> LICM.h ? | |
42 | This comment is wrong, no? | |
lib/Transforms/Scalar/LICM.cpp | ||
154 | There's no doFinalization() helper in the new PM (but the logic should be either removed or moved to the destructor). Can you make sure this happen? I think this check is kinda important here. | |
186 | I assume TLIi is TLI? Does this code even build? | |
192 | The old PM preserves the CFG add a fix for that please. |
lib/Transforms/Scalar/LICM.cpp | ||
---|---|---|
1130–1132 | This seems to be called by the LPM in the old pass manager as a notification. I don't think there is an analog in the new PM -- does there need to be? What happens if this is not called? |
integrate comments.
lib/Transforms/Scalar/LICM.cpp | ||
---|---|---|
154 | The doFinalization performs a legality check for the caching data structure LoopToAliasSetMap. However, as the new pass manage is lack of equivalence of the following helper functions: cloneBasicBlockAnalysis As a result, LoopToAliasSetMap was not used in the new pass manager implementation. I've added a FIXME to collectAliasInfoForLoop to clarify this and remind hooking it up once available. | |
192 | Added a FIXME. | |
1130–1132 | For LICM, these helper functions are for compile time purposes: avoid recompute the AST for the inner loop when processing the outer loop. And you are right, these notifications does not exist in new PM. It would be best if we can have that in new PM. But without it, when processing the outer loop, it will just recompute the AST for the inner loop. So it will affect compile time but not generated code. | |
test/Transforms/LICM/hoist-deref-load.ll | ||
2 | Yes, it is. But I'm not sure how to specify to make it run prior to licm in the -passes= option. any ideas? |
lib/Transforms/Scalar/LICM.cpp | ||
---|---|---|
1130–1133 | Thanks for taking a look at this. If it is just a compile time optimization then it is not a big deal (unless it is a huge difference). We can introduce a similar mechanism in the new PM if this shows up in the profile. | |
test/Transforms/LICM/hoist-deref-load.ll | ||
2 | You can do loop(simplify-cfg,licm) |
oops, drafted the comments few days ago but forgot to hit "Submit"...
test/Transforms/LICM/hoist-deref-load.ll | ||
---|---|---|
2 | Unfortunately, the loop-simplifycfg pass behaviors quite differently under the new PM: opt -passes='require<domtree>,loop(simplify-cfg)' test/Transforms/LICM/hoist-deref-load.ll -S > 1 The output 1 and 2 are quite different. Am I missing something when invoking it in the new PM? |
test/Transforms/LICM/hoist-deref-load.ll | ||
---|---|---|
2 | it also depends on loop analysis and loop canonicalization (loop simplification). The later is not ported yet. So for now just add a FIXME there and proceed with your original change. |
test/Transforms/LICM/hoist-deref-load.ll | ||
---|---|---|
2 | Davide recently committed LoopSimplify in http://reviews.llvm.org/D21404 / r274959. Dehao, you should be able to add an explicit call to LoopSimplify in order to get the result you want. |
This patch adds memory leaks:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/14569/steps/check-llvm%20asan/logs/stdio
Pleas let me know if you have a fix or I can revert it.
FYI: this seems to have broken sanitizers bot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/14569
==13022==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x84b1b0 in operator new(unsigned long) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:78 #1 0x38a8df3 in collectAliasInfoForLoop /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:1105:14 #2 0x38a8df3 in (anonymous namespace)::LoopInvariantCodeMotion::runOnLoop(llvm::Loop*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo*, llvm::ScalarEvolution*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:222 #3 0x38a818d in llvm::LICMPass::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:192:13 #4 0x40f93f1 in llvm::detail::PassModel<llvm::Loop, llvm::LICMPass, llvm::PreservedAnalyses>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManagerInternal.h:72:17 #5 0x4c78ee5 in llvm::PassManager<llvm::Loop>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:255:47 #6 0x410108a in llvm::FunctionToLoopPassAdaptor<llvm::PassManager<llvm::Loop> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Analysis/LoopPassManager.h:106:39 #7 0x4100611 in llvm::detail::PassModel<llvm::Function, llvm::FunctionToLoopPassAdaptor<llvm::PassManager<llvm::Loop> >, llvm::PreservedAnalyses>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManagerInternal.h:72:17 #8 0x316c921 in llvm::PassManager<llvm::Function>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:255:47 #9 0x4092db5 in llvm::ModuleToFunctionPassAdaptor<llvm::PassManager<llvm::Function> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:900:39 #10 0x4092a01 in llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor<llvm::PassManager<llvm::Function> >, llvm::PreservedAnalyses>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManagerInternal.h:72:17 #11 0x316aff8 in llvm::PassManager<llvm::Module>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:255:47 #12 0x85311c in llvm::runPassPipeline(llvm::StringRef, llvm::LLVMContext&, llvm::Module&, llvm::TargetMachine*, llvm::tool_output_file*, llvm::StringRef, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/opt/NewPMDriver.cpp:112:7 #13 0x87e701 in main /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/opt/opt.cpp:469:12 #14 0x7effe31eaf44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44) Indirect leak of 3072 byte(s) in 1 object(s) allocated from: #0 0x84b1b0 in operator new(unsigned long) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:78 #1 0x2247e5a in allocateBuckets /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/DenseMap.h:731:37 #2 0x2247e5a in llvm::DenseMap<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*, llvm::AliasSetTracker::ASTCallbackVHDenseMapInfo, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*> >::grow(unsigned int) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/DenseMap.h:671 #3 0x2247c51 in grow /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/DenseMap.h:425:36 #4 0x2247c51 in llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*>* llvm::DenseMapBase<llvm::DenseMap<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*, llvm::AliasSetTracker::ASTCallbackVHDenseMapInfo, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*> >, llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*, llvm::AliasSetTracker::ASTCallbackVHDenseMapInfo, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*> >::InsertIntoBucketImpl<llvm::AliasSetTracker::ASTCallbackVH>(llvm::AliasSetTracker::ASTCallbackVH const&, llvm::AliasSetTracker::ASTCallbackVH const&, llvm::detail::DenseMapPair<llvm::AliasSetTracker::ASTCallbackVH, llvm::AliasSet::PointerRec*>*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/DenseMap.h:486 #5 0x22408cc in InsertIntoBucket /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/DenseMap.h:452:17 #6 0x22408cc in FindAndConstruct /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/DenseMap.h:264 #7 0x22408cc in operator[] /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/DenseMap.h:268 #8 0x22408cc in llvm::AliasSetTracker::getEntryFor(llvm::Value*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Analysis/AliasSetTracker.h:420 #9 0x223fff6 in llvm::AliasSetTracker::getAliasSetForPointer(llvm::Value*, unsigned long, llvm::AAMDNodes const&, bool*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Analysis/AliasSetTracker.cpp:272:33 #10 0x2241601 in addPointer /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Analysis/AliasSetTracker.h:430:20 #11 0x2241601 in llvm::AliasSetTracker::add(llvm::StoreInst*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Analysis/AliasSetTracker.cpp:333 #12 0x2241f61 in llvm::AliasSetTracker::add(llvm::Instruction*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Analysis/AliasSetTracker.cpp:391:12 #13 0x22421c2 in llvm::AliasSetTracker::add(llvm::BasicBlock&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Analysis/AliasSetTracker.cpp:402:5 #14 0x38a917e in operator() /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:1113:17 #15 0x38a917e in collectAliasInfoForLoop /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:1121 #16 0x38a917e in (anonymous namespace)::LoopInvariantCodeMotion::runOnLoop(llvm::Loop*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo*, llvm::ScalarEvolution*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:222 #17 0x38a818d in llvm::LICMPass::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:192:13 #18 0x40f93f1 in llvm::detail::PassModel<llvm::Loop, llvm::LICMPass, llvm::PreservedAnalyses>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManagerInternal.h:72:17 #19 0x4c78ee5 in llvm::PassManager<llvm::Loop>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:255:47 #20 0x410108a in llvm::FunctionToLoopPassAdaptor<llvm::PassManager<llvm::Loop> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Analysis/LoopPassManager.h:106:39 #21 0x4100611 in llvm::detail::PassModel<llvm::Function, llvm::FunctionToLoopPassAdaptor<llvm::PassManager<llvm::Loop> >, llvm::PreservedAnalyses>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManagerInternal.h:72:17 #22 0x316c921 in llvm::PassManager<llvm::Function>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:255:47 #23 0x4092db5 in llvm::ModuleToFunctionPassAdaptor<llvm::PassManager<llvm::Function> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:900:39 #24 0x4092a01 in llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor<llvm::PassManager<llvm::Function> >, llvm::PreservedAnalyses>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManagerInternal.h:72:17 #25 0x316aff8 in llvm::PassManager<llvm::Module>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:255:47 #26 0x85311c in llvm::runPassPipeline(llvm::StringRef, llvm::LLVMContext&, llvm::Module&, llvm::TargetMachine*, llvm::tool_output_file*, llvm::StringRef, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/opt/NewPMDriver.cpp:112:7 #27 0x87e701 in main /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/opt/opt.cpp:469:12 #28 0x7effe31eaf44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44) Indirect leak of 72 byte(s) in 1 object(s) allocated from: #0 0x84b1b0 in operator new(unsigned long) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:78 #1 0x223f6e4 in createSentinel /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/ilist.h:78:44 #2 0x223f6e4 in ensureHead /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/ilist.h:93 #3 0x223f6e4 in CreateLazySentinel /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/ilist.h:324 #4 0x223f6e4 in begin /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/ADT/ilist.h:357 #5 0x223f6e4 in begin /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Analysis/AliasSetTracker.h:407 #6 0x223f6e4 in llvm::AliasSetTracker::mergeAliasSetsForPointer(llvm::Value const*, unsigned long, llvm::AAMDNodes const&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Analysis/AliasSetTracker.cpp:218 #7 0x224006c in llvm::AliasSetTracker::getAliasSetForPointer(llvm::Value*, unsigned long, llvm::AAMDNodes const&, bool*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Analysis/AliasSetTracker.cpp:287:22 #8 0x2241601 in addPointer /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Analysis/AliasSetTracker.h:430:20 #9 0x2241601 in llvm::AliasSetTracker::add(llvm::StoreInst*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Analysis/AliasSetTracker.cpp:333 #10 0x2241f61 in llvm::AliasSetTracker::add(llvm::Instruction*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Analysis/AliasSetTracker.cpp:391:12 #11 0x22421c2 in llvm::AliasSetTracker::add(llvm::BasicBlock&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Analysis/AliasSetTracker.cpp:402:5 #12 0x38a917e in operator() /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:1113:17 #13 0x38a917e in collectAliasInfoForLoop /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:1121 #14 0x38a917e in (anonymous namespace)::LoopInvariantCodeMotion::runOnLoop(llvm::Loop*, llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo*, llvm::ScalarEvolution*) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:222 #15 0x38a818d in llvm::LICMPass::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Transforms/Scalar/LICM.cpp:192:13 #16 0x40f93f1 in llvm::detail::PassModel<llvm::Loop, llvm::LICMPass, llvm::PreservedAnalyses>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManagerInternal.h:72:17 #17 0x4c78ee5 in llvm::PassManager<llvm::Loop>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:255:47 #18 0x410108a in llvm::FunctionToLoopPassAdaptor<llvm::PassManager<llvm::Loop> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Analysis/LoopPassManager.h:106:39 #19 0x4100611 in llvm::detail::PassModel<llvm::Function, llvm::FunctionToLoopPassAdaptor<llvm::PassManager<llvm::Loop> >, llvm::PreservedAnalyses>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManagerInternal.h:72:17 #20 0x316c921 in llvm::PassManager<llvm::Function>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:255:47 #21 0x4092db5 in llvm::ModuleToFunctionPassAdaptor<llvm::PassManager<llvm::Function> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:900:39 #22 0x4092a01 in llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor<llvm::PassManager<llvm::Function> >, llvm::PreservedAnalyses>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManagerInternal.h:72:17 #23 0x316aff8 in llvm::PassManager<llvm::Module>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:255:47 #24 0x85311c in llvm::runPassPipeline(llvm::StringRef, llvm::LLVMContext&, llvm::Module&, llvm::TargetMachine*, llvm::tool_output_file*, llvm::StringRef, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/opt/NewPMDriver.cpp:112:7 #25 0x87e701 in main /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/opt/opt.cpp:469:12 #26 0x7effe31eaf44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44) SUMMARY: AddressSanitizer: 3192 byte(s) leaked in 3 allocation(s).
Tried to build clang with -DLLVM_USE_SANITIZER=Address, and verified the failing tests no longer fail with the updated patch.
LoopSimplifyCFG.cpp -> LICM.h ?