summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorEvandro Menezes <e.menezes@samsung.com>2019-04-03 21:27:03 +0000
committerEvandro Menezes <e.menezes@samsung.com>2019-04-03 21:27:03 +0000
commit7c711ccf36e0a818f76d711715956ffe831f53b6 (patch)
treecfbd36f2d353a8c2eed5a47196fb39821ac5ec1f /llvm/lib/Analysis/InlineCost.cpp
parent4d50879d9c93cdadfd6b0918931907c821d06520 (diff)
downloadbcm5719-llvm-7c711ccf36e0a818f76d711715956ffe831f53b6.tar.gz
bcm5719-llvm-7c711ccf36e0a818f76d711715956ffe831f53b6.zip
[IR] Create new method in `Function` class (NFC)
Create method `optForNone()` testing for the function level equivalent of `-O0` and refactor appropriately. Differential revision: https://reviews.llvm.org/D59852 llvm-svn: 357638
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 574a1b6c841..d1fbfafbe4d 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -2036,7 +2036,7 @@ InlineCost llvm::getInlineCost(
return llvm::InlineCost::getNever("conflicting attributes");
// Don't inline this call if the caller has the optnone attribute.
- if (Caller->hasFnAttribute(Attribute::OptimizeNone))
+ if (Caller->optForNone())
return llvm::InlineCost::getNever("optnone attribute");
// Don't inline a function that treats null pointer as valid into a caller
OpenPOWER on IntegriCloud