diff options
author | Easwaran Raman <eraman@google.com> | 2016-01-28 23:44:41 +0000 |
---|---|---|
committer | Easwaran Raman <eraman@google.com> | 2016-01-28 23:44:41 +0000 |
commit | 30a93c1848777202c1bbf8ef756b9c5c1a86e19e (patch) | |
tree | bbda0f4718093987c399d1bc21b37e250f914c80 /llvm/test/Transforms/Inline/inline-optsize.ll | |
parent | 494ee5b049f0eabddc2055f337dc4b3b006a6041 (diff) | |
download | bcm5719-llvm-30a93c1848777202c1bbf8ef756b9c5c1a86e19e.tar.gz bcm5719-llvm-30a93c1848777202c1bbf8ef756b9c5c1a86e19e.zip |
Lower inlining threshold when the caller has minsize attribute.
When the caller has optsize attribute, we reduce the inlinining threshold
to OptSizeThreshold (=75) if it is not already lower than that. We don't do
the same for minsize and I suspect it was not intentional. This also addresses
a FIXME regarding checking optsize attribute explicitly instead of using the
right wrapper.
Differential Revision: http://reviews.llvm.org/D16493
llvm-svn: 259120
Diffstat (limited to 'llvm/test/Transforms/Inline/inline-optsize.ll')
-rw-r--r-- | llvm/test/Transforms/Inline/inline-optsize.ll | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/test/Transforms/Inline/inline-optsize.ll b/llvm/test/Transforms/Inline/inline-optsize.ll index b01a1f657f3..7e62245fd3f 100644 --- a/llvm/test/Transforms/Inline/inline-optsize.ll +++ b/llvm/test/Transforms/Inline/inline-optsize.ll @@ -1,5 +1,6 @@ ; RUN: opt -S -Oz < %s | FileCheck %s -check-prefix=OZ ; RUN: opt -S -O2 < %s | FileCheck %s -check-prefix=O2 +; RUN: opt -S -Os < %s | FileCheck %s -check-prefix=OS ; The inline threshold for a function with the optsize attribute is currently ; the same as the global inline threshold for -Os. Check that the optsize @@ -24,10 +25,20 @@ define i32 @inner() { ret i32 %x5 } -; @inner() should be inlined for -O2 but not for -Oz. +; @inner() should be inlined for -O2 and -Os but not for -Oz. ; OZ: call ; O2-NOT: call +; OS-NOT: call define i32 @outer() optsize { %r = call i32 @inner() ret i32 %r } + +; @inner() should not be inlined for -O2, -Os and -Oz. +; OZ: call +; O2: call +; OS: call +define i32 @outer2() minsize { + %r = call i32 @inner() + ret i32 %r +} |