[llvm-commits] [llvm] r117316 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Devang Patel
dpatel at apple.com
Mon Oct 25 14:31:47 PDT 2010
Author: dpatel
Date: Mon Oct 25 16:31:46 2010
New Revision: 117316
URL: http://llvm.org/viewvc/llvm-project?rev=117316&view=rev
Log:
Simplify.
Do not count use of sdisel for single call instruction.
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=117316&r1=117315&r2=117316&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Mon Oct 25 16:31:46 2010
@@ -287,7 +287,7 @@
bool TryToFoldFastISelLoad(const LoadInst *LI, FastISel *FastIS);
void FinishBasicBlock();
- bool SelectBasicBlock(BasicBlock::const_iterator Begin,
+ void SelectBasicBlock(BasicBlock::const_iterator Begin,
BasicBlock::const_iterator End,
bool &HadTailCall);
void CodeGenAndEmitDAG();
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=117316&r1=117315&r2=117316&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Oct 25 16:31:46 2010
@@ -376,7 +376,7 @@
return true;
}
-bool
+void
SelectionDAGISel::SelectBasicBlock(BasicBlock::const_iterator Begin,
BasicBlock::const_iterator End,
bool &HadTailCall) {
@@ -393,7 +393,7 @@
// Final step, emit the lowered DAG as machine code.
CodeGenAndEmitDAG();
- return Begin != End;
+ return;
}
void SelectionDAGISel::ComputeLiveOutVRegInfo() {
@@ -783,7 +783,6 @@
// Iterate over all basic blocks in the function.
for (Function::const_iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) {
- bool BBSelectedUsingDAG = false;
const BasicBlock *LLVMBB = &*I;
#ifndef NDEBUG
CheckLineNumbers(LLVMBB);
@@ -872,7 +871,7 @@
}
bool HadTailCall = false;
- BBSelectedUsingDAG |= SelectBasicBlock(Inst, BI, HadTailCall);
+ SelectBasicBlock(Inst, BI, HadTailCall);
// If the call was emitted as a tail call, we're done with the block.
if (HadTailCall) {
@@ -902,18 +901,19 @@
FastIS->recomputeInsertPt();
}
+ if (Begin != BI)
+ ++NumDAGBlocks;
+ else
+ ++NumFastIselBlocks;
+
// Run SelectionDAG instruction selection on the remainder of the block
// not handled by FastISel. If FastISel is not run, this is the entire
// block.
bool HadTailCall;
- BBSelectedUsingDAG |= SelectBasicBlock(Begin, BI, HadTailCall);
+ SelectBasicBlock(Begin, BI, HadTailCall);
FinishBasicBlock();
FuncInfo->PHINodesToUpdate.clear();
- if (BBSelectedUsingDAG)
- ++NumDAGBlocks;
- else
- ++NumFastIselBlocks;
}
delete FastIS;
More information about the llvm-commits
mailing list