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: [tree-ssa] Merge status 2004-05-03


Diego Novillo writes:
 > On Fri, 2004-05-07 at 16:05, Andrew Haley wrote:
 > 
 > > I'm very reluctant to write a whole new gimplifier for Java, or to
 > > start generating a ton of random temporaries in the Java front end.
 > > 
 > Perhaps you could handle MODIFY_EXPR in java's lang_hooks.gimplify expr
 > and do what Java needs. 

Whenever we see a variable in the LHS of a binary operator we have to
copy its value if that variable might be altered by the RHS.

 > Perhaps you could just take (y = 3) out of the expression and
 > return GS_UNHANDLED.

I'm not sure what you mean by that.  We have to be able to handle
converting stuff like

  (y = y * 3) * (y = (y = y * 4) + (y = y * 5))

into (here we go)

  y = y * 3;
  tmp1 = y;
  y = y * 4;
  tmp2 = y;
  y = y * 5;
  y = tmp2 + y;
  y = tmp1 * y;

So, is there a reasonably easy way to generate single-use temporaries
while gimplifying?  Then it's pretty easy.

Andrew.


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