This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SSA and implicit uses.
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Sanjiv Kumar Gupta <sanjivkumargupta at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 2 Nov 2004 08:33:53 -0800
- Subject: Re: SSA and implicit uses.
- References: <20041102144036.20789.qmail@web61103.mail.yahoo.com>
On Tue, Nov 02, 2004 at 06:40:35AM -0800, Sanjiv Kumar Gupta wrote:
> For statements like;
> a = 0;
> a++;
> a++;
>
> My compiler generates SSA form like below:
> r200 = 0;
> r201 = r200 + 1;
> r202 = r201 + 1;
>
> now all of r200, r201 and r202 are independent live
> ranges and may get assigned different hard regs.
Actually, the above will quickly be turned into
r200 = 0;
r201 = 1;
r202 = 2;
and you'll end up not using *any* registers. Of course, you
could construct another example that would better illustrate
your point.