[llvm-branch-commits] [llvm] [CodeGen][NPM] Read TargetMachine's EnableIPRA option (PR #138670)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue May 13 07:17:52 PDT 2025
================
@@ -172,6 +172,10 @@ template <typename DerivedT, typename TargetMachineT> class CodeGenPassBuilder {
// LLVMTM ctor. See TargetMachine::setGlobalISel for example.
if (Opt.EnableIPRA)
TM.Options.EnableIPRA = *Opt.EnableIPRA;
+ else {
+ // If not explicitly specified, use target default.
+ TM.Options.EnableIPRA |= TM.useIPRA();
+ }
----------------
arsenm wrote:
I think we should delete TargetMachine::useIPRA, and only use TargetOptions.EnableIPRA. That's how the target selection of globalisel and some of these other globals work already
https://github.com/llvm/llvm-project/pull/138670
More information about the llvm-branch-commits
mailing list