[llvm] 777ac46 - [llvm] Remove pipeline checks for optsize for DFAJumpThreadingPass

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 11:12:17 PST 2024


Author: Paul Kirth
Date: 2024-02-28T11:12:13-08:00
New Revision: 777ac46ddbc318b5d5820d278a2e4dc2213699d8

URL: https://github.com/llvm/llvm-project/commit/777ac46ddbc318b5d5820d278a2e4dc2213699d8
DIFF: https://github.com/llvm/llvm-project/commit/777ac46ddbc318b5d5820d278a2e4dc2213699d8.diff

LOG: [llvm] Remove pipeline checks for optsize for DFAJumpThreadingPass

The pass itself checks whether to apply the optimization based on the
minsize attribute, so there isn't much functional benefit to preventing
the pass from being added. Gating the pass gets added to the pass
pipeline complicates the interaction with -enable-dfa-jump-thread, as
well.

Reviewers: aeubanks

Reviewed By: aeubanks

Pull Request: https://github.com/llvm/llvm-project/pull/83318

Added: 
    

Modified: 
    llvm/lib/Passes/PassBuilderPipelines.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp
index 142bd50b3798e0..991c3ac8f7446c 100644
--- a/llvm/lib/Passes/PassBuilderPipelines.cpp
+++ b/llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -707,7 +707,7 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level,
 
   // Re-consider control flow based optimizations after redundancy elimination,
   // redo DCE, etc.
-  if (EnableDFAJumpThreading && Level.getSizeLevel() == 0)
+  if (EnableDFAJumpThreading)
     FPM.addPass(DFAJumpThreadingPass());
 
   FPM.addPass(JumpThreadingPass());


        


More information about the llvm-commits mailing list