[llvm-branch-commits] [llvm] 2f81917 - [JumpThreading] Remove LVI printer flag

Aiden Grossman via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Nov 26 23:36:15 PST 2023


Author: Aiden Grossman
Date: 2023-11-26T23:35:55-08:00
New Revision: 2f81917739dd7931059bb65311160a44d9404d5a

URL: https://github.com/llvm/llvm-project/commit/2f81917739dd7931059bb65311160a44d9404d5a
DIFF: https://github.com/llvm/llvm-project/commit/2f81917739dd7931059bb65311160a44d9404d5a.diff

LOG: [JumpThreading] Remove LVI printer flag

This patch removes the -print-lvi-after-jump-threading flag now that we
can print everything in the LVI cache using the print<lazy-value-info>
pass.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/JumpThreading.cpp
    llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index 59a8b8ad494566c..dfc197ec745fa2d 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -102,11 +102,6 @@ static cl::opt<unsigned> PhiDuplicateThreshold(
     cl::desc("Max PHIs in BB to duplicate for jump threading"), cl::init(76),
     cl::Hidden);
 
-static cl::opt<bool> PrintLVIAfterJumpThreading(
-    "print-lvi-after-jump-threading",
-    cl::desc("Print the LazyValueInfo cache after JumpThreading"), cl::init(false),
-    cl::Hidden);
-
 static cl::opt<bool> ThreadAcrossLoopHeaders(
     "jump-threading-across-loop-headers",
     cl::desc("Allow JumpThreading to thread across loop headers, for testing"),
@@ -257,11 +252,6 @@ PreservedAnalyses JumpThreadingPass::run(Function &F,
                   &DT, nullptr, DomTreeUpdater::UpdateStrategy::Lazy),
               std::nullopt, std::nullopt);
 
-  if (PrintLVIAfterJumpThreading) {
-    dbgs() << "LVI for function '" << F.getName() << "':\n";
-    LVI.printLVI(F, getDomTreeUpdater()->getDomTree(), dbgs());
-  }
-
   if (!Changed)
     return PreservedAnalyses::all();
 

diff  --git a/llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll b/llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll
index 418b575a186bb8f..847882febdbb0a5 100644
--- a/llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll
+++ b/llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll
@@ -1,5 +1,4 @@
-; RUN: opt < %s -passes=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
+; RUN: opt < %s -passes="jump-threading,print<lazy-value-info>" -disable-output 2>&1 | FileCheck %s
 
 ; Testing LVI cache after jump-threading
 


        


More information about the llvm-branch-commits mailing list