[llvm-commits] [llvm] r130943 - /llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp

Andrew Trick atrick at apple.com
Fri May 6 15:02:35 PDT 2011


On May 5, 2011, at 11:24 PM, Duncan Sands wrote:

> Hi Andrew,
> 
>> --- llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp Thu May  5 14:32:21 2011
>> @@ -393,6 +393,18 @@
>>          UseList.clear();
>>          if (!MO.isDead())
>>            DefList.clear();
>> +
>> +        // Calls will not be reordered because of chain dependencies (see
>> +        // below). Since call operands are dead, calls may continue to be added
>> +        // to the DefList making dependence checking quadratic in the size of
>> +        // the block. Instead, we leave only one call at the back of the
>> +        // DefList.
>> +        //
>> +        // NOTE: This assumes that the DefList is ordered!
> 
> that suggests adding a check that DefList is ordered.

Yes. Any verification I could think of was overkill for a vector that's only pushed/popped in only one place. I did go back and add an assert to ensure no one outside of this function touches the vector.

Someday I'll realize that verbose comments just get me in trouble ;)

-Andy



More information about the llvm-commits mailing list