[PATCH,PR43478] preserve dying REGs in debug temps

Jakub Jelinek jakub@redhat.com
Tue May 18 20:07:00 GMT 2010


On Tue, May 18, 2010 at 07:52:25PM +0100, Richard Sandiford wrote:
> Yeah, calling gen_rtx_raw_SUBREG is far from ideal.  I think going
> straight to DEBUG_SUBREG would be a bad idea though.  Let's think about
> what we semantics we need first.  Does an SFmode lowpart subreg of a
> DImode value make conceptual sense?  If it does, why disallow it in

Yes, it makes conceptual sense.  union {float f;long long l;} x; x.l = VAL; x.f
It is disallowed on some targets for some hard registers if the hw doesn't
support such operations.

> You say "any" subregs.  Do you mean any lowpart subregs, or any subregs
> full stop?  E.g. is it OK for a debug insn to have a highpart subreg of
> a single register?  Something like (subreg:HI (reg:SI $r) 0) for a
> big-endian 32-bit target?  Things like that are probably better
> represented using zero_extract, which has the added benefit of
> giving you bit granularity rather than byte granularity.

Something like low-part + paradoxical subregs combined with zero_extract
would be sufficient too.  We want to try normal subregs first though
and only if they are invalid (or perhaps also aren't low-part or paradoxical)
use something else instead, as normal subreg simplification will handle many
common cases.

	Jakub



More information about the Gcc-patches mailing list