On 1 June 2015 at 12:54, David Holland <dholland-tech%netbsd.org@localhost> wrote:
On Mon, Jun 01, 2015 at 11:41:38AM -0400, Andrew Cagney wrote:
> >> systems and generates reasonable code. Unfortunately, and sorry PCC
> >> (stabs, really?),
> >
> > Feel free to add dwarf, the source is out there, and it wouldn't be
> > especially difficult to do it. I just haven't had time.
> > Stabs was "for free" :-)
>
> I'm not so sure (a year back I looked at the code with that in mind),
> and wonder if any quick hack would end up being opportunity lost.
I have not looked at it, nor have I looked at pcc at all in a long
time, so what I'm missing may just be otherwise obvious context, but:
> PCC, as a "classic" C compiler, only generates debug information at
> -O0. This this is because the stabs code is restricted to the
> un-optimized code generator path. Having the backend restricted to
> DWARF when '-O0' might just be ok, were it not for SSA (static single
> assignment).
>
> To my mind, and I'm assuming a pure SSA compiler design, having SSA
> forces issues like: [...]
I'm missing something; SSA is just a style of program representation.
Yes. Lets think of Static Single Assignment as the pure academic theory.
LLVM[Lattner et.al.] and GIMPLE[Novillo et.al.] are real world
implementations of that theory.
https://gcc.gnu.org/projects/tree-ssa/#ssa has a good diagram and is a
relevant read.
PCC, to the best of my knowledge is still in the [very early] planning
stages. One of its design choices would be to go pure SSA. Another
option, closer to GCC (RTL), would be to retain existing code-gen
passes. Tough choices.