This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 1/3] SH-2A FDPIC: New pattern: use_initial_val
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Andrew Stubbs <ams at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Aug 2010 20:30:09 +0200
- Subject: Re: [PATCH 1/3] SH-2A FDPIC: New pattern: use_initial_val
- References: <4C6D56F2.email@example.com> <4C6D755E.firstname.lastname@example.org>
On 08/19/2010 08:18 PM, Richard Henderson wrote:
> On 08/19/2010 09:08 AM, Andrew Stubbs wrote:
>> This patch creates a new instruction pattern "use_initial_val".
>> The purpose of this patch is to allow late optimization passes to use
>> re-use existing pseudo-registers, even if the use of the register has
>> been optimized away in earlier passes.
> What is a target intended to do in this use_initial_val pattern?
> Looking forward to 3/3, it seems you emit a fancy USE insn, whose
> purpose appears to be simply to extend the lifetime of the pseudo,
> without actually using it in a specific pattern.
Yes. It's an unspec which later gets turned into a no-op.
> Without looking deeper, it seems this is a mistake.
> Can you explain further when and why this is required?
We get a pseudo for an initial value during rtl expansion. All uses of
the pseudo are optimized away. Later, in optimize_mode_switching, we
introduce new references to the pseudo, but the initializing insn has