diff options
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/LiveInterval.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/StackSlotColoring.cpp | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index 24081b99c0..0f5de9257a 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/lib/CodeGen/LiveInterval.cpp @@ -678,8 +678,8 @@ void LiveRange::dump() const { void LiveInterval::print(std::ostream &OS, const TargetRegisterInfo *TRI) const { - if (isSS) - OS << "SS#" << reg; + if (isStackSlot()) + OS << "SS#" << getStackSlotIndex(); else if (TRI && TargetRegisterInfo::isPhysicalRegister(reg)) OS << TRI->getName(reg); else diff --git a/lib/CodeGen/StackSlotColoring.cpp b/lib/CodeGen/StackSlotColoring.cpp index 24bd028afd..b6a043c0da 100644 --- a/lib/CodeGen/StackSlotColoring.cpp +++ b/lib/CodeGen/StackSlotColoring.cpp @@ -1,4 +1,4 @@ -//===-- StackSlotColoring.cpp - Sinking for machine instructions ----------===// +//===-- StackSlotColoring.cpp - Stack slot coloring pass. -----------------===// // // The LLVM Compiler Infrastructure // @@ -12,9 +12,9 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "stackcoloring" +#include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/LiveStackAnalysis.h" #include "llvm/CodeGen/MachineFrameInfo.h" -#include "llvm/CodeGen/Passes.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" @@ -201,7 +201,6 @@ int StackSlotColoring::ColorSlot(LiveInterval *li) { bool StackSlotColoring::ColorSlots(MachineFunction &MF) { unsigned NumObjs = MFI->getObjectIndexEnd(); std::vector<int> SlotMapping(NumObjs, -1); - SlotMapping.resize(NumObjs, -1); bool Changed = false; for (unsigned i = 0, e = SSIntervals.size(); i != e; ++i) { |