[PATCH] D76966: [GlobalOpt/GlobalStatus][Mem2Reg] Handle PtrToInt passed as function call operand

Dominic Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 27 19:17:53 PDT 2020


ddcc added a comment.

I'm not quite sure what the intended semantics for `inaccessiblememonly` and `readnone` are here. If a pointer operand is converted to an integer and passed as an argument to a function call, when can that pointer be optimized out? Does that function need to have either attribute, or does it not matter that an integer argument is casted from a pointer? This patch currently assumes that the attribute must still be present on the function (since it can't be set on a non-pointer argument).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76966





More information about the llvm-commits mailing list