[llvm] [CodeGen] add RuntimeLibraryInfoWrapper pass to addPassesToEmitMC (PR #174682)
Wenju He via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 7 04:29:53 PST 2026
================
@@ -123,6 +124,12 @@ addPassesToGenerateCode(CodeGenTargetMachineImpl &TM, PassManagerBase &PM,
PassConfig->setDisableVerify(DisableVerify);
PM.add(PassConfig);
PM.add(&MMIWP);
+
+ const TargetOptions &Options = TM.Options;
+ PM.add(new RuntimeLibraryInfoWrapper(
----------------
wenju-he wrote:
In above backtrace TargetLibraryInfoWrapperPass instance is created implicitly because PreISelIntrinsicLoweringPass depends on TargetLibraryInfoWrapperPass: https://github.com/llvm/llvm-project/blob/17e6f51e51d36c0f784f6c400680e4aebac12d13/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp#L805C28-L805C56
Since TargetLibraryInfoWrapperPass is not created beforehand, so it is created right before adding PreISelIntrinsicLoweringPass.
I think it should be good to add both TargetLibraryInfoWrapperPass and RuntimeLibraryInfoWrapper to PM explicitly.
https://github.com/llvm/llvm-project/pull/174682
More information about the llvm-commits
mailing list