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]

[PATCH] Add more conditions to fold_build_cleanup_point_expr


I found that the C++ front-end would create a cleanup point expr on a
return expr even if the return expression is known not to throw.
This adds to fold_build_cleanup_point_expr information on when
return expressions really need a cleanup point expression.
This reduces amount of statements allocated for ir.ii (PR 13776)
by more than 5x (412,936 down to 81,816).  I did not measure a speed
increase for this testcase but that could be because I think the
collector only ran once on my machine which has 1G of memory.

OK? Bootstrapped and tested on ppc-darwin with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
	* fold-const.c (fold_build_cleanup_point_expr): For a RETURN_EXPR,
	we only need a cleanup point expression when the expression on the
	left hand side of the MODIFIY_EXPR inside the return has side
	effects.

Attachment: temp.diff.txt
Description: Text document


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