[llvm-commits] [llvm] r64319 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Evan Cheng evan.cheng at apple.com
Wed Feb 11 15:39:08 PST 2009


Ok. Is this targeting anything in particular? A test case?

Evan

On Feb 11, 2009, at 12:26 PM, Dan Gohman wrote:

> Author: djg
> Date: Wed Feb 11 14:25:59 2009
> New Revision: 64319
>
> URL: http://llvm.org/viewvc/llvm-project?rev=64319&view=rev
> Log:
> 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.
>
> Modified:
>    llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=64319&r1=64318&r2=64319&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp  
> (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Wed  
> Feb 11 14:25:59 2009
> @@ -899,12 +899,6 @@
>   };
> }  // 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 @@
>     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.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list