[llvm-commits] [llvm] r62036 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
Evan Cheng
evan.cheng at apple.com
Sun Jan 11 00:53:36 PST 2009
Author: evancheng
Date: Sun Jan 11 02:53:35 2009
New Revision: 62036
URL: http://llvm.org/viewvc/llvm-project?rev=62036&view=rev
Log:
CheckForPhysRegDependency should not return copy cost. It's not used. No functionality change.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp?rev=62036&r1=62035&r2=62036&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Sun Jan 11 02:53:35 2009
@@ -39,11 +39,11 @@
/// CheckForPhysRegDependency - Check if the dependency between def and use of
/// a specified operand is a physical register dependency. If so, returns the
-/// register and the cost of copying the register.
+/// register.
static void CheckForPhysRegDependency(SDNode *Def, SDNode *User, unsigned Op,
const TargetRegisterInfo *TRI,
const TargetInstrInfo *TII,
- unsigned &PhysReg, int &Cost) {
+ unsigned &PhysReg) {
if (Op != 2 || User->getOpcode() != ISD::CopyToReg)
return;
@@ -55,12 +55,8 @@
if (Def->isMachineOpcode()) {
const TargetInstrDesc &II = TII->get(Def->getMachineOpcode());
if (ResNo >= II.getNumDefs() &&
- II.ImplicitDefs[ResNo - II.getNumDefs()] == Reg) {
+ II.ImplicitDefs[ResNo - II.getNumDefs()] == Reg)
PhysReg = Reg;
- const TargetRegisterClass *RC =
- TRI->getPhysicalRegisterRegClass(Reg, Def->getValueType(ResNo));
- Cost = RC->getCopyCost();
- }
}
}
@@ -183,9 +179,8 @@
bool isChain = OpVT == MVT::Other;
unsigned PhysReg = 0;
- int Cost = 1;
// Determine if this is a physical register dependency.
- CheckForPhysRegDependency(OpN, N, i, TRI, TII, PhysReg, Cost);
+ CheckForPhysRegDependency(OpN, N, i, TRI, TII, PhysReg);
assert((PhysReg == 0 || !isChain) &&
"Chain dependence via physreg data?");
SU->addPred(SDep(OpSU, isChain ? SDep::Order : SDep::Data,
More information about the llvm-commits
mailing list