This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Promoted variable SUBREG optimizations
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: roger at eyesopen dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 12 Aug 03 16:07:10 EDT
- Subject: Re: [PATCH] Promoted variable SUBREG optimizations
Pretty much all of the compiler ignores the SUBREG_PROMOTED_VAR_P
flag, and so treats references to them as if they would a normal
subregs, and not clobber the rest of the inner pseudo.
Unless I'm missing something in the above, what it's doing sounds
*completely* correct. SUBREG_PROMOTED_P has no significance *at all*
to an RTL-level processor: it just allows shortcuts when *generating* RTL.
If you have *any* SUBREG where both modes are within a register, the entire
register is presumed to be set: nothing special here.
Perhaps, you mean that the current code doesn't actually require the
holding register is always correctly sign or zero extended?
What does "require" mean here? When you have that flag set, the generated
RTL ensures that it *is* correctly sign- or zero-extended. Since the
generated RTL does that, any optimization of that RTL would also preserve
that property.
Do you agree with RTH that the current implementation can't be relied
upon to preserve the required semantics?
As I said, SUBREG_PROMOTED_P has no significance at all for optimizers,
so I don't understand your question.