[PATCH] D101541: BasicAA: Recognize inttoptr as isEscapeSource

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 2 15:05:21 PDT 2021


nlopes accepted this revision.
nlopes added a comment.

There's this comment in isNonEscapingLocalObject:

  // If this is an argument that corresponds to a byval or noalias argument,
  // then it has not escaped before entering the function.  Check if it escapes
  // inside the function.

Which supports this patch. Though this claim doesn't seem very clear to me. e.g. we mark memcpy's arguments with noalias. It's not guaranteed case that the input pointers haven't escaped before. So the exact meaning of noalias is not clear to me.
I've read the C11 standard re restrict, and it is omissive w.r.t. to int2ptr casts. Though I think this patch respects the spirit of the standard. We just need to nail the exact semantics of noalias at some point..
TL;DR: LGTM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101541



More information about the llvm-commits mailing list