blob: 6afbcd466378dd8e33408df92f9ac9a89473cd45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Check -ftime-report/-ftime-report= output
// RUN: %clang_cc1 -emit-obj -O1 \
// RUN: -ftime-report %s -o /dev/null 2>&1 | \
// RUN: FileCheck %s --check-prefixes=TIME,NPM
// RUN: %clang_cc1 -emit-obj -O1 \
// RUN: -ftime-report %s -o /dev/null \
// RUN: -mllvm -info-output-file=%t
// RUN: cat %t | FileCheck %s --check-prefixes=TIME,NPM
// RUN: %clang_cc1 -emit-obj -O1 \
// RUN: -ftime-report=per-pass %s -o /dev/null 2>&1 | \
// RUN: FileCheck %s --check-prefixes=TIME,NPM
// RUN: %clang_cc1 -emit-obj -O1 \
// RUN: -ftime-report=per-pass-run %s -o /dev/null 2>&1 | \
// RUN: FileCheck %s --check-prefixes=TIME,NPM-PER-INVOKE
// RUN: %clang_cc1 -emit-obj -O1 \
// RUN: -ftime-report-json %s -o /dev/null 2>&1 | \
// RUN: FileCheck %s --check-prefixes=JSON
// RUN: %clang_cc1 -emit-obj -O1 \
// RUN: -ftime-report-json %s -o /dev/null \
// RUN: -mllvm -info-output-file=%t
// RUN: cat %t | FileCheck %s --check-prefixes=JSON
// Check that -stats-file-timers only outputs pass time info in the stats file
// and not stderr.
// RUN: %clang_cc1 -emit-obj -O1 \
// RUN: %s -o /dev/null \
// RUN: -stats-file=%t -stats-file-timers 2>&1 | count 0
// RUN: FileCheck %s -input-file=%t -check-prefixes=JSON
// TIME: Pass execution timing report
// TIME: Total Execution Time:
// TIME: Name
// NPM-PER-INVOKE-DAG: InstCombinePass #
// NPM-PER-INVOKE-DAG: InstCombinePass #
// NPM-PER-INVOKE-DAG: InstCombinePass #
// NPM-NOT: InstCombinePass #
// NPM: InstCombinePass{{$}}
// NPM-NOT: InstCombinePass #
// TIME: Total{{$}}
// JSON:{
// JSON: "time.pass.InstCombinePass.wall": {{.*}},
// JSON: "time.pass.InstCombinePass.user": {{.*}},
// JSON: "time.pass.InstCombinePass.sys": {{.*}},
// JSON:}
int foo(int x, int y) { return x + y; }
|