mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Sink the CopyToExportRegsIfNeeded calls out of SelectionDAGISel
into SelectionDAGBuilder. This avoids a separate pass over the instructions, and has the side effect of providing debug location information to the copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101906 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ba5be5c07b
commit
92884f7ee5
@ -618,6 +618,9 @@ void SelectionDAGBuilder::visit(const Instruction &I) {
|
||||
|
||||
visit(I.getOpcode(), I);
|
||||
|
||||
if (!isa<TerminatorInst>(&I) && !HasTailCall)
|
||||
CopyToExportRegsIfNeeded(&I);
|
||||
|
||||
CurDebugLoc = DebugLoc();
|
||||
}
|
||||
|
||||
|
@ -239,12 +239,6 @@ SelectionDAGISel::SelectBasicBlock(MachineBasicBlock *BB,
|
||||
SDB->visit(*I);
|
||||
|
||||
if (!SDB->HasTailCall) {
|
||||
// Ensure that all instructions which are used outside of their defining
|
||||
// blocks are available as virtual registers. Invoke is handled elsewhere.
|
||||
for (BasicBlock::const_iterator I = Begin; I != End; ++I)
|
||||
if (!isa<PHINode>(I) && !isa<InvokeInst>(I))
|
||||
SDB->CopyToExportRegsIfNeeded(I);
|
||||
|
||||
// Handle PHI nodes in successor blocks.
|
||||
if (End == LLVMBB->end()) {
|
||||
HandlePHINodesInSuccessorBlocks(LLVMBB);
|
||||
|
Loading…
x
Reference in New Issue
Block a user