[PATCH] D117000: [LICM] Generalize unwinding check during scalar promotion

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 11 02:23:28 PST 2022


nikic created this revision.
nikic added reviewers: jdoerfert, reames, fhahn, asbirlea.
Herald added subscribers: jeroen.dobbelaere, hiraditya.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This generalizes the unwinding check during scalar promotion with the new semantics from D116998 <https://reviews.llvm.org/D116998>. I've extracted a common isNotVisibleOnUnwind() helper into AliasAnalysis, which handles allocas, byval arguments, sret arguments and noalias calls, as we have a few more places that need basically the same logic (DSE and MemCpyOpt at least). The noalias call case is a bit different from the others, because it also requires that the object is not captured.


https://reviews.llvm.org/D117000

Files:
  llvm/include/llvm/Analysis/AliasAnalysis.h
  llvm/lib/Analysis/AliasAnalysis.cpp
  llvm/lib/Transforms/Scalar/LICM.cpp
  llvm/test/Transforms/LICM/scalar-promote-unwind.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117000.398877.patch
Type: text/x-patch
Size: 7379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220111/fe0039ac/attachment.bin>


More information about the llvm-commits mailing list