[all-commits] [llvm/llvm-project] 400fde: [Attributor] Add lightweight version for attribute...

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Aug 5 03:52:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 400fde92963588ae2b618626cb1ac73fd91c7d4d
      https://github.com/llvm/llvm-project/commit/400fde92963588ae2b618626cb1ac73fd91c7d4d
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-08-05 (Sat, 05 Aug 2023)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/nofpclass-round.ll
    M llvm/test/Transforms/FunctionAttrs/argmemonly.ll
    M llvm/test/Transforms/FunctionAttrs/nocapture.ll
    M llvm/test/Transforms/FunctionAttrs/nonnull.ll
    M llvm/test/Transforms/FunctionAttrs/norecurse.ll
    M llvm/test/Transforms/FunctionAttrs/nounwind.ll
    M llvm/test/Transforms/FunctionAttrs/readattrs.ll
    M llvm/test/Transforms/FunctionAttrs/readnone.ll
    M llvm/test/Transforms/FunctionAttrs/willreturn.ll
    M llvm/test/Transforms/FunctionAttrs/writeonly.ll

  Log Message:
  -----------
  [Attributor] Add lightweight version for attribute deduction only.

This patch adds a lightweight instance of Attributor that only deduces
attributes.

This is just an initial version with the goal to have a version that
only focuses on attributes to replace the function-attrs pass.

The initial version has a few open issues pending until default
enablement, the main one probably being compile time. The main
additional functionality this will provide in general is propagating
attributes to call sites.

Open issues:

* compile time
  The current version increase O3 +2.67% and ThinLTO +6.18% when replacing FunctionAttr
   https://llvm-compile-time-tracker.com/compare.php?from=c4bb3e073548cf436d5fa0406e3ae75e94684dec&to=d992630a69c79a2587d736e6a88f448850413bd1&stat=instructions%3Au
   Both are with an additional change to preserve more analysis, like FunctionAttrs CGSCC run.

* some missed attribute inference

Reviewed By: jdoerfert

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




More information about the All-commits mailing list