Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[memprof] Use const ref for IndexedRecord (#94114)
The type of *Iter here is "const IndexedMemProfRecord &" as defined in RecordLookupTrait. Assigning *Iter to a variable of type "const IndexedMemProfRecord &" avoids a copy, reducing the cycle and instruction counts by 1.8% and 0.2%, respectively, with "llvm-profdata show" modified to deserialize all MemProfRecords. Note that RecordLookupTrait has an internal copy of IndexedMemProfRecord, so we don't have to worry about a dangling reference to a temporary.
- Loading branch information