Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-11

Request info on static single use

13 messages · 8 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart van den Broek

Can someone give me a reference to static single use (for example scientific paper).
I know SSA and SSI (I = information).

Thanks

--Bart.

_________________________________________________________________ Een eigen webpagina voor foto's en weblog in 2 tellen! http://spaces.live.com

Reply by email

Micha Nelissen
to Jonas Maebe
Jonas Maebe wrote 8 lines
On 8 nov 2006, at 17:11, Bart van den Broek wrote: > Can someone give me a reference to static single use (for example > scientific paper). > I know SSA and SSI (I = information). http://www.google.com/search?q=static+single+use

Is SSU easier to implement than SSA ? Aren't variables often more used than assigned (so more generated variables by SSU) ? How do the achieved optimizations compare ?

(At least I didn't find this info in the wiki, fpc or pedia).

Micha

Reply by email

Bart van den Broek
to Micha Nelissen

All links you gave me lead to SSA, I have gathered quite some documents on the subject.
I found one reference in an SSI document to SSU and it was discredited as incomplete (no algorithms) and vague.
I thought you found some info i didnt see yet.

So i guess you are using SSA?

--Bart.

----Original Message Follows----
From: Micha Nelissen
Reply-To: FPC developers' list
To: FPC developers' list
Subject: Re: [fpc-devel] Request info on static single use Date: Wed, 08 Nov 2006 17:46:13 +0100

Jonas Maebe wrote 8 lines
On 8 nov 2006, at 17:11, Bart van den Broek wrote: >Can someone give me a reference to static single use (for example >scientific paper). >I know SSA and SSI (I = information). http://www.google.com/search?q=static+single+use

Is SSU easier to implement than SSA ? Aren't variables often more used than assigned (so more generated variables by SSU) ? How do the achieved optimizations compare ?

(At least I didn't find this info in the wiki, fpc or pedia).

Micha

Reply by email

Jonas Maebe
to Micha Nelissen: Is SSU easier to implement than SSA ? Aren't variables often more used than assigned (so…
Micha Nelissen wrote 8 lines
Jonas Maebe wrote: > On 8 nov 2006, at 17:11, Bart van den Broek wrote: >> Can someone give me a reference to static single use (for example >> scientific paper). >> I know SSA and SSI (I = information). > http://www.google.com/search?q=static+single+use Is SSU easier to implement than SSA ?

No, it's a bit more work.

Aren't variables often more used than assigned (so more generated variables by SSU) ?

Yes.

How do the achieved optimizations compare ?

SSU gives somewhat better results on register-starved architectures. The change from SSA to SSU didn't make any difference for PPC for the compiler+rtl (it can give a difference for large procedures with a lot of variables which are used in different "phases" of course). It saves about 5kb on the compiler on Linux/i386 compared to SSA-only.

Jonas

Reply by email

Jonas Maebe
to Bart van den Broek: All links you gave me lead to SSA, I have gathered quite some documents on the subject. I…
Bart van den Broek wrote
All links you gave me lead to SSA,

No. The first google hit is a wikipedia article about SSA, but contains a subsection about SSU.

Show quoted text 6 lines
I have gathered quite some documents on the subject. I found one reference in an SSI document to SSU and it was discredited as incomplete (no algorithms) and vague. I thought you found some info i didnt see yet. So i guess you are using SSA?

No, SSU. SSU simply means that you not only rename a variable when it's written, but also when it's read. I.e.,

x1 := y1
z1 := y1;

is changed into

x2 := y1
y2 := y1
z2 := y2
y3 := y2

This allows the register allocator to more often change which registers are spilled to memory and which are kept in registers (which is mainly useful if you have few registers available)

Jonas

Reply by email

Vincent Snijders
to Jonas Maebe: No, it's a bit more work. Yes. SSU gives somewhat better results on register-starved…
Jonas Maebe wrote 22 lines
On 8 nov 2006, at 17:46, Micha Nelissen wrote: > > Is SSU easier to implement than SSA ? No, it's a bit more work. > Aren't variables often more used than assigned (so more generated > variables by SSU) ? Yes. > How do the achieved optimizations compare ? SSU gives somewhat better results on register-starved architectures. The change from SSA to SSU didn't make any difference for PPC for the compiler+rtl (it can give a difference for large procedures with a lot of variables which are used in different "phases" of course). It saves about 5kb on the compiler on Linux/i386 compared to SSA-only.

Will you be working on SSA and/or SSU with control blocks (e.g. using SSA in procedures where a for loop is used) before 2.2? Or will that be released only in a later version.

A synthetic example that will benefit is the CalculatePoint procedure of http://svn.freepascal.org/svn/fpc/trunk/tests/bench/shootout/src/mandelbrot.pp

Vincent

Reply by email

Jonas Maebe
to Vincent Snijders
Vincent Snijders wrote
Will you be working on SSA and/or SSU with control blocks (e.g. using SSA in procedures where a for loop is used) before 2.2? Or will that be released only in a later version.

Later. But maybe Florian will work on it earlier.

Jonas

Reply by email

Florian Klaempfl
to Jonas Maebe
Show quoted text 8 lines
On 08 Nov 2006, at 20:13, Vincent Snijders wrote: > Will you be working on SSA and/or SSU with control blocks (e.g. using > SSA in procedures where a for loop is used) before 2.2? Or will that > be released only in a later version. Later. But maybe Florian will work on it earlier.

I don't plan it before 2.2. I prefer to concentrate our efforts on 2.2

Reply by email