[llvm] r231154 - Avoid copying LiveInterval, this could lead to a double-delete
David Blaikie
dblaikie at gmail.com
Tue Mar 3 14:25:48 PST 2015
Author: dblaikie
Date: Tue Mar 3 16:25:48 2015
New Revision: 231154
URL: http://llvm.org/viewvc/llvm-project?rev=231154&view=rev
Log:
Avoid copying LiveInterval, this could lead to a double-delete
Modified:
llvm/trunk/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp?rev=231154&r1=231153&r2=231154&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp Tue Mar 3 16:25:48 2015
@@ -319,7 +319,7 @@ void A57ChainingConstraint::addInterChai
static bool regJustKilledBefore(const LiveIntervals &LIs, unsigned reg,
const MachineInstr &MI) {
- LiveInterval LI = LIs.getInterval(reg);
+ const LiveInterval &LI = LIs.getInterval(reg);
SlotIndex SI = LIs.getInstructionIndex(&MI);
return LI.expiredAt(SI);
}
More information about the llvm-commits
mailing list