By the way, the resetting of const/pure flags loop is also executed during profile-useļ¼ but if there is no instrumentation, the reset is unnecessary. The flags are kept until pass_ipa_pure_const fixes them. And because of non-instantaneous ssa update, the fixes are reflected on ssa only after ipa passes finish.
If it is agreed that this is a problem, I will address the conservativeness in a separate patch. Regards, Wei.