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/RegionPass.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/RegionPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/RegionPass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/RegionPass.cpp b/llvm/lib/Analysis/RegionPass.cpp index f2bb1044abd..ea117eaee1c 100644 --- a/llvm/lib/Analysis/RegionPass.cpp +++ b/llvm/lib/Analysis/RegionPass.cpp @@ -288,7 +288,7 @@ bool RegionPass::skipRegion(Region &R) const { if (Gate.isEnabled() && !Gate.shouldRunPass(this, getDescription(R))) return true; - if (F.hasFnAttribute(Attribute::OptimizeNone)) { + if (F.optForNone()) { // Report this only once per function. if (R.getEntry() == &F.getEntryBlock()) LLVM_DEBUG(dbgs() << "Skipping pass '" << getPassName() |