[PATCH] D110368: [AA] Move earliest escape tracking from DSE to AA

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 14:28:59 PDT 2021


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

This is a followup to D109844 <https://reviews.llvm.org/D109844> (and alternative to D109907 <https://reviews.llvm.org/D109907>), which integrates the new "earliest escape" tracking into AliasAnalysis. This is done by replacing the pre-existing context-free capture cache in AAQueryInfo with a replaceable (virtual) object with two implementations: The `SimpleCaptureInfo` implements the previous behavior (check whether object is captured at all), while `EarliestEscapeInfo` implements the new behavior from DSE.

This combines the "earliest escape" analysis with the full power of BasicAA: It subsumes the call handling from D109907 <https://reviews.llvm.org/D109907>, considers a wider range of escape sources, a wider context, and works with AA recursion.

It does come at a slightly higher compile-time cost: http://llvm-compile-time-tracker.com/compare.php?from=1e3c6fc7cb9d2ee6a5328881f95d6643afeadbff&to=23296d5394689e40a0b4376f080cfab18c43442c&stat=instructions (The comparison point would be https://llvm-compile-time-tracker.com/compare.php?from=7faf1285f2c416494aacf7ee13e70e330b2f0540&to=a4964cf36bb0f777d82d6a1025435bbd9f67bc4f&stat=instructions for D109907 <https://reviews.llvm.org/D109907>).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110368

Files:
  llvm/include/llvm/Analysis/AliasAnalysis.h
  llvm/lib/Analysis/AliasAnalysis.cpp
  llvm/lib/Analysis/BasicAliasAnalysis.cpp
  llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
  llvm/test/Transforms/DeadStoreElimination/captures-before-call.ll
  llvm/test/Transforms/DeadStoreElimination/captures-before-load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110368.374669.patch
Type: text/x-patch
Size: 23549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210923/e15ecc49/attachment.bin>


More information about the llvm-commits mailing list