[llvm-commits] [llvm] r101832 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Dan Gohman
gohman at apple.com
Mon Apr 19 16:34:15 PDT 2010
Author: djg
Date: Mon Apr 19 18:34:15 2010
New Revision: 101832
URL: http://llvm.org/viewvc/llvm-project?rev=101832&view=rev
Log:
Revert 101825, which is causing trouble.
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=101832&r1=101831&r2=101832&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Mon Apr 19 18:34:15 2010
@@ -46,6 +46,7 @@
MachineRegisterInfo *RegInfo;
SelectionDAG *CurDAG;
SelectionDAGBuilder *SDB;
+ MachineBasicBlock *BB;
AliasAnalysis *AA;
GCFunctionInfo *GFI;
CodeGenOpt::Level OptLevel;
@@ -282,14 +283,13 @@
void PrepareEHLandingPad(MachineBasicBlock *BB);
void SelectAllBasicBlocks(const Function &Fn);
- void FinishBasicBlock(MachineBasicBlock *BB);
+ void FinishBasicBlock();
- void SelectBasicBlock(MachineBasicBlock *BB,
- const BasicBlock *LLVMBB,
+ void SelectBasicBlock(const BasicBlock *LLVMBB,
BasicBlock::const_iterator Begin,
BasicBlock::const_iterator End,
bool &HadTailCall);
- void CodeGenAndEmitDAG(MachineBasicBlock *BB);
+ void CodeGenAndEmitDAG();
void LowerArguments(const BasicBlock *BB);
void ShrinkDemandedOps();
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=101832&r1=101831&r2=101832&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Apr 19 18:34:15 2010
@@ -249,8 +249,7 @@
FastIS->setCurDebugLoc(DebugLoc());
}
-void SelectionDAGISel::SelectBasicBlock(MachineBasicBlock *BB,
- const BasicBlock *LLVMBB,
+void SelectionDAGISel::SelectBasicBlock(const BasicBlock *LLVMBB,
BasicBlock::const_iterator Begin,
BasicBlock::const_iterator End,
bool &HadTailCall) {
@@ -287,7 +286,7 @@
CurDAG->setRoot(SDB->getControlRoot());
// Final step, emit the lowered DAG as machine code.
- CodeGenAndEmitDAG(BB);
+ CodeGenAndEmitDAG();
HadTailCall = SDB->HasTailCall;
SDB->clear();
}
@@ -474,7 +473,7 @@
} while (!Worklist.empty());
}
-void SelectionDAGISel::CodeGenAndEmitDAG(MachineBasicBlock *BB) {
+void SelectionDAGISel::CodeGenAndEmitDAG() {
std::string GroupName;
if (TimePassesIsEnabled)
GroupName = "Instruction Selection and Scheduling";
@@ -755,7 +754,7 @@
// Iterate over all basic blocks in the function.
for (Function::const_iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) {
const BasicBlock *LLVMBB = &*I;
- MachineBasicBlock *BB = FuncInfo->MBBMap[LLVMBB];
+ BB = FuncInfo->MBBMap[LLVMBB];
BasicBlock::const_iterator const Begin = LLVMBB->begin();
BasicBlock::const_iterator const End = LLVMBB->end();
@@ -791,7 +790,7 @@
// beginning FastISel on the entry block.
if (LLVMBB == &Fn.getEntryBlock()) {
CurDAG->setRoot(SDB->getControlRoot());
- CodeGenAndEmitDAG(BB);
+ CodeGenAndEmitDAG();
SDB->clear();
}
FastIS->startNewBlock(BB);
@@ -839,7 +838,7 @@
}
bool HadTailCall = false;
- SelectBasicBlock(BB, LLVMBB, BI, llvm::next(BI), HadTailCall);
+ SelectBasicBlock(LLVMBB, BI, llvm::next(BI), HadTailCall);
// If the call was emitted as a tail call, we're done with the block.
if (HadTailCall) {
@@ -875,17 +874,17 @@
// block.
if (BI != End) {
bool HadTailCall;
- SelectBasicBlock(BB, LLVMBB, BI, End, HadTailCall);
+ SelectBasicBlock(LLVMBB, BI, End, HadTailCall);
}
- FinishBasicBlock(BB);
+ FinishBasicBlock();
}
delete FastIS;
}
void
-SelectionDAGISel::FinishBasicBlock(MachineBasicBlock *BB) {
+SelectionDAGISel::FinishBasicBlock() {
DEBUG(dbgs() << "Target-post-processed machine code:\n");
DEBUG(BB->dump());
@@ -924,7 +923,7 @@
// Emit the code
SDB->visitBitTestHeader(SDB->BitTestCases[i], BB);
CurDAG->setRoot(SDB->getRoot());
- CodeGenAndEmitDAG(BB);
+ CodeGenAndEmitDAG();
SDB->clear();
}
@@ -945,7 +944,7 @@
CurDAG->setRoot(SDB->getRoot());
- CodeGenAndEmitDAG(BB);
+ CodeGenAndEmitDAG();
SDB->clear();
}
@@ -992,7 +991,7 @@
SDB->visitJumpTableHeader(SDB->JTCases[i].second, SDB->JTCases[i].first,
BB);
CurDAG->setRoot(SDB->getRoot());
- CodeGenAndEmitDAG(BB);
+ CodeGenAndEmitDAG();
SDB->clear();
}
@@ -1001,7 +1000,7 @@
// Emit the code
SDB->visitJumpTable(SDB->JTCases[i].second);
CurDAG->setRoot(SDB->getRoot());
- CodeGenAndEmitDAG(BB);
+ CodeGenAndEmitDAG();
SDB->clear();
// Update PHI Nodes
@@ -1049,7 +1048,7 @@
// Emit the code
SDB->visitSwitchCase(SDB->SwitchCases[i], BB);
CurDAG->setRoot(SDB->getRoot());
- CodeGenAndEmitDAG(BB);
+ CodeGenAndEmitDAG();
// Handle any PHI nodes in successors of this chunk, as if we were coming
// from the original BB before switch expansion. Note that PHI nodes can
More information about the llvm-commits
mailing list