[all-commits] [llvm/llvm-project] 4277c1: [Attributor][FIX] Avoid metadata and duplicate rep...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Thu Jun 9 03:03:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4277c1be881b82ed98eb4c873c3a8154ad726986
      https://github.com/llvm/llvm-project/commit/4277c1be881b82ed98eb4c873c3a8154ad726986
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    A llvm/test/Transforms/Attributor/value-simplify-dbg.ll

  Log Message:
  -----------
  [Attributor][FIX] Avoid metadata and duplicate replication assertion

When we recreate instructions as part of simplification we need to take
care of debug metadata and replacing the value multiple times. For now,
we handle both conservatively.


  Commit: 481b8f31dff4101f37c982af9926f34adb6fffc1
      https://github.com/llvm/llvm-project/commit/481b8f31dff4101f37c982af9926f34adb6fffc1
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

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

  Log Message:
  -----------
  [Attributor][NFC] Introduce helper struct

We often use a context associated with a value. For now only one use
case has been changed.


  Commit: 1df6e171c338dddb408a2044506475d0248ba082
      https://github.com/llvm/llvm-project/commit/1df6e171c338dddb408a2044506475d0248ba082
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/range.ll

  Log Message:
  -----------
  [Attributor] Simplify (integer range) state handling

We used to be very conservative when integer states were merged.
Instead of adding the known range (which is large due to uncertainty)
into the assumed range (which is hopefully small), we can also only
allow to merge in both at the same time into their respective
counterpart. This will ensure we keep the invariant that assumed is part
of known.


  Commit: 7a07b88f37c090670daf17b77b6a747cffe6792e
      https://github.com/llvm/llvm-project/commit/7a07b88f37c090670daf17b77b6a747cffe6792e
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

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

  Log Message:
  -----------
  [Attributor][FIX] Replace call site argument uses, not values

We need to be careful replacing values as call site arguments
(IRPosition::IRP_CALL_SITE_ARGUMENT) is representing a use and not a
value. This patch replaces the interface to take a IR position instead
making it harder to misuse accidentally. It does not change our tests
right now but a follow up exposed the potential footgun.


  Commit: 14899bc43d248c940b05d56a9fc065d25cd5d88c
      https://github.com/llvm/llvm-project/commit/14899bc43d248c940b05d56a9fc065d25cd5d88c
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

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

  Log Message:
  -----------
  [Attributor] Generalize interface from ConstantInt to Constant

We can use constant to allow undef and there is no need to force
integers in the API anyway. The user can decide if a non integer
constant is fine or not.


Compare: https://github.com/llvm/llvm-project/compare/d87bfa9ad0af...14899bc43d24


More information about the All-commits mailing list