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
|
// 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
// 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; }
|