[PATCH] D153036: [FuncSpec] Add Freeze and CallBase to the InstCostVisitor.
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 08:50:10 PDT 2023
labrinea added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:237
+ SmallVector<Constant *, 8> Operands;
+ Operands.reserve(I.getNumOperands());
+
----------------
This could perhaps be `I.getNumOperands() - 1` but I see no harm as is in case NumOperands == 1 (call with no parameters, operands[0] is the calledOperand). Thinking more about it I believe that's an impossible scenario since we got here (visitCallBase) becase the call must have at least one parameter, so in total at least two operands. Unless the use which brought us here is the calledOperand operand itself. Hmm, don't know. Anyhow too much thinking for such a minor detail. Ignore me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153036/new/
https://reviews.llvm.org/D153036
More information about the llvm-commits
mailing list