[LLVMdev] PrescheduleNodesWithMultipleUses() probable mistake.

Bill Wendling wendling at apple.com
Wed Aug 21 14:48:36 PDT 2013


Dan,

You wrote this code...What do you think? :-)

-bw

On Aug 21, 2013, at 11:35 AM, Robert Lytton <robert at xmos.com> wrote:

> Hi,
> 
> At the moment the same test is being ran twice - same output so pointless!
> I believe this may not be what was intended.
> The change below runs the virtual register test the second time on the Predecessor SUnit.
> 
> Robert
> 
> diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
> index f5fe168..6e888da
> --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
> +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
> @@ -2850,7 +2850,7 @@ void RegReductionPQBase::PrescheduleNodesWithMultipleUses() {
>        continue;
>      // Avoid prescheduling to copies from virtual registers, which don't behave
>      // like other nodes from the perspective of scheduling heuristics.
> -    if (SDNode *N = SU->getNode())
> +    if (SDNode *N = PredSU->getNode())
>        if (N->getOpcode() == ISD::CopyFromReg &&
>            TargetRegisterInfo::isVirtualRegister
>              (cast<RegisterSDNode>(N->getOperand(1))->getReg()))
> ~
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list