X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FStackSlotColoring.cpp;h=c6ec9f5e6cf05f111082d582bf971e5483d6c3c8;hb=ebcba612b537f45a033ccd9a60bee0c45e2e2ded;hp=24bd028afda59176be060718870afe00fa32c6dd;hpb=3f32d65912b4da23793dab618d981be2ce11c331;p=oota-llvm.git diff --git a/lib/CodeGen/StackSlotColoring.cpp b/lib/CodeGen/StackSlotColoring.cpp index 24bd028afda..c6ec9f5e6cf 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" @@ -29,10 +29,6 @@ DisableSharing("no-stack-slot-sharing", cl::init(false), cl::Hidden, cl::desc("Surpress slot sharing during stack coloring")); -static cl::opt -DeleteLimit("slot-delete-limit", cl::init(-1), cl::Hidden, - cl::desc("Stack coloring slot deletion limit")); - STATISTIC(NumEliminated, "Number of stack slots eliminated due to coloring"); namespace { @@ -156,8 +152,7 @@ StackSlotColoring::OverlapWithAssignments(LiveInterval *li, int Color) const { int StackSlotColoring::ColorSlot(LiveInterval *li) { int Color = -1; bool Share = false; - if (!DisableSharing && - (DeleteLimit == -1 || (int)NumEliminated < DeleteLimit)) { + if (!DisableSharing) { // Check if it's possible to reuse any of the used colors. Color = UsedColors.find_first(); while (Color != -1) { @@ -201,7 +196,6 @@ int StackSlotColoring::ColorSlot(LiveInterval *li) { bool StackSlotColoring::ColorSlots(MachineFunction &MF) { unsigned NumObjs = MFI->getObjectIndexEnd(); std::vector SlotMapping(NumObjs, -1); - SlotMapping.resize(NumObjs, -1); bool Changed = false; for (unsigned i = 0, e = SSIntervals.size(); i != e; ++i) {