Robert Lytton
2013-Aug-21 18:35 UTC
[LLVMdev] PrescheduleNodesWithMultipleUses() probable mistake.
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())) ~ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130821/721dc102/attachment.html>
Bill Wendling
2013-Aug-21 21:48 UTC
[LLVMdev] PrescheduleNodesWithMultipleUses() probable mistake.
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
Apparently Analagous Threads
- [LLVMdev] getNodePriority()
- [LLVMdev] PrescheduleNodesWithMultipleUses() causing failure in PickNodeToScheduleBottomUp() ???
- [LLVMdev] PrescheduleNodesWithMultipleUses() causing failure in PickNodeToScheduleBottomUp() ???
- [LLVMdev] PrescheduleNodesWithMultipleUses() causing failure in PickNodeToScheduleBottomUp() ???
- [LLVMdev] PrescheduleNodesWithMultipleUses() causing failure in PickNodeToScheduleBottomUp() ???