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

Bob Wilson bob.wilson at apple.com
Sun Jul 25 17:37:16 PDT 2010


If you have a better fix that addresses the underlying problem, feel free to rip my change out.  I was kind of expecting that, but I just wanted to get the nightly tests working again.

On Jul 25, 2010, at 12:41 AM, Evan Cheng wrote:

> Thanks. I was looking at this but forgot to check in a fix. CopyToReg should not have data successors but a prescheduling optimization is moving dependencies around and ended up creating these weird scheduling units. 
> 
> Evan
> 
> On Jul 24, 2010, at 10:34 PM, Bob Wilson <bob.wilson at apple.com> wrote:
> 
>> Author: bwilson
>> Date: Sun Jul 25 00:34:27 2010
>> New Revision: 109367
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=109367&view=rev
>> Log:
>> Fix crashes when scheduling a CopyToReg node -- getMachineOpcode asserts on
>> those.  Radar 8231572.
>> 
>> 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=109367&r1=109366&r2=109367&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Sun Jul 25 00:34:27 2010
>> @@ -1313,7 +1313,7 @@
>>        }
>>      }
>> 
>> -      if (SU->NumSuccs) {
>> +      if (SU->NumSuccs && N->getOpcode() != ISD::CopyToReg) {
>>        unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs();
>>        for (unsigned i = 0; i != NumDefs; ++i) {
>>          EVT VT = N->getValueType(i);
>> @@ -1394,7 +1394,7 @@
>>        }
>>      }
>> 
>> -      if (SU->NumSuccs) {
>> +      if (SU->NumSuccs && N->getOpcode() != ISD::CopyToReg) {
>>        unsigned NumDefs = TII->get(N->getMachineOpcode()).getNumDefs();
>>        for (unsigned i = NumDefs, e = N->getNumValues(); i != e; ++i) {
>>          EVT VT = N->getValueType(i);
>> 
>> 
>> _______________________________________________
>> 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