[PATCH] D113520: [SROA] Spill alloca's around non-capturing escapes via calls to allow alloca partitioning/promotion

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 10:18:54 PST 2021


reames added a comment.

@lebedev.ri Your suggested approach makes sense to me at a basic level.  Forming the alloca is starting to seem more and more like a hack, but we can come back to implementing partial mem2reg as a follow on code improvement.

A couple of suggestions:

- Please leave taint tracking to later patch.  Start with the requirement that the non-escaping call use must also be readonly in that argument.
- Instead of having the cloned alloca be the one kept, have it be the one which gets mem2reged.  That is, duplicate all the uses (except the escaping call) and let the code handle it.  The primary point here is just to keep the naming in the IR more obvious.  :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113520



More information about the llvm-commits mailing list