[all-commits] [llvm/llvm-project] 8387d7: [Attributor][NFC] Rerun update_test_checks script ...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Sun May 23 20:08:44 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8387d74c20776631179e2c45763681b705815af6
      https://github.com/llvm/llvm-project/commit/8387d74c20776631179e2c45763681b705815af6
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-05-23 (Sun, 23 May 2021)

  Changed paths:
    M llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll

  Log Message:
  -----------
  [Attributor][NFC] Rerun update_test_checks script on Attributor tests


  Commit: cb511531b9249b62a1488f61d1e0861680d8ae34
      https://github.com/llvm/llvm-project/commit/cb511531b9249b62a1488f61d1e0861680d8ae34
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-05-23 (Sun, 23 May 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp

  Log Message:
  -----------
  [Attributor][NFC] Clang format the Attributor source files


  Commit: 2bc51d39db7a997af24776fbef3c0d552aa91ef8
      https://github.com/llvm/llvm-project/commit/2bc51d39db7a997af24776fbef3c0d552aa91ef8
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-05-23 (Sun, 23 May 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp

  Log Message:
  -----------
  [Attributor][NFC] Add helpful debug outputs


  Commit: 9098fc9f427fcc61c37903646e5e09f59a708fd5
      https://github.com/llvm/llvm-project/commit/9098fc9f427fcc61c37903646e5e09f59a708fd5
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-05-23 (Sun, 23 May 2021)

  Changed paths:
    M llvm/test/Transforms/Attributor/value-simplify.ll

  Log Message:
  -----------
  [Attributor][NFC] Precommit test case with branch on undef

This test exposes a bug in the module pass as it simplifies ipccp4 to
unreachable, which is unfortunately wrong.


  Commit: 5cdc29f7958263b754908ca0bd69be802e1f42f3
      https://github.com/llvm/llvm-project/commit/5cdc29f7958263b754908ca0bd69be802e1f42f3
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-05-23 (Sun, 23 May 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/potential.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll

  Log Message:
  -----------
  [Attributor][FIX] Ensure we replace undef if we see the first "real" value

The state of AAPotentialValues tracks if undef is contained. It should
fold undef into the first non-undef value. However we missed a case
before. There was also a shadowing definition of two variables that
caused trouble. The test exposes both problems.


  Commit: e93ac1e2de66e8feae3cec3b6c0707b14c79dfeb
      https://github.com/llvm/llvm-project/commit/e93ac1e2de66e8feae3cec3b6c0707b14c79dfeb
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-05-23 (Sun, 23 May 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/IPConstantProp/PR43857.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll
    M llvm/test/Transforms/Attributor/memory_locations.ll
    M llvm/test/Transforms/Attributor/nodelete.ll
    M llvm/test/Transforms/Attributor/nonnull.ll
    M llvm/test/Transforms/Attributor/undefined_behavior.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll

  Log Message:
  -----------
  [Attributor][FIX] Account for undef in the constant value lattice

The constant value lattice looks like this

```
  <None>
     |
  <undef>
  /  |   \
... <0>  ...
 \   |   /
 <unknown>
```
We did not account for the undef and assumed a value meant we could not
change anymore. Now we actually check if we have the same value as
before, which will signal CHANGED to the users when we go from undef to
a specific constant.

This fixes, among other things, the bug exposed by @ipccp4 in
`value-simplify.ll`.


Compare: https://github.com/llvm/llvm-project/compare/99d45ed22fd9...e93ac1e2de66


More information about the All-commits mailing list