Fix PR44281 (bad RA with global regs)

Bernd Schmidt
Fri Feb 26 15:41:00 GMT 2016

On 02/22/2016 03:37 PM, Richard Biener wrote:

> Do calls properly clobber them even if they are not in the set of
> call-clobbered regs?
> Are asm()s properly using/clobbering them?  I think you are allowed to use them
> in asm()s without adding constraints for them?

Calls do, asms currently don't AFAICT. Not sure whether it's allowed to 
use them, but I think it should be straightforward to adjust df-scan.

Michael Matz wrote:

> Some jit-like code uses global reg vars to
> reserve registers for the generated code.  It would have to add
> -ffixed-<name> compilation options instead of only the global vars after
> the patch.  I think the advantages of having "good RA" with global reg
> vars are dubious enough to not warrant breaking backward compatibility.

I don't see the need for new options - if we have proper live info for 
calls and asms, what other reason could there be for incomplete liveness 

 > I'd say this is sth for GCC 7.

Not really objecting to that. Would you ack it if I extended df-scan for 
the asm case?


More information about the Gcc-patches mailing list