commit | 92884f7ee54186b136a1ade7fa0194097f225c81 | [log] [tgz] |
---|---|---|
author | Dan Gohman <gohman@apple.com> | Tue Apr 20 15:03:56 2010 +0000 |
committer | Dan Gohman <gohman@apple.com> | Tue Apr 20 15:03:56 2010 +0000 |
tree | 546127b7ea33c4777be10893cd74871910649a6c | |
parent | ba5be5c07bb19dcf484e3aa40cd139dd07c10407 [diff] [blame] |
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
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 054174f..ce5a65b 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -618,6 +618,9 @@ visit(I.getOpcode(), I); + if (!isa<TerminatorInst>(&I) && !HasTailCall) + CopyToExportRegsIfNeeded(&I); + CurDebugLoc = DebugLoc(); }