http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50557

--- Comment #5 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-09-30 
14:30:56 UTC ---
Reassociation isn't doing anything untoward here that raises register pressure.
 The problem must be occurring downstream.  Likely the scheduler is making a
different decision that leads to more pressure.

Block 9 contains the following prior to reassociation:

  D.3497_48 = D.3496_47 + D.3475_117;
  t_50 = D.3497_48 + D.3493_44;

Reassociation changes this to:

  D.3497_48 = D.3493_44 + D.3496_47;
  t_50 = D.3497_48 + D.3475_117;

This extends the lifetime of D.3475_117 but shortens the lifetime of D.3493_44,
both of which go dead here.  Register pressure is not raised at any point. 
There are no further changes to this code in the rest of the tree-SSA phases.

Based on this, I don't see any reason to adjust the reassociation algorithm. 
Someone with some expertise in RTL phases could look into what happens later on
to cause the additional pressure, but I don't see this as a tree-optimization
issue.

Reply via email to