[PATCH] x86: Disable jump tables when retpolines are used (PR target/86952).

Jakub Jelinek jakub@redhat.com
Fri Mar 8 14:23:00 GMT 2019


On Fri, Mar 08, 2019 at 02:50:26PM +0100, Martin Liška wrote:
> On 3/8/19 1:44 PM, Jan Hubicka wrote:
> >> Hi.
> >>
> >> Thanks to Intel guys, we've done some re-measurement in PR86952
> >> about usage of jump tables when retpolines are used.
> >> Numbers prove that disabling of JT should be the best for now.
> >>
> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> >>
> >> Ready to be installed?
> > 
> > OK, thanks!
> > I wonder if there is some threshold for extremely large jumptables where
> > branchy sequence will loose, but I think it is better to disable them
> > than what we have right now.
> 
> I tested switch statements up to 4096 and it was still slower ;)

Try one with 10000000 of entries ;) and also compare code size and data
segment size.

	Jakub



More information about the Gcc-patches mailing list