Skip to content

Commit 5d05809

Browse files
committed
Do not inline metadata accessors.
1 parent 2915d3a commit 5d05809

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/IRGen/MetadataRequest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,10 @@ void irgen::emitCacheAccessFunction(IRGenModule &IGM,
14001400
bool isReadNone) {
14011401
assert((cacheStrategy == CacheStrategy::None) == (cacheVariable == nullptr));
14021402
accessor->setDoesNotThrow();
1403+
// Don't inline cache functions, since doing so has little impact on
1404+
// overall performance.
1405+
accessor->addAttribute(llvm::AttributeList::FunctionIndex,
1406+
llvm::Attribute::NoInline);
14031407

14041408
// This function is logically 'readnone': the caller does not need
14051409
// to reason about any side effects or stores it might perform.

0 commit comments

Comments
 (0)