[StackSafety] Use ValueInfo in ParamAccess::Call
This avoid GUID lookup in Index.findSummaryInModule. Follow up for D81242. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D85269
This commit is contained in:
@@ -835,6 +835,8 @@ private:
|
||||
void parseTypeIdCompatibleVtableSummaryRecord(ArrayRef<uint64_t> Record);
|
||||
void parseTypeIdCompatibleVtableInfo(ArrayRef<uint64_t> Record, size_t &Slot,
|
||||
TypeIdCompatibleVtableInfo &TypeId);
|
||||
std::vector<FunctionSummary::ParamAccess>
|
||||
parseParamAccesses(ArrayRef<uint64_t> Record);
|
||||
|
||||
std::pair<ValueInfo, GlobalValue::GUID>
|
||||
getValueInfoFromValueId(unsigned ValueId);
|
||||
@@ -5856,8 +5858,8 @@ static void parseTypeIdSummaryRecord(ArrayRef<uint64_t> Record,
|
||||
parseWholeProgramDevirtResolution(Record, Strtab, Slot, TypeId);
|
||||
}
|
||||
|
||||
static std::vector<FunctionSummary::ParamAccess>
|
||||
parseParamAccesses(ArrayRef<uint64_t> Record) {
|
||||
std::vector<FunctionSummary::ParamAccess>
|
||||
ModuleSummaryIndexBitcodeReader::parseParamAccesses(ArrayRef<uint64_t> Record) {
|
||||
auto ReadRange = [&]() {
|
||||
APInt Lower(FunctionSummary::ParamAccess::RangeWidth,
|
||||
BitcodeReader::decodeSignRotatedValue(Record.front()));
|
||||
@@ -5883,7 +5885,7 @@ parseParamAccesses(ArrayRef<uint64_t> Record) {
|
||||
for (auto &Call : ParamAccess.Calls) {
|
||||
Call.ParamNo = Record.front();
|
||||
Record = Record.drop_front();
|
||||
Call.Callee = Record.front();
|
||||
Call.Callee = getValueInfoFromValueId(Record.front()).first;
|
||||
Record = Record.drop_front();
|
||||
Call.Offsets = ReadRange();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user