[PATCH] D134796: [StackLifetime] More efficient loop for LivenessType::Must

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 00:16:18 PDT 2022


vitalybuka created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
vitalybuka requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

CFG with cycles may requires exactly one additional "while (Changed)"
iteration if to calculate OR on inbound edges. We used this in for ::May
type.

AND loop, like used by ::Must type, can require additionaly loop
iteration for each cycle.

We can switch ::Must to OR logic if we calculate "may be dead" instead
of direct "must be alive" and then convert values to match existing
interface.

Additionaly it fixes correctness in "@cycle" test.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134796

Files:
  llvm/lib/Analysis/StackLifetime.cpp
  llvm/test/Analysis/StackSafetyAnalysis/lifetime.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134796.463448.patch
Type: text/x-patch
Size: 3807 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220928/b845a659/attachment.bin>


More information about the llvm-commits mailing list