mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Simplify.
Do not count use of sdisel for single call instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117316 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5258b61966
commit
df8370bd70
@ -287,7 +287,7 @@ private:
|
|||||||
bool TryToFoldFastISelLoad(const LoadInst *LI, FastISel *FastIS);
|
bool TryToFoldFastISelLoad(const LoadInst *LI, FastISel *FastIS);
|
||||||
void FinishBasicBlock();
|
void FinishBasicBlock();
|
||||||
|
|
||||||
bool SelectBasicBlock(BasicBlock::const_iterator Begin,
|
void SelectBasicBlock(BasicBlock::const_iterator Begin,
|
||||||
BasicBlock::const_iterator End,
|
BasicBlock::const_iterator End,
|
||||||
bool &HadTailCall);
|
bool &HadTailCall);
|
||||||
void CodeGenAndEmitDAG();
|
void CodeGenAndEmitDAG();
|
||||||
|
@ -376,7 +376,7 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
void
|
||||||
SelectionDAGISel::SelectBasicBlock(BasicBlock::const_iterator Begin,
|
SelectionDAGISel::SelectBasicBlock(BasicBlock::const_iterator Begin,
|
||||||
BasicBlock::const_iterator End,
|
BasicBlock::const_iterator End,
|
||||||
bool &HadTailCall) {
|
bool &HadTailCall) {
|
||||||
@ -393,7 +393,7 @@ SelectionDAGISel::SelectBasicBlock(BasicBlock::const_iterator Begin,
|
|||||||
|
|
||||||
// Final step, emit the lowered DAG as machine code.
|
// Final step, emit the lowered DAG as machine code.
|
||||||
CodeGenAndEmitDAG();
|
CodeGenAndEmitDAG();
|
||||||
return Begin != End;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectionDAGISel::ComputeLiveOutVRegInfo() {
|
void SelectionDAGISel::ComputeLiveOutVRegInfo() {
|
||||||
@ -783,7 +783,6 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
|
|||||||
|
|
||||||
// Iterate over all basic blocks in the function.
|
// Iterate over all basic blocks in the function.
|
||||||
for (Function::const_iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) {
|
for (Function::const_iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) {
|
||||||
bool BBSelectedUsingDAG = false;
|
|
||||||
const BasicBlock *LLVMBB = &*I;
|
const BasicBlock *LLVMBB = &*I;
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
CheckLineNumbers(LLVMBB);
|
CheckLineNumbers(LLVMBB);
|
||||||
@ -872,7 +871,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool HadTailCall = false;
|
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 the call was emitted as a tail call, we're done with the block.
|
||||||
if (HadTailCall) {
|
if (HadTailCall) {
|
||||||
@ -902,18 +901,19 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
|
|||||||
FastIS->recomputeInsertPt();
|
FastIS->recomputeInsertPt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Begin != BI)
|
||||||
|
++NumDAGBlocks;
|
||||||
|
else
|
||||||
|
++NumFastIselBlocks;
|
||||||
|
|
||||||
// Run SelectionDAG instruction selection on the remainder of the block
|
// Run SelectionDAG instruction selection on the remainder of the block
|
||||||
// not handled by FastISel. If FastISel is not run, this is the entire
|
// not handled by FastISel. If FastISel is not run, this is the entire
|
||||||
// block.
|
// block.
|
||||||
bool HadTailCall;
|
bool HadTailCall;
|
||||||
BBSelectedUsingDAG |= SelectBasicBlock(Begin, BI, HadTailCall);
|
SelectBasicBlock(Begin, BI, HadTailCall);
|
||||||
|
|
||||||
FinishBasicBlock();
|
FinishBasicBlock();
|
||||||
FuncInfo->PHINodesToUpdate.clear();
|
FuncInfo->PHINodesToUpdate.clear();
|
||||||
if (BBSelectedUsingDAG)
|
|
||||||
++NumDAGBlocks;
|
|
||||||
else
|
|
||||||
++NumFastIselBlocks;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete FastIS;
|
delete FastIS;
|
||||||
|
Loading…
Reference in New Issue
Block a user