[all-commits] [llvm/llvm-project] acb377: [Attributor] Improve isValidAtPosition (mostly for...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Sun Mar 6 21:39:27 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: acb3773491721c8cc844f12c540b8f811d823f73
      https://github.com/llvm/llvm-project/commit/acb3773491721c8cc844f12c540b8f811d823f73
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
    M llvm/test/Transforms/Attributor/noalias.ll
    M llvm/test/Transforms/Attributor/nonnull.ll
    M llvm/test/Transforms/Attributor/range.ll
    M llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll

  Log Message:
  -----------
  [Attributor] Improve isValidAtPosition (mostly for old PM)

To minimize the test difference between old and new PM we perform some
local dominance check if no dominator tree is available.


  Commit: ad26e199ffb1b9eb8e400b113107617055c0dabf
      https://github.com/llvm/llvm-project/commit/ad26e199ffb1b9eb8e400b113107617055c0dabf
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-03-06 (Sun, 06 Mar 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/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/inalloca.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
    M llvm/test/Transforms/Attributor/align.ll
    M llvm/test/Transforms/Attributor/internal-noalias.ll
    M llvm/test/Transforms/Attributor/value-simplify-gpu.ll

  Log Message:
  -----------
  [Attributor] Use CFG reasoning also for read accesses

With D106397 we used CFG reasoning to filter out writes that will not
interfere with a given load instruction. With this patch we use the
same logic (modulo the reversal in reachability check order) for store
instructions. As an example, we can now proof stores to shared memory
are dead if all the loads of the shared memory are not reachable from
them.


  Commit: eb73af4af4699a6907b32790a0f178302c57d802
      https://github.com/llvm/llvm-project/commit/eb73af4af4699a6907b32790a0f178302c57d802
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-03-06 (Sun, 06 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/ArgumentPromotion/variadic.ll
    M llvm/test/Transforms/Attributor/align.ll
    M llvm/test/Transforms/Attributor/value-simplify-gpu.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll
    M llvm/test/Transforms/OpenMP/spmdization.ll

  Log Message:
  -----------
  [Attributor] Handle undef and null in AAAlignFloating

Both `undef` and `nullptr` are maximally aligned. This is especially
important as we often see `undef` until a proper value has been
identified during simplification.


  Commit: 5af11ec34b7bae731c9cc0d40597f52345e33a94
      https://github.com/llvm/llvm-project/commit/5af11ec34b7bae731c9cc0d40597f52345e33a94
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-03-06 (Sun, 06 Mar 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/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/align.ll
    M llvm/test/Transforms/Attributor/nodelete.ll
    M llvm/test/Transforms/Attributor/value-simplify-gpu.ll
    M llvm/test/Transforms/OpenMP/custom_state_machines.ll

  Log Message:
  -----------
  [Attributor] Determine potentially loaded values through memory

We already look through memory to determine where a value that is stored
might pop up again (potential copies). This patch introduces the other
direction with similar logic. If a value is loaded, we can follow all
the accesses to the pointer (or better object) and try to determine what
value might have been stored.


Compare: https://github.com/llvm/llvm-project/compare/b2497e54356d...5af11ec34b7b


More information about the All-commits mailing list