projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Formatting - no functional change.
[oota-llvm.git]
/
lib
/
CodeGen
/
StackSlotColoring.cpp
diff --git
a/lib/CodeGen/StackSlotColoring.cpp
b/lib/CodeGen/StackSlotColoring.cpp
index b6a043c0daea9a06d2be8c4ad9d649542a25a792..bc062835fb3e0b1da7167a9587fd47bcc3fb3ed0 100644
(file)
--- a/
lib/CodeGen/StackSlotColoring.cpp
+++ b/
lib/CodeGen/StackSlotColoring.cpp
@@
-29,10
+29,6
@@
DisableSharing("no-stack-slot-sharing",
cl::init(false), cl::Hidden,
cl::desc("Surpress slot sharing during stack coloring"));
cl::init(false), cl::Hidden,
cl::desc("Surpress slot sharing during stack coloring"));
-static cl::opt<int>
-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 {
STATISTIC(NumEliminated, "Number of stack slots eliminated due to coloring");
namespace {
@@
-66,10
+62,12
@@
namespace {
public:
static char ID; // Pass identification
public:
static char ID; // Pass identification
- StackSlotColoring() : MachineFunctionPass(
(intptr_t)
&ID), NextColor(-1) {}
+ StackSlotColoring() : MachineFunctionPass(&ID), NextColor(-1) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LiveStacks>();
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LiveStacks>();
+ AU.addPreservedID(MachineLoopInfoID);
+ AU.addPreservedID(MachineDominatorsID);
MachineFunctionPass::getAnalysisUsage(AU);
}
MachineFunctionPass::getAnalysisUsage(AU);
}
@@
-156,8
+154,7
@@
StackSlotColoring::OverlapWithAssignments(LiveInterval *li, int Color) const {
int StackSlotColoring::ColorSlot(LiveInterval *li) {
int Color = -1;
bool Share = false;
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) {
// Check if it's possible to reuse any of the used colors.
Color = UsedColors.find_first();
while (Color != -1) {
@@
-182,7
+179,7
@@
int StackSlotColoring::ColorSlot(LiveInterval *li) {
// Record the assignment.
Assignments[Color].push_back(li);
int FI = li->getStackSlotIndex();
// Record the assignment.
Assignments[Color].push_back(li);
int FI = li->getStackSlotIndex();
- DOUT << "Assigning fi
#" << FI << " to fi
#" << Color << "\n";
+ DOUT << "Assigning fi
#" << FI << " to fi
#" << Color << "\n";
// Change size and alignment of the allocated slot. If there are multiple
// objects sharing the same slot, then make sure the size and alignment
// Change size and alignment of the allocated slot. If there are multiple
// objects sharing the same slot, then make sure the size and alignment
@@
-223,7
+220,7
@@
bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
MachineInstr &MI = *MII;
for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
MachineOperand &MO = MI.getOperand(i);
MachineInstr &MI = *MII;
for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
MachineOperand &MO = MI.getOperand(i);
- if (!MO.isF
rameIndex
())
+ if (!MO.isF
I
())
continue;
int FI = MO.getIndex();
if (FI < 0)
continue;
int FI = MO.getIndex();
if (FI < 0)
@@
-238,7
+235,7
@@
bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
// Delete unused stack slots.
while (NextColor != -1) {
// Delete unused stack slots.
while (NextColor != -1) {
- DOUT << "Removing unused stack object fi
#" << NextColor << "\n";
+ DOUT << "Removing unused stack object fi#" << NextColor << "\n";
MFI->RemoveStackObject(NextColor);
NextColor = AllColors.find_next(NextColor);
}
MFI->RemoveStackObject(NextColor);
NextColor = AllColors.find_next(NextColor);
}
@@
-247,7
+244,7
@@
bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
}
bool StackSlotColoring::runOnMachineFunction(MachineFunction &MF) {
}
bool StackSlotColoring::runOnMachineFunction(MachineFunction &MF) {
- DOUT << "********
Stack Slot Coloring
********\n";
+ DOUT << "********
** Stack Slot Coloring **
********\n";
MFI = MF.getFrameInfo();
LS = &getAnalysis<LiveStacks>();
MFI = MF.getFrameInfo();
LS = &getAnalysis<LiveStacks>();