[llvm] r209455 - Return false if we're not going to do anything.

Eric Christopher echristo at gmail.com
Thu May 22 11:37:16 PDT 2014


On Thu, May 22, 2014 at 11:24 AM, David Blaikie <dblaikie at gmail.com> wrote:
> On Thu, May 22, 2014 at 10:49 AM, Eric Christopher <echristo at gmail.com> wrote:
>> Author: echristo
>> Date: Thu May 22 12:49:33 2014
>> New Revision: 209455
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=209455&view=rev
>> Log:
>> Return false if we're not going to do anything.
>
> Is this observable (& thus testable)?
>

Not really no. I could do what Paul suggested and put the return above
the debug line and compile with a target that didn't want if
conversion and then make sure that we don't see the debug line in
asserts only builds when we compile with -debug. But I'm not sure that
would be testing anything other than the pass not firing, not the
return value.

Urgh.

I'll ask Chandler if he has any better idea how to test this at some point.

-eric

>>
>> Modified:
>>     llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp
>>
>> Modified: llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp?rev=209455&r1=209454&r2=209455&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp Thu May 22 12:49:33 2014
>> @@ -780,7 +780,7 @@ bool EarlyIfConverter::runOnMachineFunct
>>    if (!MF.getTarget()
>>             .getSubtarget<TargetSubtargetInfo>()
>>             .enableEarlyIfConversion())
>> -    return true;
>> +    return false;
>>
>>    TII = MF.getTarget().getInstrInfo();
>>    TRI = MF.getTarget().getRegisterInfo();
>>
>>
>> _______________________________________________
>> 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