diff options
author | Dan Gohman <gohman@apple.com> | 2009-02-11 20:25:59 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-02-11 20:25:59 +0000 |
commit | cc994ea36bd6f501334d8be4219fc23caff025d9 (patch) | |
tree | 55949946c18b19de5028b149fd4cf65649cfcffe /lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | |
parent | d293e0d2dcd3dc4e6030e9644846ed4d0b1bbde3 (diff) | |
download | external_llvm-cc994ea36bd6f501334d8be4219fc23caff025d9.tar.gz external_llvm-cc994ea36bd6f501334d8be4219fc23caff025d9.tar.bz2 external_llvm-cc994ea36bd6f501334d8be4219fc23caff025d9.zip |
Delete the heuristic for non-livein CopyFromReg nodes. Non-liveinness
is determined by whether the node has a Flag operand. However, if the
node does have a Flag operand, it will be glued to its register's
def, so the heuristic would end up spuriously applying to whatever
node is the def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 07274b2899..55780e4091 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -899,12 +899,6 @@ namespace { }; } // end anonymous namespace -static inline bool isCopyFromLiveIn(const SUnit *SU) { - SDNode *N = SU->getNode(); - return N && N->getOpcode() == ISD::CopyFromReg && - N->getOperand(N->getNumOperands()-1).getValueType() != MVT::Flag; -} - /// CalcNodeSethiUllmanNumber - Compute Sethi Ullman number. /// Smaller number is the higher priority. static unsigned @@ -986,11 +980,6 @@ namespace { unsigned getNodePriority(const SUnit *SU) const { assert(SU->NodeNum < SethiUllmanNumbers.size()); unsigned Opc = SU->getNode() ? SU->getNode()->getOpcode() : 0; - if (Opc == ISD::CopyFromReg && !isCopyFromLiveIn(SU)) - // CopyFromReg should be close to its def because it restricts - // allocation choices. But if it is a livein then perhaps we want it - // closer to its uses so it can be coalesced. - return 0xffff; if (Opc == ISD::TokenFactor || Opc == ISD::CopyToReg) // CopyToReg should be close to its uses to facilitate coalescing and // avoid spilling. |