[all-commits] [llvm/llvm-project] 96c335: [Attributor] Always ensure the correct AAIsDead ob...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Jan 11 23:49:27 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96c335e2ccf25091f55561bccc7f2f1a1a5f38a5
      https://github.com/llvm/llvm-project/commit/96c335e2ccf25091f55561bccc7f2f1a1a5f38a5
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
    M llvm/test/Transforms/Attributor/align.ll
    M llvm/test/Transforms/Attributor/assumes_info.ll
    M llvm/test/Transforms/Attributor/cgscc_bugs.ll
    M llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
    M llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll
    M llvm/test/Transforms/OpenMP/single_threaded_execution.ll

  Log Message:
  -----------
  [Attributor] Always ensure the correct AAIsDead object is used

Since the Attributor::isAssumedDead lookups can jump between functions
we need to potentially replace a given FnLivenessAA for it to be useful.


  Commit: d7be8227a84f95071911b60d32d751e8780dde12
      https://github.com/llvm/llvm-project/commit/d7be8227a84f95071911b60d32d751e8780dde12
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/align.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll

  Log Message:
  -----------
  [Attributor][FIX] Improve care when dealing with liveness

This patch adds two checks that have in experiments caused issues. One
was an oversight that allowed new AAs during cleanup to be optimistic.
The other treated functions as functions even if they were used as
values, e.g., in a cast instruction. In such cases we might have assumed
the value is dead if the function is not entered, which isn't true.

The new test functions don't expose a bug but I kept them around.


  Commit: 9b7b5482fa01413a96fe79c42c3e67ee6730cf6d
      https://github.com/llvm/llvm-project/commit/9b7b5482fa01413a96fe79c42c3e67ee6730cf6d
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

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

  Log Message:
  -----------
  [Attributor] Allow AAs to iterate on their own state

Future AAs might need to iterate their own state until they reach a
fixpoint. We do not want to forbid that but we want to avoid negative
effects or bugs once this happens. As a precaution, we now rerun an AA
that did not require outside information. If it does not change anymore
we are done, otherwise the AA needs to iterate some more.


Compare: https://github.com/llvm/llvm-project/compare/9a5092b358ce...9b7b5482fa01


More information about the All-commits mailing list