[all-commits] [llvm/llvm-project] aaf5fd: [MemCpyOpt] Add test for unreachable capture (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun May 16 01:50:53 PDT 2021


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

  Changed paths:
    M llvm/test/Transforms/MemCpyOpt/callslot.ll

  Log Message:
  -----------
  [MemCpyOpt] Add test for unreachable capture (NFC)

This is based on the test from D90688, without the argmemonly
attribute. The argmemonly attribute would guaranteed no modref
by itself and the question of captures would not arise in the
first place.


  Commit: 6b8b43e7af3074124e3c9e429e1fb08165799be4
      https://github.com/llvm/llvm-project/commit/6b8b43e7af3074124e3c9e429e1fb08165799be4
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-05-16 (Sun, 16 May 2021)

  Changed paths:
    M llvm/lib/Analysis/CaptureTracking.cpp
    M llvm/test/Transforms/MemCpyOpt/callslot.ll

  Log Message:
  -----------
  [CaptureTracking] Do not check domination

For the CapturesBefore tracker, it is sufficient to check that
I can not reach BeforeHere. This does not necessarily require
that BeforeHere dominates I, it can also occur if the capture
happens on an entirely disjoint path.

This change was previously accepted in D90688, but had to be
reverted due to large compile-time impact in some cases: It
increases the number of reachability queries that are performed.

After recent changes, the compile-time impact is largely mitigated,
so I'm reapplying this patch. The remaining compile-time impact
is largely proportional to changes in code-size.


Compare: https://github.com/llvm/llvm-project/compare/185ce8cdfc7d...6b8b43e7af30


More information about the All-commits mailing list