[all-commits] [llvm/llvm-project] 23f41f: [Attributor] Use fine-grained liveness in all helpers

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Feb 12 15:39:42 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 23f41f16d415cdcd9b3f6e7d31aa27caabf844e6
      https://github.com/llvm/llvm-project/commit/23f41f16d415cdcd9b3f6e7d31aa27caabf844e6
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-02-12 (Wed, 12 Feb 2020)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/2008-07-02-array-indexing.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/dbg.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/inalloca.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead.ll
    A llvm/test/Transforms/Attributor/ArgumentPromotion/live_called_from_dead_2.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/reserve-tbaa.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/PR43857.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/recursion.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
    M llvm/test/Transforms/Attributor/dereferenceable-2.ll
    M llvm/test/Transforms/Attributor/internal-noalias.ll
    M llvm/test/Transforms/Attributor/liveness.ll
    A llvm/test/Transforms/Attributor/liveness_chains.ll
    M llvm/test/Transforms/Attributor/misc.ll
    M llvm/test/Transforms/Attributor/nocapture-1.ll
    M llvm/test/Transforms/Attributor/nofree.ll
    M llvm/test/Transforms/Attributor/noreturn.ll
    M llvm/test/Transforms/Attributor/nosync.ll
    M llvm/test/Transforms/Attributor/range.ll
    M llvm/test/Transforms/Attributor/returned.ll
    M llvm/test/Transforms/Attributor/undefined_behavior.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll
    M llvm/test/Transforms/Attributor/willreturn.ll

  Log Message:
  -----------
  [Attributor] Use fine-grained liveness in all helpers

We used coarse-grained liveness before, thus we looked if the
instruction was executed, but we did not use fine-grained liveness,
hence if the instruction was needed or could be deleted even if the
surrounding ones are live. This patches introduces this level of
liveness checks together with other liveness queries, e.g., for uses.

For more control we enforce that all liveness queries go through the
Attributor.

Test have been adjusted to reflect the changes or augmented to prevent
deletion of the parts we want to check.

Reviewed By: sstefan1

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




More information about the All-commits mailing list