[PATCH] D150464: [FuncSpec] Improve the accuracy of the cost model.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 06:46:12 PDT 2023


labrinea added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:148-150
+  // Cache values before visiting.
+  UseInst = Use;
+  Const = C;
----------------
labrinea wrote:
> This is a bit ugly but I couldn't think of a better way. As I explained before the `visit` functions only take one parameter, the instruction.
Perhaps I could replace these two with ConstMap::iterator since we are inserting the {Use, C} pair on every visit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150464



More information about the llvm-commits mailing list