[PATCH] D110075: [LTO] [Legacy] Add -debug-pass-manager option to enable pass run/skip trace.

wael yehia via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 21:15:54 PDT 2021


w2yehia added inline comments.


================
Comment at: llvm/lib/LTO/LTOCodeGenerator.cpp:136
   };
+  Config.DebugPassManager = DebugPassManager;
 }
----------------
tejohnson wrote:
> Needed in ThinLTOCodeGenerator.cpp too? Looks like it is passed down from llvm-lto to there but I assume you wanted to set this via the linker? Not a legacy LTO user though, @steven_wu may have more thoughts.
Yep, I intend to pass this option via the linker. Sorry for keep forgetting about thinLTO; we don't use it yet.

If we are to add processing of the DebugPassManager cl::opt to ThinLTOCodeGenerator then we'll have to remove it from llvm-lto, and remove the DebugPassManager parameter from a bunch of static functions in ThinLTOCodeGenerator.cpp.

@fhahn FYI, since you added that code.


================
Comment at: llvm/tools/llvm-lto2/llvm-lto2.cpp:172
+namespace llvm {
+  extern cl::opt<bool> DebugPassManager;
+}
----------------
tejohnson wrote:
> It seems a little odd to have the new LTO tool rely on an option in the legacy LTO. Maybe the def should be moved to LTO.cpp which is the new LTO and which the legacy LTO is gradually starting to use?
Moving the option's def to LTO.cpp makes sense.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110075/new/

https://reviews.llvm.org/D110075



More information about the llvm-commits mailing list