[PATCH] D63152: [FIX] Forces shrink wrapping to consider any memory access as aliasing with the stack

Diogo N. Sampaio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 02:55:14 PDT 2019


dnsampaio added a subscriber: eli.friedman.
dnsampaio added a comment.

Hi @thegameg,
My initial thoughts on how to optimize this was to use alias analysis to check that load and stores for sure do not alias with the stack of the current function. It seems that the current api accepts two memory operands, and then turns them into memory regions. I don't know if it possible, as we might not know the sp value it self, but my idea was to create a function that accepts a memory access and a memory region, which would be set to [SP, SP + stackSize].
In pr42136, @eli.friedman also mentioned that might be quite simple to prove that a load accesses a global variable, as well possible to prove that the address of some particular stack objects doesn't escape (also pointed by @chill) .

We also see some performance regressions in some of our tests, but we believe it is better to first fix the bug, and further think on ways to optimize it.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63152





More information about the llvm-commits mailing list