[llvm] r209340 - Make early if conversion dependent upon the subtarget and add
Eric Christopher
echristo at gmail.com
Thu May 22 10:53:29 PDT 2014
On Thu, May 22, 2014 at 9:04 AM, Robinson, Paul
<Paul_Robinson at playstation.sony.com> wrote:
>> --- llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/EarlyIfConversion.cpp Wed May 21 18:40:26
>> 2014
>> @@ -776,6 +776,10 @@ bool EarlyIfConverter::tryConvertIf(Mach
>> bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
>> DEBUG(dbgs() << "********** EARLY IF-CONVERSION **********\n"
>> << "********** Function: " << MF.getName() << '\n');
>> + // Only run if conversion if the target wants it.
>> + if (!MF.getTarget().getSubtarget().enableEarlyIfConversion())
>> + return true;
>> +
>
> Maybe put the test before the DEBUG() call, so the pass doesn't report
> itself as running when actually it didn't? (That's what I did for the
> optnone stuff.)
>
Yeah, FWIW you missed the passes being added in all of the backends
for the optnone stuff. Including optimization passes on, say, x86. See
my other patches from yesterday for places you should look.
That said i'd rather the debug output say "hey, i'm in this function
on this pass even if I'm not going to do anything"?
> Also shouldn't this be returning false if it didn't do anything?
Knew I missed one yesterday when I fixed it. Thanks.
-eric
More information about the llvm-commits
mailing list