[PATCH] Add another run of ARM Thumb2SizeReduction pass with -Oz
Eric Christopher
echristo at gmail.com
Thu Mar 12 10:17:58 PDT 2015
On Thu, Mar 12, 2015 at 4:10 AM Renato Golin <renato.golin at linaro.org>
wrote:
> On 11 March 2015 at 23:00, Pete Cooper <peter_cooper at apple.com> wrote:
> > This patch schedules another pass of Thumb2SizeReduction before the
> PostRA
> > scheduler. This pass is only for functions with minsize set on them. It
> > results in the mov being converted to Thumb2 before the PostRA scheduler
> and
> > so the code now becomes
>
> Hi Pete,
>
> + if (getOptLevel() != CodeGenOpt::None && !getARMSubtarget().
> isThumb1Only())
>
> This doesn't guarantee (Oz && T2). Wouldn't you have to be specific at
> least regarding CodeGenOpt?
>
>
Neither of these is the right way to handle adding this pass. What needs to
happen is either a) for now a custom hook, or b) add some code to enable
the pass to be able to run custom code to decide whether or not to run the
pass on particular code. I did, in fact, clean up a bunch of this in the
ARM pass manager recently - for this particular pass.
-eric
> Also, the same pass has already been added in some cases on the code
> above, you don't want to add two identical passes, even if they have
> different parameters. Maybe create a boolean OnlyMinSize from opt+t2
> flags, and pass it to the already existing addPass()?
>
> The tests are good and the rest looks good to me. Thanks!
>
> cheers,
> --renato
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150312/d645ef38/attachment.html>
More information about the llvm-commits
mailing list