tree-ssa: a weird (mis)optimization

Geert Bosch bosch@adacore.com
Wed Dec 1 17:36:00 GMT 2004


On Dec 1, 2004, at 12:19, Richard Henderson wrote:
> I still think that the Java front end should be doing something in
> order to indicate that these loads should not be removed, beyond
> just marking them as trapping -- or rather, not marking them as not
> trapping.  Otherwise -fnon-call-exceptions will suddenly generate
> *significantly* worse code for everyone else.

I strongly agree with this statement. Also, it shouldn't be too hard
to do this is a non-intrusive way. One possibility would be to have
a volatile nop construct that is a use of the result of the value
loaded,  but does not generate any code by itself. I imagine we'd
already have a construct like that for supporting inline asm.

   -Geert



More information about the Gcc mailing list