On Mon, 2014-04-21 at 12:43 -0600, Jeff Law wrote: > On 04/21/14 10:56, David Malcolm wrote: > > gcc/ > > * gimple.h (gimple_assign_single_p): Accept a const_gimple rather > > than a gimple. > > (gimple_store_p): Likewise. > > (gimple_assign_load_p): Likewise. > > (gimple_assign_cast_p): Likewise. > > (gimple_clobber_p): Likewise. > I know you bootstrapped the entire 89 patch series. Generally when we > have a nice little independent patch like this, it should be separately > bootstrapped and tested so that it can go forward independent of > everything else. > > Anyway, this is clearly OK and non-controversial. OK for the trunk. > > In fact, I would consider any const-correctness patch like this to be > pre-approved.
Thanks. It was pointed out to me off-list that this patch series lacks documentation changes. I'm working on fixing that, though am not sure I want to fill everyone inboxes with an updated set of patches yet. Should I send a combined patch for the documentation changes? (I can break it up and merge it into the individual changes on commit, or if these need editing). In any case I fixed up the corresponding entries in gcc/doc/gimple.texi, double-checked the bootstrap/regtest/HTML generation of this one (on top of r209545), and committed it to trunk as r209548. I'm attaching what I actually committed. Dave
Index: gcc/doc/gimple.texi =================================================================== --- gcc/doc/gimple.texi (revision 209547) +++ gcc/doc/gimple.texi (revision 209548) @@ -701,7 +701,7 @@ Return true if the code of g is @code{GIMPLE_DEBUG}. @end deftypefn -@deftypefn {GIMPLE function} bool gimple_assign_cast_p (gimple g) +@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const_gimple g) Return true if g is a @code{GIMPLE_ASSIGN} that performs a type cast operation. @end deftypefn @@ -1102,7 +1102,7 @@ statement @code{G}. @end deftypefn -@deftypefn {GIMPLE function} bool gimple_assign_cast_p (gimple s) +@deftypefn {GIMPLE function} bool gimple_assign_cast_p (const_gimple s) Return true if @code{S} is a type-cast assignment. @end deftypefn Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 209547) +++ gcc/ChangeLog (revision 209548) @@ -1,3 +1,16 @@ +2014-04-21 David Malcolm <dmalc...@redhat.com> + + * gimple.h (gimple_assign_single_p): Accept a const_gimple rather + than a gimple. + (gimple_store_p): Likewise. + (gimple_assign_load_p): Likewise. + (gimple_assign_cast_p): Likewise. + (gimple_clobber_p): Likewise. + + * doc/gimple.texi (gimple_assign_cast_p): Accept a const_gimple + rather than a gimple. + (gimple_assign_cast_p): Likewise. + 2014-04-21 Michael Meissner <meiss...@linux.vnet.ibm.com> PR target/60735 Index: gcc/gimple.h =================================================================== --- gcc/gimple.h (revision 209547) +++ gcc/gimple.h (revision 209548) @@ -2330,7 +2330,7 @@ and do not have the semantics of a copy, such as COND_EXPR. */ static inline bool -gimple_assign_single_p (gimple gs) +gimple_assign_single_p (const_gimple gs) { return (is_gimple_assign (gs) && gimple_assign_rhs_class (gs) == GIMPLE_SINGLE_RHS); @@ -2339,7 +2339,7 @@ /* Return true if GS performs a store to its lhs. */ static inline bool -gimple_store_p (gimple gs) +gimple_store_p (const_gimple gs) { tree lhs = gimple_get_lhs (gs); return lhs && !is_gimple_reg (lhs); @@ -2348,7 +2348,7 @@ /* Return true if GS is an assignment that loads from its rhs1. */ static inline bool -gimple_assign_load_p (gimple gs) +gimple_assign_load_p (const_gimple gs) { tree rhs; if (!gimple_assign_single_p (gs)) @@ -2365,7 +2365,7 @@ /* Return true if S is a type-cast assignment. */ static inline bool -gimple_assign_cast_p (gimple s) +gimple_assign_cast_p (const_gimple s) { if (is_gimple_assign (s)) { @@ -2381,7 +2381,7 @@ /* Return true if S is a clobber statement. */ static inline bool -gimple_clobber_p (gimple s) +gimple_clobber_p (const_gimple s) { return gimple_assign_single_p (s) && TREE_CLOBBER_P (gimple_assign_rhs1 (s));