[PATCH] D117084: [CFLGraph] Change isMallocOrCallocLikeFn to isNoAliasCall now that allocation functions must be marked noalias

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 07:53:32 PST 2022


reames requested changes to this revision.
reames added a comment.
This revision now requires changes to proceed.

I agree with @nikic on the intent of the code.  This can probably be replaced with a check for inaccessiblememonly instead.

The change as implemented is incorrect.  There is no requirement that an noalias call not have other side effects.  Example:
define nolias i8* helper(i64 %size, i8* %unrelated) {

  %res = call i8* malloc(i64 %size)
  store i8 0, i8* %unrelated
  ret %res

}

Thanks for looking at this!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117084



More information about the llvm-commits mailing list