[llvm-commits] [llvm] r127376 - in /llvm/trunk: include/llvm/Target/TargetRegisterInfo.h lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp lib/Target/X86/X86RegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Wed Mar 9 15:53:17 PST 2011
Author: evancheng
Date: Wed Mar 9 17:53:17 2011
New Revision: 127376
URL: http://llvm.org/viewvc/llvm-project?rev=127376&view=rev
Log:
Revert 127368 and 127371 for now.
Modified:
llvm/trunk/include/llvm/Target/TargetRegisterInfo.h
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegisterInfo.h?rev=127376&r1=127375&r2=127376&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Wed Mar 9 17:53:17 2011
@@ -588,13 +588,11 @@
}
/// getCrossCopyRegClass - Returns a legal register class to copy a register
- /// in the specified class to or from. If it is possible to copy the register
- /// directly without using a cross register class copy, return the specified
- /// RC. Returns NULL if it is not possible to copy between a two registers of
- /// the specified class.
+ /// in the specified class to or from. Returns NULL if it is possible to copy
+ /// between a two registers of the specified class.
virtual const TargetRegisterClass *
getCrossCopyRegClass(const TargetRegisterClass *RC) const {
- return RC;
+ return NULL;
}
/// getRegPressureLimit - Return the register pressure "high water mark" for
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp?rev=127376&r1=127375&r2=127376&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp Wed Mar 9 17:53:17 2011
@@ -570,20 +570,13 @@
TRI->getMinimalPhysRegClass(Reg, VT);
const TargetRegisterClass *DestRC = TRI->getCrossCopyRegClass(RC);
- // 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.
+ // If cross copy register class is null, then it must be possible copy
+ // the value directly. Do not try duplicate the def.
SUnit *NewDef = 0;
- if (DestRC != RC) {
+ if (DestRC)
NewDef = CopyAndMoveSuccessors(LRDef);
- if (!DestRC && !NewDef)
- report_fatal_error("Can't handle live physical "
- "register dependency!");
- }
+ else
+ DestRC = RC;
if (!NewDef) {
// Issue copies, these can be expensive cross register class copies.
SmallVector<SUnit*, 2> Copies;
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=127376&r1=127375&r2=127376&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Wed Mar 9 17:53:17 2011
@@ -1140,19 +1140,13 @@
TRI->getMinimalPhysRegClass(Reg, VT);
const TargetRegisterClass *DestRC = TRI->getCrossCopyRegClass(RC);
- // 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.
+ // If cross copy register class is null, then it must be possible copy
+ // the value directly. Do not try duplicate the def.
SUnit *NewDef = 0;
- if (DestRC != RC) {
+ if (DestRC)
NewDef = CopyAndMoveSuccessors(LRDef);
- if (!DestRC && !NewDef)
- report_fatal_error("Can't handle live physical register dependency!");
- }
+ else
+ DestRC = RC;
if (!NewDef) {
// Issue copies, these can be expensive cross register class copies.
SmallVector<SUnit*, 2> Copies;
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=127376&r1=127375&r2=127376&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Wed Mar 9 17:53:17 2011
@@ -337,7 +337,7 @@
else
return &X86::GR32RegClass;
}
- return RC;
+ return NULL;
}
unsigned
More information about the llvm-commits
mailing list