llvm-project/llvm/test/Transforms/FunctionAttrs
Florian Hahn e5822ded56
[FunctionAttrs] Infer argmemonly .
This patch adds initial argmemonly inference, by checking the underlying
objects of locations returned by MemoryLocation.

I think this should cover most cases, except function calls to other
argmemonly functions.

I'm not sure if there's a reason why we don't infer those yet.

Additional argmemonly can improve codegen in some cases. It also makes
it easier to come up with a C reproducer for 7662d1687b (already fixed,
but I'm trying to see if C/C++ fuzzing could help to uncover similar
issues.)

Compile-time impact:
NewPM-O3: +0.01%
NewPM-ReleaseThinLTO: +0.03%
NewPM-ReleaseLTO+g: +0.05%

https://llvm-compile-time-tracker.com/compare.php?from=067c035012fc061ad6378458774ac2df117283c6&to=fe209d4aab5b593bd62d18c0876732ddcca1614d&stat=instructions

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D121415
2022-03-16 10:24:33 +00:00
..
2008-09-03-Mutual.ll
2008-09-03-ReadNone.ll
2008-09-03-ReadOnly.ll
2008-09-13-VolatileRead.ll
2008-12-29-Constant.ll
2009-01-02-LocalStores.ll [funcattrs] Fix a bug in recently introduced writeonly argument inference 2021-12-03 08:57:15 -08:00
2010-10-30-volatile.ll
arg_returned.ll
argmemonly.ll [FunctionAttrs] Infer argmemonly . 2022-03-16 10:24:33 +00:00
assume.ll
atomic.ll [FunctionAttrs] Infer argmemonly . 2022-03-16 10:24:33 +00:00
comdat-ipo.ll
convergent.ll
incompatible_fn_attrs.ll Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
int_sideeffect.ll
invalidate.ll [NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses 2021-11-15 14:44:53 -08:00
naked_functions.ll
nocapture.ll [funcattrs] Consistently treat calling a function pointer as a non-capturing read 2021-12-17 09:02:03 -08:00
nofree-attributor.ll Extend the `uwtable` attribute with unwind table kind 2022-02-14 14:35:02 +00:00
nofree.ll [FunctionAttrs] Infer argmemonly . 2022-03-16 10:24:33 +00:00
nonnull-global.ll
nonnull.ll
norecurse.ll [funcattrs] Infer writeonly argument attribute [part 2] 2022-01-04 09:07:54 -08:00
noreturn.ll [funcattrs] check reachability to improve noreturn 2022-02-14 14:01:59 -08:00
nosync.ll [FunctionAttrs] Infer argmemonly . 2022-03-16 10:24:33 +00:00
nounwind.ll Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
operand-bundles-scc.ll
optnone-simple.ll
optnone.ll Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
out-of-bounds-iterator-bug.ll [funcattrs] Infer access attributes for vararg arguments 2021-12-21 09:34:14 -08:00
read-write-scc.ll
readattrs.ll [funcattrs] Use callsite param attributes from indirect calls when inferring access attributes 2021-12-22 18:21:59 -08:00
readnone.ll
returned.ll
stats.ll [FunctionAttrs] Infer argmemonly . 2022-03-16 10:24:33 +00:00
willreturn-callsites.ll Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
willreturn.ll Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
writeonly.ll [tests] Add coverage of writeonly attribute and operand bundle intersection 2022-01-18 12:08:14 -08:00