PCC debug and speed improvements
December 4th, 2008 . by BSD BlogAnders Magnusson (ragge@) has recently committed some improvements to pcc and wrote to the pcc-list,
I have just fixed the stabs code so that debug code can be generated even if
some of the optimizing flags are turned on. To state the obvious, variable information
might be broken or nonexistent if any optimization is used, but at least it helps
with running a debugger on optimized code.Parts of this will be made prettier in the future, but at least it works for now.
– Ragge
(Hm, maybe I should have a changelog, or blog, or something to write all updates in?)
I have also removed some sanity check code in the register allocator for a new code path,
it has been there for some years and never failed, and also increased a hash table.
This made the register allocator take about 5% (!) of the time it used to.Timing shows that the actual C compiler in average takes less than 100 milliseconds compiling
a source file in the base system when optimizing is turned on. This is on a 733MHz P4.
I think it’s quite impressing![]()
Note that cpp is significantly slower, this will be addressed in the future.
– Ragge
Thanks Ragge for all the hard work! Note that these improvements have not yet been imported into OpenBSD, so you’ll have to go to the pcc site to test this out.