llvm-project/llvm/lib/Transforms
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
..
AggressiveInstCombine Format AggresiveInstCombine.cpp. NFC 2019-01-02 19:51:46 +00:00
Coroutines Fix compiler warning about unused variable [NFC] 2018-12-12 06:33:45 +00:00
Hello cmake: Don't install plugins used for examples or tests 2019-01-14 18:25:35 +00:00
IPO Only promote args when function attributes are compatible 2019-01-16 05:15:31 +00:00
InstCombine [InstCombine]Avoid introduction of unaligned mem access 2019-01-16 04:36:26 +00:00
Instrumentation [SanitizerCoverage] Don't create comdat for interposable functions. 2019-01-15 21:21:01 +00:00
ObjCARC [CallSite removal] Migrate all Alias Analysis APIs to use the newly 2019-01-07 05:42:51 +00:00
Scalar [SimpleLoopUnswitch] Increment stats counter for unswitching switch instruction 2019-01-15 15:08:01 +00:00
Utils treat invoke like call 2019-01-15 21:26:51 +00:00
Vectorize [LoopVectorizer] give more advice in remark about failure to vectorize call 2019-01-12 15:27:15 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00