[all-commits] [llvm/llvm-project] 01f3e2: [StackLifetime] More efficient loop for LivenessTy...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Wed Sep 28 16:29:10 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 01f3e2d6197829486622a440acca83786d52fc85
      https://github.com/llvm/llvm-project/commit/01f3e2d6197829486622a440acca83786d52fc85
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2022-09-28 (Wed, 28 Sep 2022)

  Changed paths:
    M llvm/lib/Analysis/StackLifetime.cpp
    M llvm/test/Analysis/StackSafetyAnalysis/lifetime.ll

  Log Message:
  -----------
  [StackLifetime] More efficient loop for LivenessType::Must

CFG with cycles may requires additional passes of "while (Changed)"
iteration if to propagate data back from latter blocks to earlier blocks,
ordered according to depth_fist.

OR logic, used for ::May, converge to stable state faster then AND logic
use for ::Must.

Though the better solution is to switch to some some form of queue, but
having that this one is good enough, I will consider to do that later.

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.

Additionally it fixes correctness in "@cycle" test.

Reviewed By: kstoimenov, fmayer

Differential Revision: https://reviews.llvm.org/D134796




More information about the All-commits mailing list