I'm clearly out-of-date regarding SSA, its nice to be corrected. On 8 June 2015 at 09:06, Anders Magnusson <ra...@ludd.ltu.se> wrote: > Andrew Cagney skrev den 2015-06-01 20:41: >> > I do not understand why either of those choices need to be taken. > Pcc has a reasonable intermediate representation, which in the optimizer > is converted to SSA form, hammered on, and converted back. This is > done while retaining the intermediate representation, which is no problem. >> >> I'm being fast and loose. My reading of the code was that debug info >> was being generated by the back of the front end (very roughly >> "gimplify" in this diagram of GCC >> https://gcc.gnu.org/projects/tree-ssa/#ssa). It was pretty much hard >> wired printfs, and explained to me why "-g -O" wasn't supported. > > printf's are only used for data (which is spit out directly), not code. > All code is dealt with function-wise, otherwise things like the register > allocator would not work. > >>> Unless, I guess, what you're talking about is throwing away the >>> existing backend entirely and writing a new SSA-based one, in which >>> case I'd gently suggest that this is a large project :-) >> >> Exactly :-( >> > What is wrong with the existing backend?
As you state, the representation gets taken into and then out of SSA. Why bother; at least for the converting to-ssa side? Andrew