aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2012-10-26 00:29:48 +0000
committerQuentin Colombet <qcolombet@apple.com>2012-10-26 00:29:48 +0000
commit9046768d2c7e21a7933c8158664550a866fcdd74 (patch)
treee573c3de93f9a849e645f7f534f60157fc284e53 /lib/CodeGen/CGCall.cpp
parentf0e97dba82a2c3eee716d6032c7a4eb889b01317 (diff)
Oz optimization level sets ForceSizeOpt attribute for each function
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166744 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index b356e640a1..f09332efc6 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -968,6 +968,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
if (CodeGenOpts.OptimizeSize)
FuncAttrs.addAttribute(llvm::Attributes::OptimizeForSize);
+ if (CodeGenOpts.OptimizeSize == 2)
+ FuncAttrs.addAttribute(llvm::Attributes::ForceSizeOpt);
if (CodeGenOpts.DisableRedZone)
FuncAttrs.addAttribute(llvm::Attributes::NoRedZone);
if (CodeGenOpts.NoImplicitFloat)