diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2021-07-09 15:32:30 +0100 |
---|---|---|
committer | Jeremy Morse <jeremy.morse@sony.com> | 2021-07-09 15:43:13 +0100 |
commit | f551fb96c7fbe38628f049bfe0e48a6943ee341f (patch) | |
tree | 6515df9bb92fbae12934253c93f36115f8d96fc6 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | ffccf96e90d6b726188c3ddbe5142f06762567ad (diff) | |
download | llvm-f551fb96c7fbe38628f049bfe0e48a6943ee341f.zip llvm-f551fb96c7fbe38628f049bfe0e48a6943ee341f.tar.gz llvm-f551fb96c7fbe38628f049bfe0e48a6943ee341f.tar.bz2 |
[Debug-info][InstrRef] Avoid an unnecessary map ordering
We keep a record of substitutions between debug value numbers post-isel,
however we never actually look them up until the end of compilation. As a
result, there's nothing gained by the collection being a std::map. This
patch downgrades it to being a vector, that's then sorted at the end of
compilation in LiveDebugValues.
Differential Revision: https://reviews.llvm.org/D105029
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 7cb7d089..d26f581 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -973,9 +973,7 @@ void MachineFunction::makeDebugValueSubstitution(DebugInstrOperandPair A, unsigned Subreg) { // Catch any accidental self-loops. assert(A.first != B.first); - auto Result = DebugValueSubstitutions.insert({A, {B, Subreg}}); - (void)Result; - assert(Result.second && "Substitution for an already substituted value?"); + DebugValueSubstitutions.push_back({A, B, Subreg}); } void MachineFunction::substituteDebugValuesForInst(const MachineInstr &Old, |