[PATCH] D87978: [WIP][Attributor] Adds deduction for the MaxObjSize Attribute

Atmn Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 19 15:55:43 PDT 2020


atmnpatel created this revision.
atmnpatel added reviewers: sstefan1, jdoerfert, baziotis, uenoku, homerdin.
Herald added subscribers: llvm-commits, okura, aaron.ballman, kuter, hiraditya.
Herald added a project: LLVM.
atmnpatel requested review of this revision.
Herald added a subscriber: bbn.

This patch adds deduction for the MaxObjSize attribute in the
Attributor. If an object is globally defined or has been defined with an
`alloca` instruction, it's not resizable and we immediately converge to
the size. For objects that are captured, we assume the pessimistic
fixpoint because the objects may be resized, and we iterate for the
rest.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87978

Files:
  llvm/include/llvm/Transforms/IPO/Attributor.h
  llvm/lib/Transforms/IPO/Attributor.cpp
  llvm/lib/Transforms/IPO/AttributorAttributes.cpp
  llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/crash.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/naked_functions.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/reserve-tbaa.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/tail.ll
  llvm/test/Transforms/Attributor/ArgumentPromotion/variadic.ll
  llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
  llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
  llvm/test/Transforms/Attributor/IPConstantProp/pthreads.ll
  llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
  llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll
  llvm/test/Transforms/Attributor/align.ll
  llvm/test/Transforms/Attributor/callbacks.ll
  llvm/test/Transforms/Attributor/depgraph.ll
  llvm/test/Transforms/Attributor/internal-noalias.ll
  llvm/test/Transforms/Attributor/liveness.ll
  llvm/test/Transforms/Attributor/memory_locations.ll
  llvm/test/Transforms/Attributor/misc.ll
  llvm/test/Transforms/Attributor/misc_crash.ll
  llvm/test/Transforms/Attributor/noalias.ll
  llvm/test/Transforms/Attributor/noreturn_async.ll
  llvm/test/Transforms/Attributor/noreturn_sync.ll
  llvm/test/Transforms/Attributor/nosync.ll
  llvm/test/Transforms/Attributor/noundef.ll
  llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
  llvm/test/Transforms/Attributor/readattrs.ll
  llvm/test/Transforms/Attributor/undefined_behavior.ll
  llvm/test/Transforms/OpenMP/parallel_deletion.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87978.292995.patch
Type: text/x-patch
Size: 280143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200919/61713c6f/attachment-0001.bin>


More information about the llvm-commits mailing list