[llvm] r209340 - Make early if conversion dependent upon the subtarget and add

Robinson, Paul Paul_Robinson at playstation.sony.com
Thu May 22 09:04:02 PDT 2014


> --- 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.)

Also shouldn't this be returning false if it didn't do anything?
--paulr






More information about the llvm-commits mailing list