[all-commits] [llvm/llvm-project] 724312: [CaptureTracking] Simplify reachability check (NFCI)

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun May 16 07:14:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7243120198914441c97de04bb6fc9afcc5b80731
      https://github.com/llvm/llvm-project/commit/7243120198914441c97de04bb6fc9afcc5b80731
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-05-16 (Sun, 16 May 2021)

  Changed paths:
    M llvm/lib/Analysis/CaptureTracking.cpp

  Log Message:
  -----------
  [CaptureTracking] Simplify reachability check (NFCI)

This code was re-implementing the same-BB case of
isPotentiallyReachable(). Historically, this was done because
CaptureTracking used additional caching for local dominance
queries. Now that it is no longer needed, the code is effectively
the same as isPotentiallyReachable().

The only difference are extra checks for invoke/phis. These are
misleading checks related to dominance in the value availability
sense that are not relevant for control reachability. The invoke
check was correct but redundant in that invokes are always
terminators, so `I` could never come before the invoke. The phi
check is a matter of interpretation (should an earlier phi node be
considered reachable from a later phi node in the same block?)
but ultimately doesn't matter because phis don't capture anyway.




More information about the All-commits mailing list