[PATCH] D128583: CodeGen: Remove AliasAnalysis from regalloc

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 12:04:39 PDT 2022


efriedma added a comment.

In D128583#3616215 <https://reviews.llvm.org/D128583#3616215>, @arsenm wrote:

>> In general pointsToConstantMemory doesn't imply the pointer is dereferenceable. But in practice, the cases where that happens are probably pretty obscure (like out-of-bounds references to constant arrays).
>
> Do you think this is worth fixing in a follow on patch? It seems the API requires two separate queries that mostly do the same thing

We probably want the existing semantics of pointsToConstantMemory in most places.  In particular, consider a variable array index into a global constant; pointsToConstantMemory, but it's not necessarily dereferenceable.

I think we should just add the call to isDereferenceableAndAlignedPointer.  (We could come up with a combined API, but I'm not sure it's worth the extra maintenance work...)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128583/new/

https://reviews.llvm.org/D128583



More information about the llvm-commits mailing list