summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/thinlto-function-summary.ll
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2018-11-14 19:30:13 +0000
committerTeresa Johnson <tejohnson@google.com>2018-11-14 19:30:13 +0000
commit32dc5b9bf134b5a98c1a22395a5cd0ca5c409fe7 (patch)
tree7aea2af71ce5484a6aee0e6ae7a2649cce6c4426 /llvm/test/Bitcode/thinlto-function-summary.ll
parentd84cf1369060349506fa27779e4403174b5f4c9a (diff)
downloadbcm5719-llvm-32dc5b9bf134b5a98c1a22395a5cd0ca5c409fe7.tar.gz
bcm5719-llvm-32dc5b9bf134b5a98c1a22395a5cd0ca5c409fe7.zip
[ThinLTO] Update handling of vararg functions to match inliner
Summary: Previously we marked all vararg functions as non-inlinable in the function summary, which prevented their importing. However, the corresponding inliner restriction was loosened in r321940/r342675 to only apply to functions calling va_start. Adjust the summary flag computation to match. Reviewers: davidxl Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D54270 llvm-svn: 346883
Diffstat (limited to 'llvm/test/Bitcode/thinlto-function-summary.ll')
-rw-r--r--llvm/test/Bitcode/thinlto-function-summary.ll18
1 files changed, 14 insertions, 4 deletions
diff --git a/llvm/test/Bitcode/thinlto-function-summary.ll b/llvm/test/Bitcode/thinlto-function-summary.ll
index 7f59eeabd9c..8563d127ff6 100644
--- a/llvm/test/Bitcode/thinlto-function-summary.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary.ll
@@ -13,18 +13,23 @@
; BC-NEXT: <FUNCTION op0=7 op1=39
; "variadic"
; BC-NEXT: <FUNCTION op0=46 op1=8
+; "llvm.va_start"
+; BC-NEXT: <FUNCTION op0=54 op1=13
; "f"
-; BC-NEXT: <ALIAS op0=54 op1=1
+; BC-NEXT: <ALIAS op0=67 op1=1
; BC: <GLOBALVAL_SUMMARY_BLOCK
; BC-NEXT: <VERSION
; BC-NEXT: <PERMODULE {{.*}} op0=1 op1=0
; BC-NEXT: <PERMODULE {{.*}} op0=2 op1=0
; BC-NEXT: <PERMODULE {{.*}} op0=3 op1=7
-; BC-NEXT: <PERMODULE {{.*}} op0=4 op1=0 op2=1 op3=16
-; BC-NEXT: <ALIAS {{.*}} op0=5 op1=0 op2=3
+; Summary for @variadic has flags (op3) = 16 since non-inlinable owing to
+; va_start call.
+; flag is set due to va_start call.
+; BC-NEXT: <PERMODULE {{.*}} op0=4 op1=0 op2=4 op3=16
+; BC-NEXT: <ALIAS {{.*}} op0=6 op1=0 op2=3
; BC-NEXT: </GLOBALVAL_SUMMARY_BLOCK
; BC: <STRTAB_BLOCK
-; BC-NEXT: blob data = 'hfoobaranon.{{................................}}.0variadicf{{.*}}'
+; BC-NEXT: blob data = 'hfoobaranon.{{................................}}.0variadicllvm.va_startf{{.*}}'
; RUN: opt -name-anon-globals -module-summary < %s | llvm-dis | FileCheck %s
@@ -68,5 +73,10 @@ return: ; preds = %entry
}
define i32 @variadic(...) {
+ %ap = alloca i8*, align 8
+ %ap.0 = bitcast i8** %ap to i8*
+ call void @llvm.va_start(i8* %ap.0)
ret i32 42
}
+
+declare void @llvm.va_start(i8*) nounwind
OpenPOWER on IntegriCloud