mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
6bb8eae995
This class allows to see the inliner's decisions for better optimization verifications and tests. To use, use flag "-passes="print<inline-cost>"". This is the second attempt to integrate the patch. The problem from the first try has been discussed and fixed in D82205. Reviewers: apilipenko, mtrofin, davidxl, fedor.sergeev Reviewed By: mtrofin Differential revision: https://reviews.llvm.org/D81743
33 lines
1.2 KiB
LLVM
33 lines
1.2 KiB
LLVM
; RUN: opt < %s -passes="print<inline-cost>" 2>&1 | FileCheck %s
|
|
|
|
; CHECK: Analyzing call of foo... (caller:main)
|
|
; CHECK: define i8 addrspace(1)** @foo() {
|
|
; CHECK: cost before = {{.*}}, cost after = {{.*}}, threshold before = {{.*}}, threshold after = {{.*}}, cost delta = {{.*}}
|
|
; CHECK: %1 = inttoptr i64 754974720 to i8 addrspace(1)**
|
|
; CHECK: cost before = {{.*}}, cost after = {{.*}}, threshold before = {{.*}}, threshold after = {{.*}}, cost delta = {{.*}}
|
|
; CHECK: ret i8 addrspace(1)** %1
|
|
; CHECK: }
|
|
; CHECK: NumConstantArgs: {{.*}}
|
|
; CHECK: NumConstantOffsetPtrArgs: {{.*}}
|
|
; CHECK: NumAllocaArgs: {{.*}}
|
|
; CHECK: NumConstantPtrCmps: {{.*}}
|
|
; CHECK: NumConstantPtrDiffs: {{.*}}
|
|
; CHECK: NumInstructionsSimplified: {{.*}}
|
|
; CHECK: NumInstructions: {{.*}}
|
|
; CHECK: SROACostSavings: {{.*}}
|
|
; CHECK: SROACostSavingsLost: {{.*}}
|
|
; CHECK: LoadEliminationCost: {{.*}}
|
|
; CHECK: ContainsNoDuplicateCall: {{.*}}
|
|
; CHECK: Cost: {{.*}}
|
|
; CHECK: Threshold: {{.*}}
|
|
|
|
define i8 addrspace(1)** @foo() {
|
|
%1 = inttoptr i64 754974720 to i8 addrspace(1)**
|
|
ret i8 addrspace(1)** %1
|
|
}
|
|
|
|
define i8 addrspace(1)** @main() {
|
|
%1 = call i8 addrspace(1)** @foo()
|
|
ret i8 addrspace(1)** %1
|
|
}
|