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: gcse pass: expression hash table


On Thu, 2005-02-24 at 12:55, Tarun Kawatra wrote:
> You are write here that if some expr doesn't get into hash table, it will 
> not get optimized.

That was an assumption on my part.  You shouldn't take it as the literal
truth.  I'm not an expert on all implementation details of the gcse.c
pass.

>  But since plus expressions on x86 also clobber CC as 
> shown below
> then why the same reasoning does not apply to plus expressions. Why will 
> there insertion later will not create any problems?

Obviously, plus expressions will have the same problem.  That is why I
question whether plus expressions are properly getting optimized.  

Since you haven't provided any example that shows that they are being
optimized, or pointed me at anything in the gcse.c file I can look at,
there isn't anything more I can do to help you.  All I can do is tell
you that you need to give more details, or debug the problem yourself.

> Actually I am trying to extend PRE implementation so that it performs 
> strength reduction as well. it requires multiplication expressions to get 
> into hash table.

Current sources have a higher level intermediate language (gimple) and
SSA based optimization passes that operate on them.  This includes a
tree-ssa-pre.c pass.  It might be more useful to extend this to do
strength reduction that to try to extend the RTL gcse pass.

> I am debugging the code to find where the differences for the two kind of 
> expressions occur.
> Will let you all know if I found anything interesting. 

Good.

> If you know this already please share with me.

It is unlikely that anyone already knows this info offhand.
-- 
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]