llvm-project/llvm/test/Transforms/ArgumentPromotion
Tom Stellard 3d36e5c3e6 Only promote args when function attributes are compatible
Summary:
Check to make sure that the caller and the callee have compatible
function arguments before promoting arguments.  This uses the same
TargetTransformInfo queries that are used to determine if attributes
are compatible for inlining.

The goal here is to avoid breaking ABI when a called function's ABI
depends on a target feature that is not enabled in the caller.

This is a very conservative fix for PR37358.  Ideally we would have a more
sophisticated check for ABI compatiblity rather than checking if the
attributes are compatible for inlining.

Reviewers: echristo, chandlerc, eli.friedman, craig.topper

Reviewed By: echristo, chandlerc

Subscribers: nikic, xbolva00, rkruppe, alexcrichton, llvm-commits

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

llvm-svn: 351296
2019-01-16 05:15:31 +00:00
..
X86 Only promote args when function attributes are compatible 2019-01-16 05:15:31 +00:00
2008-02-01-ReturnAttrs.ll
2008-07-02-array-indexing.ll
2008-09-07-CGUpdate.ll
2008-09-08-CGUpdateSelfEdge.ll
aggregate-promote.ll
attrs.ll
basictest.ll
byval-2.ll
byval.ll
chained.ll
control-flow.ll
control-flow2.ll
crash.ll
dbg.ll
fp80.ll
inalloca.ll
musttail.ll [ArgumentPromotion] don't break musttail invariant PR36543 2018-03-02 00:59:27 +00:00
naked_functions.ll
nonzero-address-spaces.ll [IPO][AVR] Create new Functions in the default address space specified in the data layout 2018-12-18 09:52:52 +00:00
pr3085.ll
pr27568.ll
pr32917.ll
pr33641_remove_arg_dbgvalue.ll
profile.ll
reserve-tbaa.ll
sret.ll
tail.ll
variadic.ll