[all-commits] [llvm/llvm-project] 1ba292: [Attributor] Be more careful to not disturb the CG...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Sun May 23 21:01:26 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ba2929bb82baa4f3b7e1314f166ef2bd6c5e6d0
      https://github.com/llvm/llvm-project/commit/1ba2929bb82baa4f3b7e1314f166ef2bd6c5e6d0
  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/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll
    M llvm/test/Transforms/Attributor/nodelete.ll
    M llvm/test/Transforms/Attributor/potential.ll
    M llvm/test/Transforms/Attributor/range.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll

  Log Message:
  -----------
  [Attributor] Be more careful to not disturb the CG outside the SCC

We have seen various problems when the call graph was not updated or
the updated did not succeed because it involved functions outside the
SCC. This patch adds assertions and checks to avoid accidentally
changing something outside the SCC that would impact the call graph.
It also prevents us from reanalyzing functions outside the current
SCC which could cause problems on its own. Note that the transformations
we do might cause the CG to be "more precise" but the original one would
always be a super set of the most precise one. Since the call graph is
by nature an approximation, it is good enough to have a super set of all
call edges.


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

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

  Log Message:
  -----------
  [Attributor] Deal with address spaces gracefully

When we do value propagation we need to cast address spaces properly.


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

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.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] Teach AAIsDead about undef values

Not only if the branch or switch condition is dead but also if it is
assumed `undef` we can delay AAIsDead exploration.


  Commit: 6caea8a7fa62112070b465eccb7baa241969266c
      https://github.com/llvm/llvm-project/commit/6caea8a7fa62112070b465eccb7baa241969266c
  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/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
    M llvm/test/Transforms/Attributor/misc_crash.ll
    M llvm/test/Transforms/Attributor/noreturn_async.ll
    M llvm/test/Transforms/Attributor/noreturn_sync.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll

  Log Message:
  -----------
  [Attributor] Introduce a helper do deal with constant type mismatches

If we simplify values we sometimes end up with type mismatches. If the
value is a constant we can often cast it though to still allow
propagation. The logic is now put into a helper and it replaces some
ad hoc things we did before.

This also introduces the AA namespace for abstract attribute related
functions and types.


Compare: https://github.com/llvm/llvm-project/compare/c65bb760df1f...6caea8a7fa62


More information about the All-commits mailing list