[llvm] [BOLT] add disable pass flags (PR #93032)

Rafael Auler via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 11:54:52 PDT 2024


================
@@ -416,8 +470,10 @@ Error BinaryFunctionPassManager::runAllPasses(BinaryContext &BC) {
 
   Manager.registerPass(std::make_unique<ReorderBasicBlocks>(PrintReordered));
 
-  Manager.registerPass(std::make_unique<EliminateUnreachableBlocks>(PrintUCE),
-                       opts::EliminateUnreachable);
+  if (!opts::DisableUnreachable) {
+    Manager.registerPass(std::make_unique<EliminateUnreachableBlocks>(PrintUCE),
+                         opts::EliminateUnreachable);
----------------
rafaelauler wrote:

When we pass "opts::EliminateUnreachable" here, we're telling the pass manager that this should only run if opts::EliminateUnreachable is true

https://github.com/llvm/llvm-project/pull/93032


More information about the llvm-commits mailing list