[PATCH] D116728: [LICM] Check for noalias call instead of alloc like fn

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 05:32:13 PST 2022


nikic added a comment.

@aganea Thanks. I've looked into this, and believe the DSE optimization is correct -- the issue is an incorrect noalias annotation in https://github.com/llvm/llvm-project/blob/cd0a923b4c0c96d687303848dc1aaf39b5fe985f/llvm/include/llvm/Support/Allocator.h#L144. The BumpPtrAllocator returns memory that is already otherwise accessible to LLVM, which violates the noalias contract. It only becomes an actual issue in conjunction with DestroyAll in SpecificBumpPtrAllocator, which will scan over all allocations, and thus end up accessing the allocation through a pointer not based on the noalias return value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116728



More information about the llvm-commits mailing list