[PATCH] D73313: [Attributor] Use fine-grained liveness in all helpers

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 17:01:04 PST 2020


jdoerfert created this revision.
jdoerfert added reviewers: uenoku, sstefan1, baziotis.
Herald added subscribers: jfb, arphaman, bollu, hiraditya.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73313

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73313.240062.patch
Type: text/x-patch
Size: 70284 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200124/ed68b97d/attachment-0001.bin>


More information about the llvm-commits mailing list