|Interprocedural SSA form? firstname.lastname@example.org (Edsko de Vries) (2005-06-02)|
|Re: Interprocedural SSA form? email@example.com (Jeremy Singer) (2005-06-02)|
|Re: Interprocedural SSA form? firstname.lastname@example.org (Florian Liekweg) (2005-06-02)|
|Re: Interprocedural SSA form? email@example.com (Matthias Blume) (2005-06-04)|
|Re: Interprocedural SSA form? firstname.lastname@example.org (Jeremy Singer) (2005-06-04)|
|From:||Florian Liekweg <email@example.com>|
|Date:||2 Jun 2005 14:58:51 -0400|
|Organization:||University of Karlsruhe, Germany|
Edsko de Vries wrote:
> When writing a compiler based around SSA, is every procedure converted
> to SSA form individually, or is it possible to create some sort of
> "super control flow graph" that incorporates procedures, and convert
> the entire thing to SSA form? Is there benefits/downsides to either
> approach? Is there some literature I can read on this topic?
this depends on what You are planning to do on the interprocedural
representation. For a whole-program analysis, we have found the
following idea(s) useful:
* Formal arguments in procedure f are nothing more than Phi-Functions
for the actual parameters given to calls to f in other procedures.
* Return instructions (with a value) are 'inverse' to the argument
Phi's in the sense that the return value of a call to f can be
now written as an access to the return value of f.
* For a program analysis, you will probably take into account that
analysis information gathered for a return instruction must be
filtered: if g calls f, and accesses the return instruction of g,
it may only pick up information computed from values prpagated into
f from g. (if this is omitted, you propagate information along
unrealizable paths, e.g. g and g' both call f, and g' values are
propagated int the call to f, through f, and back ... into g'.)
With the first two points done before an analysis is started, and
the analysis itself extended by the third point, you get an inter-
procedural analysis 'for free'.
Florian Liekweg | We resisted the temptation to develop what
IPD Universitšt Karlsruhe | the market needed at the time.
========================================[ Rich Seifert on Ethernet ]===
Return to the
Search the comp.compilers archives again.