diff options
author | dim <dim@FreeBSD.org> | 2012-10-24 16:39:49 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-10-24 16:39:49 +0000 |
commit | fa013d15544fcdb266f9b2235cff076ae1d55add (patch) | |
tree | 6b2c4e839e7df72f56fd18c47b386e47460ca824 /sys/conf/files | |
parent | 9646dc996871d7bd2fc856c70f45a88ffeccc30e (diff) | |
download | FreeBSD-src-fa013d15544fcdb266f9b2235cff076ae1d55add.zip FreeBSD-src-fa013d15544fcdb266f9b2235cff076ae1d55add.tar.gz |
Pull in r165367 from upstream llvm trunk:
Make sure always-inline functions get inlined. <rdar://problem/12423986>
Without this change, when the estimated cost for inlining a function with
an "alwaysinline" attribute was lower than the inlining threshold, the
getInlineCost function was returning that estimated cost rather than the
special InlineCost::AlwaysInlineCost value. That is fine in the normal
inlining case, but it can fail when the inliner considers the opportunity
cost of inlining into an internal or linkonce-odr function. It may decide
not to inline the always-inline function in that case. The fix here is just
to make getInlineCost always return the special value for always-inline
functions. I ran into this building clang with libc++. Tablegen failed to
link because of an always-inline function that was not inlined. I have been
unable to reduce the testcase down to a reasonable size.
This should fix the link errors that were reported when atf-run was
compiled with clang -stdlib=libc++. In this case, at -O3 optimization,
some calls to basic_ios::clear() were not inlined, even when the
function was marked __always_inline__.
Reported by: Jan Beich <jbeich@tormail.org>
MFC after: 1 week
Diffstat (limited to 'sys/conf/files')
0 files changed, 0 insertions, 0 deletions