aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.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/CodeGen/AsmPrinter/CodeViewDebug.cpp
parent4d50879d9c93cdadfd6b0918931907c821d06520 (diff)
downloadllvm-7c711ccf36e0a818f76d711715956ffe831f53b6.zip
llvm-7c711ccf36e0a818f76d711715956ffe831f53b6.tar.gz
llvm-7c711ccf36e0a818f76d711715956ffe831f53b6.tar.bz2
[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/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index 9bce1c4..6693fe4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -1341,8 +1341,8 @@ void CodeViewDebug::beginFunctionImpl(const MachineFunction *MF) {
FPO |= FrameProcedureOptions::SecurityChecks;
FPO |= FrameProcedureOptions(uint32_t(CurFn->EncodedLocalFramePtrReg) << 14U);
FPO |= FrameProcedureOptions(uint32_t(CurFn->EncodedParamFramePtrReg) << 16U);
- if (Asm->TM.getOptLevel() != CodeGenOpt::None && !GV.optForSize() &&
- !GV.hasFnAttribute(Attribute::OptimizeNone))
+ if (Asm->TM.getOptLevel() != CodeGenOpt::None &&
+ !GV.optForSize() && !GV.optForNone())
FPO |= FrameProcedureOptions::OptimizedForSpeed;
// FIXME: Set GuardCfg when it is implemented.
CurFn->FrameProcOpts = FPO;