[PATCH] D77421: [WPD] Avoid noalias assumptions in unique return value optimization

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 16:49:09 PDT 2020


inglorion added a comment.

@dblaikie: My understanding is that LLVM reserves the right to assume that distinct globals never alias and optimize based on that (e.g. as mentioned under https://releases.llvm.org/10.0.0/docs/AliasAnalysis.html#the-basicaa-pass), and that declaring globals as zero-sized is the accepted way to avoid that (e.g. as mentioned in https://bugs.llvm.org/show_bug.cgi?id=31675#c5).

So it's not so much improperly applied TBAA as it is an assumption that LLVM allows itself to make regardless of type, with a special exception for zero-sized types.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77421





More information about the llvm-commits mailing list