This is the mail archive of the
mailing list for the GCC project.
Re: Regimplification enhancements 1/3
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 Jun 2014 13:45:44 +0200
- Subject: Re: Regimplification enhancements 1/3
- Authentication-results: sourceware.org; auth=none
- References: <539ECD65 dot 40405 at codesourcery dot com> <CAFiYyc0Pix+9eRy2Udos0Zp=rr3FfoOcsqToeeeYahZaBPBcmA at mail dot gmail dot com>
On 06/16/2014 01:24 PM, Richard Biener wrote:
On Mon, Jun 16, 2014 at 12:56 PM, Bernd Schmidt <firstname.lastname@example.org> wrote:
For the ptx port, I've needed to write a new pass which ensures all objects
go into address spaces as required by the machine. This uses the
regimplification code in gimplify-me.c, and that requires some fixes and
Can you explain how and why you need re-gimplification here? IMHO
you should apply the necessary steps yourself, not put in GENERIC
into GIMPLE and rely on the gimplifier.
That's not actually what's happening - the pass modifies the address
spaces of all objects (local & global vars etc.) and I have one
additional patch in gimplify.c that recognizes address space mismatches
on an ADDR_EXPR (also testing a new TYPE_QUAL_AS_IMPLICIT bit to ensure
it only triggers in situations it's intended to) and inserts the
necessary ADDR_SPACE_CONVERT_EXPR. With that I can pass all statements
through regimplification to get a consistent view of the world again.
You can't turn a x = &foo; into x = (convert)&foo; this way abusing
the re-gimplification routines.
The re-gimplification routines do _not_ accept random GENERIC
operands. They were written to handle registers becoming non-registers
and nothing more.
It seems to work fine is all I can say. What it was written for and what
it can be useful for are two different things.