summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-20 15:03:56 +0000
committerDan Gohman <gohman@apple.com>2010-04-20 15:03:56 +0000
commit950fe784be6a2ad13bd47aef034ed025cccb97e7 (patch)
tree55793e81bf38812b6b7b5cbcf600c5690f710b12 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parentf41ad478cac0b7ba36fa41c9af4663c40476fb7c (diff)
downloadbcm5719-llvm-950fe784be6a2ad13bd47aef034ed025cccb97e7.tar.gz
bcm5719-llvm-950fe784be6a2ad13bd47aef034ed025cccb97e7.zip
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. llvm-svn: 101906
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 054174f037e..ce5a65b7a17 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -618,6 +618,9 @@ void SelectionDAGBuilder::visit(const Instruction &I) {
visit(I.getOpcode(), I);
+ if (!isa<TerminatorInst>(&I) && !HasTailCall)
+ CopyToExportRegsIfNeeded(&I);
+
CurDebugLoc = DebugLoc();
}
OpenPOWER on IntegriCloud