[PATCH] D26382: [BasicAA] Teach BasicAA to handle the inaccessiblememonly and inaccessiblemem_or_argmemonly attributes
Andy Kaylor via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 8 13:26:16 PST 2016
andrew.w.kaylor added a comment.
In https://reviews.llvm.org/D26382#589550, @hfinkel wrote:
> This will work, but we might want a separate tracking state for this (because otherwise we won't be able to infer readonly for any functions with FP operations, which is going to be very unfortunate). We might do this as a later enhancement, however.
I was also thinking that a dedicated attribute for FP environment access would be nice, but I agree that we could add that later, after the rest of this is working.
I thought about the problems with inferring function attributes, and I think the scope of the problem will be fairly limited since we only really care about the FP environment access in cases where we are using the new intrinsics (yet to be introduced) to get non-default behavior. Even though every FP operation does implicitly access the FP environment, the cases where we actually want to model that should be fairly limited and decreased optimization possibilities is an expected outcome.
I have a long term plan to go back and try to restore as many optimizations opportunities as possible for the constrained FP cases, but in the short term I just want to get it working correctly without causing any havoc in the default case.
More information about the llvm-commits