diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-03-10 00:16:32 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-03-10 00:16:32 +0000 |
commit | b0519e15f70cef7ba16b712f258d4782ade17e13 (patch) | |
tree | 54acdbd4f52b9a1d89046eaa385d955d8f52bede /lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | |
parent | 02d7c9298298f7f8fba1427f249deb2106126e9c (diff) | |
download | external_llvm-b0519e15f70cef7ba16b712f258d4782ade17e13.zip external_llvm-b0519e15f70cef7ba16b712f258d4782ade17e13.tar.gz external_llvm-b0519e15f70cef7ba16b712f258d4782ade17e13.tar.bz2 |
Re-commit 127368 and 127371. They are exonerated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index f1a5a65..5e60aa0 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -1140,13 +1140,19 @@ SUnit *ScheduleDAGRRList::PickNodeToScheduleBottomUp() { TRI->getMinimalPhysRegClass(Reg, VT); const TargetRegisterClass *DestRC = TRI->getCrossCopyRegClass(RC); - // If cross copy register class is null, then it must be possible copy - // the value directly. Do not try duplicate the def. + // If cross copy register class is the same as RC, then it must be possible + // copy the value directly. Do not try duplicate the def. + // If cross copy register class is not the same as RC, then it's possible to + // copy the value but it require cross register class copies and it is + // expensive. + // If cross copy register class is null, then it's not possible to copy + // the value at all. SUnit *NewDef = 0; - if (DestRC) + if (DestRC != RC) { NewDef = CopyAndMoveSuccessors(LRDef); - else - DestRC = RC; + if (!DestRC && !NewDef) + report_fatal_error("Can't handle live physical register dependency!"); + } if (!NewDef) { // Issue copies, these can be expensive cross register class copies. SmallVector<SUnit*, 2> Copies; |