]> granicus.if.org Git - llvm/commit
Invoke GetInlineCost for legality check before inline functions in SampleProfileLoader.
authorDehao Chen <dehao@google.com>
Wed, 13 Sep 2017 21:22:55 +0000 (21:22 +0000)
committerDehao Chen <dehao@google.com>
Wed, 13 Sep 2017 21:22:55 +0000 (21:22 +0000)
commitd47151ab93cb44d2d7f15736833bf3c85fefac02
treee70c59573f5ab7625bc734f0b9bf10c4710ccdec
parent16ffaf8e7612e1738486669df1df2044d2bce414
Invoke GetInlineCost for legality check before inline functions in SampleProfileLoader.

Summary: SampleProfileLoader inlines hot functions if it is inlined in the profiled binary. However, the inline needs to be guarded by legality check, otherwise it could lead to correctness issues.

Reviewers: eraman, davidxl

Reviewed By: eraman

Subscribers: sanjoy, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313195 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/SampleProfile.cpp
test/Transforms/SampleProfile/Inputs/einline.prof
test/Transforms/SampleProfile/early-inline.ll