[llvm] [MLGO] Model selection for models lowered through EmitC (PR #212650)
ioana ghiban via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 01:33:31 PDT 2026
================
@@ -368,14 +405,23 @@ class ReleaseModeEvictionAdvisorProvider final
getAdvisor(const MachineFunction &MF, const RAGreedy &RA,
MachineBlockFrequencyInfo *MBFI, MachineLoopInfo *Loops) override {
if (!Runner) {
- if (InteractiveChannelBaseName.empty())
- Runner = std::make_unique<ReleaseModeModelRunner<CompiledModelType>>(
- MF.getFunction().getContext(), InputFeatures, DecisionName);
- else
+ if (InteractiveChannelBaseName.empty()) {
+#if defined(LLVM_HAVE_EMITC_COMPILE_REGALLOC)
+ if (SelectedMLGORegAllocModel != MLGORegAllocModelChoice::Default) {
+ Runner = createMLGORegAllocModelRunner(MF.getFunction().getContext(),
----------------
ioghiban wrote:
Here and in other places:
https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements
https://github.com/llvm/llvm-project/pull/212650
More information about the llvm-commits
mailing list