summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-11 00:40:36 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-02-11 00:40:36 +0000
commitc8046c02c2ca2bdf0e5e5180b8967a0946d6df96 (patch)
tree739be45503c728f5e897c27d983cd5082b53c20e /llvm/lib/CodeGen
parentf6172c2cbc6f93cdc8c2cfb74d0028d03a6ff213 (diff)
downloadbcm5719-llvm-c8046c02c2ca2bdf0e5e5180b8967a0946d6df96.tar.gz
bcm5719-llvm-c8046c02c2ca2bdf0e5e5180b8967a0946d6df96.zip
Don't read PreRegAlloc before it is initialized.
llvm-svn: 150286
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MachineLICM.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index f26635d5001..fda60563ed4 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -311,12 +311,6 @@ static bool LoopIsOuterMostWithPredecessor(MachineLoop *CurLoop) {
}
bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
- if (PreRegAlloc)
- DEBUG(dbgs() << "******** Pre-regalloc Machine LICM: ");
- else
- DEBUG(dbgs() << "******** Post-regalloc Machine LICM: ");
- DEBUG(dbgs() << MF.getFunction()->getName() << " ********\n");
-
Changed = FirstInLoop = false;
TM = &MF.getTarget();
TII = TM->getInstrInfo();
@@ -328,6 +322,12 @@ bool MachineLICM::runOnMachineFunction(MachineFunction &MF) {
PreRegAlloc = MRI->isSSA();
+ if (PreRegAlloc)
+ DEBUG(dbgs() << "******** Pre-regalloc Machine LICM: ");
+ else
+ DEBUG(dbgs() << "******** Post-regalloc Machine LICM: ");
+ DEBUG(dbgs() << MF.getFunction()->getName() << " ********\n");
+
if (PreRegAlloc) {
// Estimate register pressure during pre-regalloc pass.
unsigned NumRC = TRI->getNumRegClasses();
OpenPOWER on IntegriCloud