Gary Thomas: Code optimization bug in GCC-2.8 & EGCS

Gary Thomas g.thomas@opengroup.org
Tue Feb 3 02:43:00 GMT 1998


On 03-Feb-98 Jeffrey A Law wrote:
> 
>   In message <XFMail.980131073720.g.thomas@opengroup.org>you write:
>   > I spent many days trying to understand the "why" of this.  I believe that
>   > in CSE, follow jumps only works properly if loops have been appropriately
>   > "marked" (which is what fails to happen in JUMP in this case).
> What do you mean by "marked"?
> 
> Are you talking about some field set up by jump?  If so what field?
> 
>>From what I've been able to see the bug is clearly in cse.
> 
> jeff

>From my understanding, 'jump' inserts notes in the RTL to mark
the virtual top and bottom of loops.  It is this code that is not
working in 'jump.c'.  It is trying to find the exit code for the
loop in order to determine the virtual top and it gives up when
the RTL sequence for the exceeds 20 nodes.

When this "VTOP" marker (note) is not present, CSE screws up and
optimizes away some code that occured before the top of the loop.
The problem is clearly with CSE, but can be mitigated by changing
'jump' to look a little harder.  Clearly there is a problem with
CSE, but getting the compiler to generate sane [and similar] code
for both signed and unsigned chars is my desire.  [I don't know
enough about the inards of CSE to fathom why it messes up]


------------------------------------------------------------------------
Gary Thomas                              |
The Open Group / Research Institute      | "Fine wine is a necessity of
2 Avenue de Vignate                      |        life for me"
38610 Gieres - FRANCE                    |
+33 4 76 63 48 74                        |      Thomas Jefferson
email: g.thomas@opengroup.org            |
< http://www.opengroup.org/~gdt >          |
   ... opinions expressed here are mine  |
       and no one else would claim them! |
------------------------------------------------------------------------





More information about the Gcc mailing list