diff options
| author | Teresa Johnson <tejohnson@google.com> | 2018-12-01 05:11:46 +0000 |
|---|---|---|
| committer | Teresa Johnson <tejohnson@google.com> | 2018-12-01 05:11:46 +0000 |
| commit | 5b8ff375c84a57e63a50ed223b1f8896da149a65 (patch) | |
| tree | b9f8450206eb6a78a8c51601ca7ade75916f12a6 /llvm/test/Transforms | |
| parent | 757d296222ae1fa1baa9ca4a0379fab6ace2a612 (diff) | |
| download | bcm5719-llvm-5b8ff375c84a57e63a50ed223b1f8896da149a65.tar.gz bcm5719-llvm-5b8ff375c84a57e63a50ed223b1f8896da149a65.zip | |
[ThinLTO] Allow importing of functions with var args
Summary:
Follow up to D54270, which allowed importing of var args functions
unless they called va_start. As pointed out in the post-commit comments
on that patch, the inliner can handle functions that call va_start in
certain situations as well. Go ahead and enable importing of all var
args functions. Measurements on a large binary show that this increases
imports and binary size by an insignificant amount.
Reviewers: davidxl
Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D54607
llvm-svn: 348068
Diffstat (limited to 'llvm/test/Transforms')
| -rw-r--r-- | llvm/test/Transforms/FunctionImport/funcimport.ll | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/test/Transforms/FunctionImport/funcimport.ll b/llvm/test/Transforms/FunctionImport/funcimport.ll index b905549300a..0d09d94a0fc 100644 --- a/llvm/test/Transforms/FunctionImport/funcimport.ll +++ b/llvm/test/Transforms/FunctionImport/funcimport.ll @@ -110,13 +110,13 @@ declare void @linkoncefunc2(...) #1 ; CHECK-DAG: define available_externally void @variadic_no_va_start(...) !thinlto_src_module !0 { declare void @variadic_no_va_start(...) -; We shouldn't import variadic functions without a va_start, since the inliner -; cannot handle them. -; CHECK-DAG: declare void @variadic_va_start(...) +; We can import variadic functions with a va_start, since the inliner +; can sometimes handle them. +; CHECK-DAG: define available_externally void @variadic_va_start(...) declare void @variadic_va_start(...) ; INSTLIMDEF-DAG: Import globalfunc2 -; INSTLIMDEF-DAG: 14 function-import - Number of functions imported +; INSTLIMDEF-DAG: 15 function-import - Number of functions imported ; INSTLIMDEF-DAG: 4 function-import - Number of global variables imported ; CHECK-DAG: !0 = !{!"{{.*}}/Inputs/funcimport.ll"} @@ -156,7 +156,7 @@ declare void @variadic_va_start(...) ; GUID-DAG: GUID {{.*}} is linkoncefunc ; DUMP: Module [[M1:.*]] imports from 1 module -; DUMP-NEXT: 14 functions imported from [[M2:.*]] +; DUMP-NEXT: 15 functions imported from [[M2:.*]] ; DUMP-NEXT: 4 vars imported from [[M2]] -; DUMP: Imported 14 functions for Module [[M1]] +; DUMP: Imported 15 functions for Module [[M1]] ; DUMP-NEXT: Imported 4 global variables for Module [[M1]] |

