summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorYevgeny Rouban <yevgeny.rouban@azul.com>2019-02-01 10:44:43 +0000
committerYevgeny Rouban <yevgeny.rouban@azul.com>2019-02-01 10:44:43 +0000
commit15b17d0a7ccdc150e775df5589ebfb67566854f0 (patch)
treebbe230cabd40dd6ce6f017c800e002a15d09f1f4 /llvm/test
parent212833ce766fb9b747672b249667e0161e52968c (diff)
downloadbcm5719-llvm-15b17d0a7ccdc150e775df5589ebfb67566854f0.tar.gz
bcm5719-llvm-15b17d0a7ccdc150e775df5589ebfb67566854f0.zip
Provide reason messages for unviable inlining
InlineCost's isInlineViable() is changed to return InlineResult instead of bool. This provides messages for failure reasons and allows to get more specific messages for cases where callsites are not viable for inlining. Reviewed By: xbolva00, anemet Differential Revision: https://reviews.llvm.org/D57089 llvm-svn: 352849
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/Inline/inline-remark.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/Inline/inline-remark.ll b/llvm/test/Transforms/Inline/inline-remark.ll
index 402493542dc..bfb78c9ee88 100644
--- a/llvm/test/Transforms/Inline/inline-remark.ll
+++ b/llvm/test/Transforms/Inline/inline-remark.ll
@@ -46,6 +46,16 @@ define void @test2(i8*) {
ret void
}
+;; Test 3 - InlineResult messages come from llvm::isInlineViable()
+define void @test3() {
+; CHECK-LABEL: @test3
+; CHECK-NEXT: call void @test3() [[ATTR4:#[0-9]+]]
+; CHECK-NEXT: ret void
+ call void @test3() alwaysinline
+ ret void
+}
+
; CHECK: attributes [[ATTR1]] = { "inline-remark"="(cost=25, threshold=0)" }
; CHECK: attributes [[ATTR2]] = { "inline-remark"="(cost=never): recursive" }
; CHECK: attributes [[ATTR3]] = { "inline-remark"="unsupported operand bundle; (cost={{.*}}, threshold={{.*}})" }
+; CHECK: attributes [[ATTR4]] = { alwaysinline "inline-remark"="(cost=never): recursive call" }
OpenPOWER on IntegriCloud