llvm-project
21 строка · 888.0 Байт
1; REQUIRES: asserts
2; RUN: opt -passes=count-visits -stats 2>&1 -disable-output < %s | FileCheck %s --check-prefix=ONE
3; RUN: opt -passes='cgscc(count-visits)' -stats 2>&1 -disable-output < %s | FileCheck %s --check-prefix=ONE
4; RUN: opt -passes='cgscc(count-visits,instcombine)' -stats 2>&1 -disable-output < %s | FileCheck %s --check-prefix=TWO
5; RUN: opt -passes='default<O1>' -stats 2>&1 -disable-output < %s | FileCheck %s --check-prefix=PIPELINE
6; RUN: opt -passes='default<O3>' -stats 2>&1 -disable-output < %s | FileCheck %s --check-prefix=PIPELINE
7
8; ONE: 1 count-visits - Max number of times we visited a function
9; TWO: 2 count-visits - Max number of times we visited a function
10; PIPELINE: count-visits - Max number of times we visited a function
11
12define void @f() {
13%a = bitcast ptr @g to ptr
14call void %a()
15ret void
16}
17
18define void @g() {
19call void @f()
20ret void
21}
22