SSA without phi
- From: Nicolas.Capens@xxxxxxxxx
- Date: 20 Apr 2007 10:25:01 -0400
Hi all,
I'm wondering whether it is possible to get (part of) the benefits of
SSA by using it only per basic block. This way I could avoid all the
complexity of phi functions.
The problem with phi functions is that they're not executable. I would
prefer keeping my intermediate code executable at all time. This would
make it easier to reason about optimizations and follow every step
(*). It's also fairly complex (almost convoluted in my opinion) to
correctly compute where to insert phi functions, especially when
trying to keep their number low.
So what I propose is to have single-assignment per basic block, but
allow reassignment of the same variables in other basic blocks. Is
this a known technique that has been compared to full SSA before? I
believe that all optimizations that work per basic block would still
work correctly. Things like dead code elimination and copy propagation
could still benefit from the single-assignment property. And by simply
looking at uses and definitions per basic block it could still
optimize across basic blocks.
Does this "Block Single Assignment" make any sense or would I lose
some significant advantages of SSA with phi functions? Or is it
equivalent with a known technique that is proven to be less efficient?
Thanks for all insights,
Nicolas Capens
(*) This is also a bit of a philospohical opinion. I want my compiler
to behave in a way that a programmer would optimize code. SSA with phi
functions just isn't natural, while the idea of static assignment is
fundamental in functional programming and well understood.
.
- Follow-Ups:
- Re: SSA without phi
- From: Nicolas . Capens
- Re: SSA without phi
- From: Chris F Clark
- SSA without phi
- From: Inderaj Bains
- Re: SSA without phi
- From: Jason Lee Eckhardt
- Re: SSA without phi
- From: Tommy Thorn
- Re: SSA without phi
- Prev by Date: Java compiler courses
- Next by Date: Re: Parser generators which implemented Burke-Fisher error correction
- Previous by thread: Java compiler courses
- Next by thread: Re: SSA without phi
- Index(es):
Relevant Pages
|
|