This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SSA and implicit uses.


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]