Skip to content
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

[JumpThreading] Remove LVI printer flag #73426

Merged

Conversation

boomanaiden154
Copy link
Contributor

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

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 26, 2023

@llvm/pr-subscribers-llvm-transforms

@llvm/pr-subscribers-llvm-analysis

Author: Aiden Grossman (boomanaiden154)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/73426.diff

2 Files Affected:

  • (modified) llvm/lib/Transforms/Scalar/JumpThreading.cpp (-10)
  • (modified) llvm/test/Analysis/LazyValueAnalysis/lvi-after-jumpthreading.ll (+1-2)
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index d7d503427ec3d20..57a80854ee2b52b 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
 

Base automatically changed from users/boomanaiden154/lazyvalueinfo-newpm-printer to main November 26, 2023 20:20
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.
@boomanaiden154 boomanaiden154 force-pushed the users/boomanaiden154/remove-post-lazyjump-lvi-print branch from 7317f70 to 2f81917 Compare November 27, 2023 07:36
Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@boomanaiden154 boomanaiden154 merged commit 5eb85c0 into main Nov 27, 2023
2 of 3 checks passed
@boomanaiden154 boomanaiden154 deleted the users/boomanaiden154/remove-post-lazyjump-lvi-print branch November 27, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants