mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Factor out a bit of code that appears in several places into a
utility function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -476,11 +476,8 @@ void SelectionDAGISel::SelectBasicBlock(BasicBlock *LLVMBB,
|
||||
// Ensure that all instructions which are used outside of their defining
|
||||
// blocks are available as virtual registers. Invoke is handled elsewhere.
|
||||
for (BasicBlock::iterator I = Begin; I != End; ++I)
|
||||
if (!I->use_empty() && !isa<PHINode>(I) && !isa<InvokeInst>(I)) {
|
||||
DenseMap<const Value*,unsigned>::iterator VMI =FuncInfo->ValueMap.find(I);
|
||||
if (VMI != FuncInfo->ValueMap.end())
|
||||
SDL->CopyValueToVirtualRegister(I, VMI->second);
|
||||
}
|
||||
if (!isa<PHINode>(I) && !isa<InvokeInst>(I))
|
||||
SDL->CopyToExportRegsIfNeeded(I);
|
||||
|
||||
// Handle PHI nodes in successor blocks.
|
||||
if (End == LLVMBB->end()) {
|
||||
|
Reference in New Issue
Block a user