[llvm] [ProfileData] Add a variant of getValueProfDataFromInst (PR #95993)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 18 22:53:11 PDT 2024
================
@@ -1381,6 +1381,45 @@ getValueProfDataFromInst(const Instruction &Inst, InstrProfValueKind ValueKind,
return ValueDataArray;
}
+SmallVector<InstrProfValueData, 4>
+getValueProfDataFromInst(const Instruction &Inst, InstrProfValueKind ValueKind,
+ uint32_t MaxNumValueData, uint64_t &TotalC,
+ bool GetNoICPValue) {
+ // Running a large application, namely clang, results in at most 4 elements
+ // here. Make all of them inline as 4 is reasonably small.
+ SmallVector<InstrProfValueData, 4> ValueData;
----------------
minglotus-6 wrote:
This should be the case for other applications [if default parameter is used](https://github.com/llvm/llvm-project/pull/95993#discussion_r1645427912) for iFDO.
SampleFDO uses a different arg name with same default value (https://github.com/llvm/llvm-project/blob/3c8f3b91d898cb3f76e1e430da98972cdf8a4a1c/llvm/lib/Transforms/IPO/SampleProfile.cpp#L322) for indirect call annotation, and doesn't have mem-op.
Suggest omitting the justification or justify with default parameter since it's not clang specific.
https://github.com/llvm/llvm-project/pull/95993
More information about the llvm-commits
mailing list