This is the mail archive of the gcc-patches@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: Linearize COND_EXPRs involving a single SSA_NAME


On Mon, Jul 12, 2004 at 06:27:41PM -0400, Diego Novillo wrote:
> Again.  fold_stmt() has the same problem.  We don't call it when we copy
> propagate.  Perhaps we should, but this is somewhat specialized to
> control flow linearization.

Well, *definitely* do not replicate the logic to do the actual
folding.  At minimum do

  if (TREE_CODE_CLASS (TREE_CODE (cond)) == 'r'
      && TREE_OPERAND (cond, 0) == TREE_OPERAND (cond, 1))
    cond = fold (cond);

at the place you're tweaking things now.


r~


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