[PATCH] D117147: [MLGO] ML Regalloc Eviction Advisor

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 00:51:50 PST 2022


mtrofin added inline comments.


================
Comment at: llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp:484
+
+MLEvictAdvisor::MLEvictAdvisor(const MachineFunction &MF, const RAGreedy &RA,
+                               MLModelRunner *Runner,
----------------
uabelho wrote:
> Hello!
> WHen compiling current trunk, 385f5c4d33, this function seems to be unused:
> ```
> [482/2378] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/MLRegallocEvictAdvisor.cpp.o
> ../lib/CodeGen/MLRegallocEvictAdvisor.cpp:506:1: warning: '{anonymous}::MLEvictAdvisor::MLEvictAdvisor(const llvm::MachineFunction&, const llvm::RAGreedy&, llvm::MLModelRunner*, const llvm::MachineBlockFrequencyInfo&, const llvm::MachineLoopInfo&)' defined but not used [-Wunused-function]
>   506 | MLEvictAdvisor::MLEvictAdvisor(const MachineFunction &MF, const RAGreedy &RA,
>       | ^~~~~~~~~~~~~~
> ```
> Will it be used or may it be removed?
The use is under conditional compilation. If the warning is causing an issue, I can find an alternative (either wrap the def in  conditional compilation, or have a default use)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117147



More information about the llvm-commits mailing list