[all-commits] [llvm/llvm-project] d33bca: [Attributor] Introduce helpers to judge AAs prior ...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Thu Jun 29 12:33:03 PDT 2023


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

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/test/CodeGen/AMDGPU/uniform-work-group-multistep.ll
    M llvm/test/CodeGen/AMDGPU/uniform-work-group-propagate-attribute.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll
    M llvm/test/Transforms/Attributor/callbacks.ll
    M llvm/test/Transforms/Attributor/chain.ll
    M llvm/test/Transforms/Attributor/liveness.ll
    M llvm/test/Transforms/Attributor/nonnull.ll
    M llvm/test/Transforms/Attributor/openmp_parallel.ll
    M llvm/test/Transforms/Attributor/reduced/aa_execution_domain_wrong_fn.ll
    M llvm/test/Transforms/Attributor/reduced/openmp_opt_constant_type_crash.ll
    M llvm/test/Transforms/Attributor/returned.ll
    M llvm/test/Transforms/OpenMP/attributor_recursion_crash.ll
    M llvm/test/Transforms/OpenMP/custom_state_machines.ll
    M llvm/test/Transforms/OpenMP/custom_state_machines_pre_lto.ll
    M llvm/test/Transforms/OpenMP/deduplication_target.ll
    M llvm/test/Transforms/OpenMP/spmdization.ll
    M llvm/test/Transforms/OpenMP/spmdization_guarding_two_reaching_kernels.ll
    M llvm/test/Transforms/OpenMP/spmdization_no_guarding_two_reaching_kernels.ll

  Log Message:
  -----------
  [Attributor] Introduce helpers to judge AAs prior to creation

This is a partial cleanup to centralize the initialization and update
decisions for AAs. Lifting the burdon and boilerplate on users and
making it harder to accidentally perform unsound deductions.

The two static helpers show how we can lift the decisions to generate an
AA into the Attributor, avoiding trivial AAs that just cost us compile
time and maintenance code (to check for pre-conditions).


  Commit: de88628ab92695a737bb75dbefb1b652d602f9e2
      https://github.com/llvm/llvm-project/commit/de88628ab92695a737bb75dbefb1b652d602f9e2
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

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

  Log Message:
  -----------
  [Attributor][FIX] Ensure AAAssumptionInfo properly reports change

I have no test as I just noticed the wrong change status reported by
update randomly.


  Commit: 1221526681b73c3e99c6e41b5b1cb99ce4b52c69
      https://github.com/llvm/llvm-project/commit/1221526681b73c3e99c6e41b5b1cb99ce4b52c69
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/test/Transforms/Attributor/align.ll
    M llvm/test/Transforms/Attributor/liveness.ll

  Log Message:
  -----------
  [Attributor][FIX] Check AA preconditions

AAs often have preconditions, e.g., that the associated type is a
pointer type. If these do not hold, we do not need to bother creating
the AA. Best case, we invalidate it right away, worst case, we crash or
do something wrong (as happend in the issues below).

Fixes: https://github.com/llvm/llvm-project/issues/63553
Fixes: https://github.com/llvm/llvm-project/issues/63597


Compare: https://github.com/llvm/llvm-project/compare/b9b0ab32f9d0...1221526681b7


More information about the All-commits mailing list