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]

Re: [PATCH] Kill TREE_INVARIANT, take 2



+static bool
+tree_invariant_p (tree t)
+{
+  tree inner = skip_simple_arithmetic (t);
+  return tree_invariant_p_1 (inner);
+}

Should tree_invariant_p just handle the recursion directly? For example, if "a" and "b" are both invariant, then so is "a + b".

Actually skip_simple_arithmetic handless this nicely. I didn't do full recursion in tree_invariant_p because Ada uses s_s_a.


I think this should be "decl_address_invariant_p". Otherwise, it sounds like the declaration's value is invariant, when, in fact, it's the address.

Ok.


Paolo


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