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?