[llvm] r213892 - [X86] Optimize stackmap shadows on X86.

Lang Hames lhames at gmail.com
Fri Jul 25 08:03:11 PDT 2014


Hi Joerg,

That's worth considering too. Right now this optimization is being
conservative about the length of branch instructions (implicitly, since
it's considering them prior to branch relaxation). Your scheme would allow
us to take the exact length into account. This would reduce code size,
though it won't effect the dynamic instruction count (since padding for
shadows that cross control flow instructions is emitted after the control
flow, and so is never executed).

Cheers,
Lang.


On Fri, Jul 25, 2014 at 1:34 AM, Joerg Sonnenberger <joerg at britannica.bec.de
> wrote:

> On Thu, Jul 24, 2014 at 04:47:36PM -0700, Lang Hames wrote:
> > Oh - I remember now: Branch relaxation only runs during object emission.
> If
> > we waited until relaxation to fix the shadows, then the shadow
> optimization
> > wouldn't run when you're outputting assembly files. The idea that you
> could
> > get different output by passing -S vs -c seemed too non-obvious, so I
> came
> > up with the current solution.
>
> One approach for that would be to introduce a pseudo op for this
> purpose. Given that any branch instruction on x86 is likely to depend on
> branch relaxation to be computed correctly, this might be the smallest
> evil. Put it under an option to just use the largest size when dealing
> with external assemblers?
>
> Joerg
> _______________________________________________
> 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/20140725/2e656be3/attachment.html>


More information about the llvm-commits mailing list