[llvm-commits] [PATCH] Use predicates more often when optimizing for size
Eric Christopher
echristo at apple.com
Mon Apr 4 17:30:54 PDT 2011
On Apr 2, 2011, at 9:56 PM, Sean Bartell wrote:
> When optimizing for size, we want to use predicates instead of branches
> to save a few instructions. Predicates are used when the resulting code
> is at least 1/2 as fast as with branching; this includes almost all
> cases where predicates can be used. There are, of course, other
> heuristics--I think GCC just uses a limit of 8 instructions.
>
> Tested with make check in LLVM. I'd appreciate any feedback, since if
> I'm accepted into GSoC I'll be doing this much more often :).
Right now optimizing for size in llvm is generally "optimize for size
without penalizing performance" instead of "optimize for size at all
costs".
Otherwise the patch itself looked just fine :)
-eric
More information about the llvm-commits
mailing list