llvm-project/llvm/test/Transforms/IPConstantProp
Chris Bieneman abdea268c1 [IPSCCP] Remove calls without side effects
Summary:
When performing constant propagation for call instructions we have historically replaced all uses of the return from a call, but not removed the call itself. This is required for correctness if the calls have side effects, however the compiler should be able to safely remove calls that don't have side effects.

This allows the compiler to completely fold away calls to functions that have no side effects if the inputs are constant and the output can be determined at compile time.

Reviewers: davide, sanjoy, bruno, dberlin

Subscribers: llvm-commits

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

llvm-svn: 322125
2018-01-09 21:58:46 +00:00
..
2008-06-09-WeakProp.ll
2009-09-24-byval-ptr.ll
PR16052.ll
PR26044.ll
comdat-ipo.ll
dangling-block-address.ll
deadarg.ll
fp-bc-icmp-const-fold.ll
global.ll
naked-return.ll [IPCP] Don't propagate return value for naked functions. 2017-02-04 19:44:14 +00:00
recursion.ll
remove-call-inst.ll [IPSCCP] Remove calls without side effects 2018-01-09 21:58:46 +00:00
return-argument.ll
return-constant.ll
return-constants.ll
user-with-multiple-uses.ll [IPSCCP] Remove calls without side effects 2018-01-09 21:58:46 +00:00