[PATCH] D69690: [GlobalsAA] Set KnowNothing when nothing is known about a function.

David Chisnall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 3 08:58:47 PST 2019


theraven added a comment.

I think this version of the test case is slightly oversimplified and it would be valid for an optimisation to remove the check.  If there is any address-taken function that may have escaped, then it is not okay to assume that `@llvm.objc.autoreleasePoolPop` will definitely not write to it, but in this case there are no stores to an internal global and so GVN is at liberty to eliminate it entirely.  The fact that it doesn't is a missed optimisation caused by not having sufficient knowledge of  `@llvm.objc.autoreleasePoolPop`.

In the original version of the test case, the miscompile comes from the fact that a `-dealloc` method stores to `deallocCalled`.  The `-dealloc` method is registered with the runtime and is in a data structure that visible to the runtime.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69690





More information about the llvm-commits mailing list