[PATCH] D79483: [CostModel] Replace getUserCost with getInstructionCost.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 00:57:35 PDT 2022


dmgreen added a comment.

This is mostly expected to have minimal impact on the decisions the compiler makes, right? Most of the changes are in latency, which are not used very much in heuristics.

I ran some benchmarks and (after fixing what I got wrong the first time), it looks OK.



================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:1325
       return false;
     // For a GEP, we cannot simply use getUserCost because currently it
     // optimistically assumes that a GEP will fold into addressing mode
----------------
getUserCost -> getInstructionCost


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79483



More information about the llvm-commits mailing list