[all-commits] [llvm/llvm-project] f8ff51: [Inliner] Add tests for not propagating `writable`...

goldsteinn via All-commits all-commits at lists.llvm.org
Fri May 3 12:10:58 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8ff51e1b08643b23f90e1a39c3fb55a23d2dc84
      https://github.com/llvm/llvm-project/commit/f8ff51e1b08643b23f90e1a39c3fb55a23d2dc84
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
    M llvm/test/Transforms/Inline/access-attributes-prop.ll

  Log Message:
  -----------
  [Inliner] Add tests for not propagating `writable` if `readonly` is present; NFC


  Commit: 285dbed147e243f416b003e150d67ffb0922ff16
      https://github.com/llvm/llvm-project/commit/285dbed147e243f416b003e150d67ffb0922ff16
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/InlineFunction.cpp
    M llvm/test/Transforms/Inline/access-attributes-prop.ll
    M llvm/test/Transforms/Inline/noalias-calls-always.ll
    M llvm/test/Transforms/Inline/noalias-calls.ll

  Log Message:
  -----------
  [Inliner] Propagate callee argument memory access attributes before inlining

To avoid losing information, we can propagate some access attribute
from the to-be-inlined callee to its callsites.

We can propagate argument memory access attributes to callsite
parameters if they are from the same underlying object.

Closes #89024


  Commit: d8428dfeb8d9a0bbb5345f96f29a4a66eb950769
      https://github.com/llvm/llvm-project/commit/d8428dfeb8d9a0bbb5345f96f29a4a66eb950769
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
    M llvm/include/llvm/IR/PatternMatch.h
    M llvm/unittests/IR/PatternMatch.cpp

  Log Message:
  -----------
  [PatternMatching] Add generic API for matching constants using custom conditions

The new API is:
    `m_CheckedInt(Lambda)`/`m_CheckedFp(Lambda)`
        - Matches non-undef constants s.t `Lambda(ele)` is true for all
          elements.
    `m_CheckedIntAllowUndef(Lambda)`/`m_CheckedFpAllowUndef(Lambda)`
        - Matches constants/undef s.t `Lambda(ele)` is true for all
          elements.

The goal with these is to be able to replace the common usage of:
```
    match(X, m_APInt(C)) && CustomCheck(C)
```
with
```
    match(X, m_CheckedInt(C, CustomChecks);
```

The rationale if we often ignore non-splat vectors because there are
no good APIs to handle them with and its not worth increasing code
complexity for such cases.

The hope is the API creates a common method handling
scalars/splat-vecs/non-splat-vecs to essentially make this a
non-issue.


  Commit: 1708788d2d1091d1663cd859c5913121463a6b73
      https://github.com/llvm/llvm-project/commit/1708788d2d1091d1663cd859c5913121463a6b73
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
    M llvm/test/Transforms/InstCombine/icmp-div-constant.ll

  Log Message:
  -----------
  [InstCombine] Add non-splat test for `(icmp (lshr x, y), x)`; NFC


  Commit: f561daf989cfe011dd0edafc4621fac5ed421435
      https://github.com/llvm/llvm-project/commit/f561daf989cfe011dd0edafc4621fac5ed421435
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2024-05-03 (Fri, 03 May 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Transforms/InstCombine/icmp-div-constant.ll

  Log Message:
  -----------
  [InstCombine] Add example usage for new Checked matcher API

There is no real motivation for this change other than to highlight a
case where the new `Checked` matcher API can handle non-splat-vecs
without increasing code complexity.

Closes #85676


Compare: https://github.com/llvm/llvm-project/compare/70b79a9ccd03...f561daf989cf

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list