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

Sam Tebbs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 02:21:53 PST 2022


samtebbs 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;
----------------
labrinea wrote:
> 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).
Sure, perhaps other people would have had to look extra hard because of the double use of "Arguments" but if that is also an accepted form then that's OK.


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