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]

Re: Question re: SSA Aggressive Dead Code Elimination


  In message <87k81yovxn.fsf@cgsoftware.com>you write:
  > The initial removing of the edge isn't strictly wrong, as long as you
  > update the phi nodes accordingly.
I disagree.  Even if the PHI nodes are updated, the resulting code is
still wrong.  Follow the original RTL through the two paths through the
CFG and you'll see there are two values that we can put into r0 at the
end of the CFG.  Either r24 + r27 or just r24.

If we remove either outgoing edge from block #0, then we change the semantics
of the program.  ie, removing the edge is strictly wrong.  The only question
in my mind was which optimization algorithm was incorrect.

  > *or*, you can not have edges in phi nodes, which would also solve the
  > problem, but require a lot more reworking (since we currently *do* use
  > the edge pointers when converting out of SSA, in order to avoid
  > inserting useless copies and whatnot), and lessen the ability of us to
  > optimize the code.
  > In practice, we'd rather have gated SSA than normal SSA. We can do
  > more with it. 
  > But it means a higher level of complexity in our optimizations.
Totally off-base.  Go back and ponder if removal of the edge was strictly
wrong or not again.

jeff


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