mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Don't import variadic functions
Summary: This patch adds IsVariadicFunction bit to summary in order to not import variadic functions. Inliner doesn't inline variadic functions because it is hard to reason about it. This one small fix improves Importer by about 16% (going from 86% to 100% of imported functions that are inlined anywhere) on some spec benchmarks like 'int' and others. Reviewers: eraman, mehdi_amini, tejohnson Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D23339 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278432 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -9,13 +9,17 @@
|
||||
; BC-NEXT: <PERMODULE {{.*}} op0=1 op1=0
|
||||
; BC-NEXT: <PERMODULE {{.*}} op0=2 op1=0
|
||||
; BC-NEXT: <PERMODULE {{.*}} op0=3 op1=7
|
||||
; BC-NEXT: <ALIAS {{.*}} op0=4 op1=0 op2=3
|
||||
; BC-NEXT: <PERMODULE {{.*}} op0=4 op1=32
|
||||
; BC-NEXT: <ALIAS {{.*}} op0=5 op1=0 op2=3
|
||||
; BC-NEXT: </GLOBALVAL_SUMMARY_BLOCK
|
||||
; BC-NEXT: <VALUE_SYMTAB
|
||||
; BC-NEXT: <FNENTRY {{.*}} op0=3 {{.*}}> record string = 'anon.
|
||||
; BC-NEXT: <FNENTRY {{.*}} op0=4 {{.*}}> record string = 'variadic'
|
||||
; BC-NEXT: <FNENTRY {{.*}} op0=1 {{.*}}> record string = 'foo'
|
||||
; BC-NEXT: <FNENTRY {{.*}} op0=2 {{.*}}> record string = 'bar'
|
||||
; BC-NEXT: <FNENTRY {{.*}} op0=4 {{.*}}> record string = 'f'
|
||||
; BC-NEXT: <FNENTRY {{.*}} op0=5 {{.*}}> record string = 'f'
|
||||
; BC-NEXT: <ENTRY {{.*}} record string = 'h'
|
||||
; BC-NEXT: <FNENTRY {{.*}} op0=3 {{.*}}> record string = 'anon.
|
||||
|
||||
|
||||
; RUN: opt -name-anon-functions -module-summary < %s | llvm-dis | FileCheck %s
|
||||
; Check that this round-trips correctly.
|
||||
@@ -56,3 +60,7 @@ entry:
|
||||
return: ; preds = %entry
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @variadic(...) {
|
||||
ret i32 42
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user