[all-commits] [llvm/llvm-project] 4ce654: [memprof] Use const ref for IndexedRecord (#94114)
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Sun Jun 2 13:30:55 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4ce65423be0ba1d90c11b6a79981d6314e1cf36d
https://github.com/llvm/llvm-project/commit/4ce65423be0ba1d90c11b6a79981d6314e1cf36d
Author: Kazu Hirata <kazu at google.com>
Date: 2024-06-02 (Sun, 02 Jun 2024)
Changed paths:
M llvm/lib/ProfileData/InstrProfReader.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list