[llvm-commits] [llvm] r148408 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jan 18 17:46:57 PST 2012


On Jan 18, 2012, at 2:08 PM, Bill Wendling wrote:

> On Jan 18, 2012, at 11:48 AM, Lang Hames wrote:
> 
>> Author: lhames
>> Date: Wed Jan 18 13:48:31 2012
>> New Revision: 148408
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=148408&view=rev
>> Log:
>> Fixed macro condition.
>> 
>> Modified:
>>   llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
>> 
>> Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=148408&r1=148407&r2=148408&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Jan 18 13:48:31 2012
>> @@ -823,7 +823,7 @@
>>    assert(!RegOp &&
>>           "Can't rematerialize instruction with multiple register operand!");
>>    RegOp = MO.getReg();
>> -#ifndef NDEBUG
>> +#ifdef NDEBUG
>>    break;
>> #endif
>>  }
>> 
> What's the purpose of having this 'break' statement only in release mode? That would appear to cause possible different behavior between release and debug modes...

The only purpose of continuing the loop would be to fire the assertion above, so I actually think Lang's change is wrong.

It's pretty gross, particularly without a comment.

/jakob




More information about the llvm-commits mailing list