[all-commits] [llvm/llvm-project] 680f63: [Attributor][NFCI] Distinguish optional and requir...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Sat Nov 2 13:33:16 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 680f6380278aa5ce871d912072272b393e53b69d
      https://github.com/llvm/llvm-project/commit/680f6380278aa5ce871d912072272b393e53b69d
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2019-11-02 (Sat, 02 Nov 2019)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/FunctionAttrs/align.ll
    M llvm/test/Transforms/FunctionAttrs/arg_returned.ll
    M llvm/test/Transforms/FunctionAttrs/internal-noalias.ll
    M llvm/test/Transforms/FunctionAttrs/liveness.ll
    M llvm/test/Transforms/FunctionAttrs/nofree-attributor.ll
    M llvm/test/Transforms/FunctionAttrs/nonnull.ll
    M llvm/test/Transforms/FunctionAttrs/read_write_returned_arguments_scc.ll

  Log Message:
  -----------
  [Attributor][NFCI] Distinguish optional and required dependences

Dependences between two abstract attributes SRC and TRG come naturally in
two flavors:
  Either (1) "some" information of SRC is *required* for TRG to derive
  information, or (2) SRC is just an *optional* way for TRG to derive
  information.

While it is not strictly necessary to distinguish these types
explicitly, it can help us to converge faster, in terms of iterations,
and also cut down the number of `AbstractAttribute::update` calls.

As far as I can tell, we only use optional dependences for liveness so
far but that might change in the future. With this change the Attributor
can be informed about the "dependence class" and it will perform
appropriate actions when an Attribute is set to an invalid state, thus
one that cannot be used by others to derive information from.




More information about the All-commits mailing list