I have proposed a change to remove the assumption from GlobalsAA that
intrinsics can't read/write global variables. Before this change can
be committed, we need to make sure that all intrinsics that don't
read/write globals have either the IntrNoMem, or the IntrArgMemOnly
I will take care of updating in tree targets, but out of tree code
owners should be aware of this change, so they can update their own
targets accordingly. The optimizer can benefit in other ways from
these properties, so even without this proposal it is a good idea
to add these properties to intrinsics where applicable.
One thing to keep in mind when making these changes, is that unlike the
LLVM IR attributes, IntrNoMem, and IntrArgMemOnly also specify that
an intrinsic will not have any other side effects. If you have an
intrinsic that doesn't read memory, but does have other side effects
you will need to use the IntrHasSideEffects property, which is added
in this patch.