This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: About the is_gimple_min_invariant predicate
> Sure, but CONST isn't specified.
OK, but if it's a formal predicate you cannot do what you want because of the
rest of the grammar that is "implemented" by the GIMPLE verifier.
For example &A[C + 1] and &A[C], where A is static and C is a constant
identifier, have the same degree of constness, but the former is probably
not GIMPLE since the verifier will choke on it.
> Simply restricting it to "real" constants might pessimize optimization
> (though it also simplifies code to not having to special case
> non-constants).
Right. I guess that most consumers expect is_gimple_min_invariant to mean
"minimal invariant in GIMPLE form". I'll try to come up with the maximally
valid predicate implementing this for ADDR_EXPR expressions.
Thanks for your feedback.
--
Eric Botcazou