This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C identifier lookup speedups, 2/2
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Zack Weinberg <zack at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 14 Apr 2003 15:59:20 -0400
- Subject: Re: C identifier lookup speedups, 2/2
Just to clarify the remaining problem, earlier versions of GCC
accessed the globally variable "v". GCC with your patch and without
optimization patch stuffs "4" into a frame slot and compares against that:
li 0,4
stw 0,56(31)
lwz 0,60(31)
cmpwi 7,0,3
With optimization, the store is optimized away and GCC compares
against garbage in the GPR which would have held the value:
cmpwi 7,0,3
David