This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: An issue for the SC: horrible documentation quality of GCC
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: jh at suse dot cz
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 9 May 03 22:25:56 EDT
- Subject: Re: An issue for the SC: horrible documentation quality of GCC
Then you will end up with never ending dataflow problems in the global
pass. The GCSE in the simplest definition is already too complicated
for us to be implemented correctly (we are on it since 97 and still it
is inferrior to what is done by other compilers). Adding more
complexity, like CSE has would make it more crazier.
Perhaps, but a lot of that complexity is *needed*. The reason that GCC
has historically beaten other compilers in code quality is paying attention
to important heuristics and less on "textbook" material. Sure the latter
is also critical, but the pragmatics cannot be ignored.
CSE does a lot and is powerfull pass that does approximately what is
accomplished by multiple passes as described in literature. The
problem is that we don't know how to make it global and/or faster and
we know that it is too slow right now.
A lot of the slowness is due to the "global" parts of its activities. I've
suggested a number of times that they be turned off since they would seem
redundant with GCSE. But when this is tried, it lowers performance, which
certainly suggests that the "complexity" of CSE is worth something.
I am still in the dark. Perhaps it is time to go sleep first and then
continue in arguing. Could you give me some example of code what you
would like to get transfromed?
It's code that I *don't* want to see transformed. For example, if I call
a group of functions and pass each a constant of 100 on a RISC machine where
the first operand is passed in RX, I expect to see a series of insns, each
setting RX to 100. I don't want to see one insn setting a pseudo to 100
and then insns setting RX to that.
> I man extended basic block like:
>
> A
> / \
> B C
>
> That's not what cse.c means by an extended basis block.
CSE will actually follow the jumps, so it should track it.
Yes, but that's not the case I'm talking about: I'm talking about the
extended basic block ase.
It is just pure if-then-else (I didn't draw the join edge)
How? Assuming that B has some other instructions, I will end up with
both, the copy and the branch. Or do I miss something else?
I think we're talking about
if (condition)
A
else
B
This has two jumps.
If I can make A into a NOP, this becomes
if (!condition)
B
which has one jump.