[all-commits] [llvm/llvm-project] b8a825: [Attributor] Introduce AAAssumptionInfo to propaga...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Nov 9 14:39:45 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b8a825b4838f96d70488a4def728a47a5eaaf96e
      https://github.com/llvm/llvm-project/commit/b8a825b4838f96d70488a4def728a47a5eaaf96e
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M llvm/include/llvm/IR/Assumptions.h
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/IR/Assumptions.cpp
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    A llvm/test/Transforms/Attributor/assumes_info.ll
    M llvm/test/Transforms/Attributor/depgraph.ll

  Log Message:
  -----------
  [Attributor] Introduce AAAssumptionInfo to propagate assumptions

This patch introduces a new abstract attributor instance that propagates
assumption information from functions. Conceptually, if a function is
only called by functions that have certain assumptions, then we can
apply the same assumptions to that function. This problem is similar to
calculating the dominator set, but the assumptions are merged instead of
nodes.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D111054


  Commit: e52937eba022c78545d7783693f0fb0e56b8cd35
      https://github.com/llvm/llvm-project/commit/e52937eba022c78545d7783693f0fb0e56b8cd35
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/test/Transforms/OpenMP/spmdization.ll

  Log Message:
  -----------
  [OpenMP] Use AAAssumptionInfo to get assumptions in OpenMPOpt

This patch uses the abstract attributor introduced in D111054 to get the
assumption values instead of the `hasAssumption` function. This also
calls it so assumption information should propagate throug the device
where applicabile.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D111445


  Commit: 4b5c3e591d74f0f5810608b45ede58f3d489e14d
      https://github.com/llvm/llvm-project/commit/4b5c3e591d74f0f5810608b45ede58f3d489e14d
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/CodeGen/CGVTables.cpp
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/test/OpenMP/assumes_codegen.cpp
    M clang/test/OpenMP/assumes_include_nvptx.cpp

  Log Message:
  -----------
  [OpenMP] Remove doing assumption propagation in the front end.

This patch removes the assumption propagation that was added in D110655
primarily to get assumption informatino on opaque call sites for
optimizations. The analysis done in D111445 allows us to do this more
intelligently in the back-end.

Depends on D111445

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D111463


Compare: https://github.com/llvm/llvm-project/compare/b7f3a4f4fa14...4b5c3e591d74


More information about the All-commits mailing list