[PATCH] D119880: [FuncSpec] Support function specialization across multiple arguments.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 03:02:08 PST 2022


labrinea added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:421
 
-      for (auto *ActualArg : ActualArgs) {
-        InstructionCost Gain =
-            ForceFunctionSpecialization
-                ? 1
-                : getSpecializationBonus(&FormalArg, ActualArg) - Cost;
+      for (auto &Entry : ActualArgs) {
+        CallBase *Call = Entry.first;
----------------
samtebbs wrote:
> The `ActualArgs` and `FormalArg` similarity is a little confusing IMO. It might be useful to call them `Arguments`/`Args` (what the values passed to a function are called) and `Parameters` respectively, as that would make the difference clear.
I think we've established the naming here: https://reviews.llvm.org/D119874 (see the definition of `ArgInfo`). Wikipedia seems to agree on this: https://en.wikipedia.org/wiki/Parameter_(computer_programming).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119880



More information about the llvm-commits mailing list