diff options
author | Evandro Menezes <e.menezes@samsung.com> | 2019-04-03 21:27:03 +0000 |
---|---|---|
committer | Evandro Menezes <e.menezes@samsung.com> | 2019-04-03 21:27:03 +0000 |
commit | 7c711ccf36e0a818f76d711715956ffe831f53b6 (patch) | |
tree | cfbd36f2d353a8c2eed5a47196fb39821ac5ec1f /llvm/lib/Analysis/GlobalsModRef.cpp | |
parent | 4d50879d9c93cdadfd6b0918931907c821d06520 (diff) | |
download | bcm5719-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/GlobalsModRef.cpp')
-rw-r--r-- | llvm/lib/Analysis/GlobalsModRef.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/GlobalsModRef.cpp b/llvm/lib/Analysis/GlobalsModRef.cpp index c6f54c208a6..2ded6be4ba4 100644 --- a/llvm/lib/Analysis/GlobalsModRef.cpp +++ b/llvm/lib/Analysis/GlobalsModRef.cpp @@ -513,7 +513,7 @@ void GlobalsAAResult::AnalyzeCallGraph(CallGraph &CG, Module &M) { break; } - if (F->isDeclaration() || F->hasFnAttribute(Attribute::OptimizeNone)) { + if (F->isDeclaration() || F->optForNone()) { // Try to get mod/ref behaviour from function attributes. if (F->doesNotAccessMemory()) { // Can't do better than that! @@ -566,7 +566,7 @@ void GlobalsAAResult::AnalyzeCallGraph(CallGraph &CG, Module &M) { // Don't prove any properties based on the implementation of an optnone // function. Function attributes were already used as a best approximation // above. - if (Node->getFunction()->hasFnAttribute(Attribute::OptimizeNone)) + if (Node->getFunction()->optForNone()) continue; for (Instruction &I : instructions(Node->getFunction())) { |