diff options
author | Devang Patel <dpatel@apple.com> | 2010-10-25 21:31:46 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-10-25 21:31:46 +0000 |
commit | 43c3f4b63ce61daafa7055f9944319e8030633af (patch) | |
tree | c618226b1ae9e81ee8703c5fe061efa663875ba8 /llvm/lib/CodeGen/SelectionDAG | |
parent | 1f6aad053d322f2d7808a2a271e1a76ba0bac996 (diff) | |
download | bcm5719-llvm-43c3f4b63ce61daafa7055f9944319e8030633af.tar.gz bcm5719-llvm-43c3f4b63ce61daafa7055f9944319e8030633af.zip |
Simplify.
Do not count use of sdisel for single call instruction.
llvm-svn: 117316
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index a47f645907a..7b7ea2b265a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -376,7 +376,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) { return true; } -bool +void SelectionDAGISel::SelectBasicBlock(BasicBlock::const_iterator Begin, BasicBlock::const_iterator End, bool &HadTailCall) { @@ -393,7 +393,7 @@ SelectionDAGISel::SelectBasicBlock(BasicBlock::const_iterator Begin, // Final step, emit the lowered DAG as machine code. CodeGenAndEmitDAG(); - return Begin != End; + return; } void SelectionDAGISel::ComputeLiveOutVRegInfo() { @@ -783,7 +783,6 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) { // 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 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) { } 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 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) { 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; |