An issue for the SC: horrible documentation quality of GCC
Daniel Jacobowitz
drow@mvista.com
Fri May 9 15:56:00 GMT 2003
On Fri, May 09, 2003 at 11:41:25AM -0400, Richard Kenner wrote:
> It seems to be a confusing name, as it doesn't work locally at all.
>
> Then it what sense is it "local"? Do you know?
>
> p1 <-- 100
> p2 <-- p1 + p3
> into
> p1 <-- 100
> p2 <-- 100 + p3
>
> For many machines, the former is better. CSE has lots of logic to do this
> and knows which is better. What is this code doing, why does it to things
> differently than CSE, and how does it interact with CSE? These are both
> questions and things that need to be documented in the code.
>
> I'd expect gcse to only operate on the *start* of a basic block and let
> CSE make the decisions *within* the block. But the code doesn't seem to
> do that. Without the missing documentation, I can't tell if that's a bug
> in the code or is the way it was designed to work.
We don't live in a void of one flat source tree. While I'm not arguing
that documentation would be better, it's still easy to find the history
of this code. It was added last July by Jan, in this patch:
http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00617.html
It was as simple as using CVS to find the patch, and then Google to
find the mailing list posting.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
More information about the Gcc
mailing list