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: [patch] fold-const.c: Don't handle ASSERT_EXPR.



On Apr 18, 2005, at 1:42 PM, Kazu Hirata wrote:


Hi Roger,

	PR tree-optimization/21047
	* fold-const.c (fold): Don't handle ASSERT_EXPR.

You're right that this code in fold is dead and should be removed, but wouldn't it be better to also move it to fold_binary, so that it will be triggered if VRP (or anyone) else calls fold with an ASSERT_EXPR. For many tree codes, the transformations in "fold" serve as a form of documentation of their semantics.

Err, ASSERT_EXPR lives only during VRP. Plus (quote from my original message),

  Second, AFAICT, VRP never calls fold on ASSERT_EXPR.  It does call
  on ASSERT_EXPR_COND, but that's just a tcc_comparison, which fold
  handles fine via fold_binary.

So I don't think it's a good idea to just move the dead code.

Could the code become alive any time soon, if so I would move the code.


-- Pinski


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