Hello, during a recent discussion, it was pointed to my attention that update_stmt is performance critical. I wondered why; this is the number of update_stmt calls for combine.i (all the other passes have less then 1000 calls):
tree VRP : 17543 (10%) tree copy propagation : 3210 ( 2%) tree alias analysis : 113845 (67%) tree SSA other : 20824 (12%) dominator optimization: 1411 ( 1%) tree split crit edges : 3122 ( 2%) tree FRE : 2060 ( 1%) expand : 5703 ( 3%) TOTAL : 170549 I have a patch that decreases number of update_stmt calls in tree alias analysis to 46525; still, is it really that useful to run pass_may_alias *six* times during compilation? Obviously, we need the initial one, and there are comments after pass_sra and pass_fold_builtins that indicate that the following pass_may_alias cannot be avoided (which seems doubtful to me, at the very least in the later case), but the remaining three seem to be just placed randomly. I also have a patch that decreases the number of update_stmt calls in VRP to 5229 (which is more or less the number of ASSERT_EXPRs it creates, so this cannot be improved significantly). Zdenek