[PATCH] D103858: [Attributor][FIX] Traverse uses even if a value is assumed constant

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 7 16:56:43 PDT 2021


jdoerfert created this revision.
jdoerfert added reviewers: homerdin, kuter, sstefan1, uenoku, baziotis.
Herald added subscribers: ormris, okura, bollu, hiraditya.
jdoerfert requested review of this revision.
Herald added a subscriber: bbn.
Herald added a project: LLVM.

Not all attributes are able to handle the interprocedural step and
follow the uses into a call site. Let them be able to combine call site
uses instead. This might result in some unused values/arguments being
leftover but it removes problems where we misused "is dead" even though
it was actually "is simplified/replaced".

We explicitly check for dead values due to constant propagation in
`AAIsDeadValueImpl::areAllUsesAssumedDead` instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103858

Files:
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/lib/Transforms/IPO/AttributorAttributes.cpp
  llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/fp80.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/dangling-block-address.ll
  llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll
  llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
  llvm/test/Transforms/Attributor/align.ll
  llvm/test/Transforms/Attributor/depgraph.ll
  llvm/test/Transforms/Attributor/internal-noalias.ll
  llvm/test/Transforms/Attributor/internalize.ll
  llvm/test/Transforms/Attributor/liveness.ll
  llvm/test/Transforms/Attributor/memory_locations.ll
  llvm/test/Transforms/Attributor/nodelete.ll
  llvm/test/Transforms/Attributor/nonnull.ll
  llvm/test/Transforms/Attributor/norecurse.ll
  llvm/test/Transforms/Attributor/noundef.ll
  llvm/test/Transforms/Attributor/range.ll
  llvm/test/Transforms/Attributor/value-simplify.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103858.350452.patch
Type: text/x-patch
Size: 197014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210607/955af85b/attachment-0001.bin>


More information about the llvm-commits mailing list