aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-06-02 13:30:32 -0700
committerGitHub <noreply@github.com>2024-06-02 13:30:32 -0700
commit4ce65423be0ba1d90c11b6a79981d6314e1cf36d (patch)
tree522aa8afa81def10aed4a49a0c8de56b5080a267 /llvm/lib/CodeGen/MachineOutliner.cpp
parentf06f0164199d4a968d8336937cd5ef2c05946d8d (diff)
downloadllvm-4ce65423be0ba1d90c11b6a79981d6314e1cf36d.zip
llvm-4ce65423be0ba1d90c11b6a79981d6314e1cf36d.tar.gz
llvm-4ce65423be0ba1d90c11b6a79981d6314e1cf36d.tar.bz2
[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.
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
0 files changed, 0 insertions, 0 deletions