[JumpThreading] Make -print-lvi-after-jump-threading work with NPM

This commit is contained in:
Arthur Eubanks 2020-11-17 23:14:33 -08:00
parent 94e4ec6499
commit 9e3b4f4941
2 changed files with 6 additions and 0 deletions

View File

@ -352,6 +352,11 @@ PreservedAnalyses JumpThreadingPass::run(Function &F,
bool Changed = runImpl(F, &TLI, &LVI, &AA, &DTU, F.hasProfileData(), bool Changed = runImpl(F, &TLI, &LVI, &AA, &DTU, F.hasProfileData(),
std::move(BFI), std::move(BPI)); std::move(BFI), std::move(BPI));
if (PrintLVIAfterJumpThreading) {
dbgs() << "LVI for function '" << F.getName() << "':\n";
LVI.printLVI(F, DTU.getDomTree(), dbgs());
}
if (!Changed) if (!Changed)
return PreservedAnalyses::all(); return PreservedAnalyses::all();
PreservedAnalyses PA; PreservedAnalyses PA;

View File

@ -1,4 +1,5 @@
; RUN: opt < %s -jump-threading -print-lvi-after-jump-threading -disable-output 2>&1 | FileCheck %s ; RUN: opt < %s -jump-threading -print-lvi-after-jump-threading -disable-output 2>&1 | FileCheck %s
; RUN: opt < %s -passes=jump-threading -print-lvi-after-jump-threading -disable-output 2>&1 | FileCheck %s
; Testing LVI cache after jump-threading ; Testing LVI cache after jump-threading