This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PRE in GCC-3.3.3


Rajesh Babu wrote:
The target I used is i686-linux. For the same example gcc-3.4.1 eliminated the redundant expression, where as gcc-3.3.3 didn't do it. I observed it by dumping RTL with -dG switch. I didnt get abt the flaw you were talking about. The optimization is done on the pseudo registers, where is the question of forcing into memory there.

Your example has
int c, d;
d = c++
which is both a use of c while uninitialized, and a set of c to an uninitialized value.


The rest of this isn't very interesting, as gcc-3.3 is way too old to be looking at optimizations. Looking at the RTL, I don't see the optimization being performed in gcc-3.4. I still see two adds for c. But since it already works in mainline I don't care.

By the way, x86 is not a good target to use for looking at gcse performance, because of all of the condition code clobbers, which make it difficult for gcse to move instructions around. It will only eliminate a redundant add if it can convert it to a leal instruction which does not clobber the condition code register.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]