diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/CodeGen/opt-record-MIR.c | 11 | ||||
-rw-r--r-- | clang/test/CodeGen/opt-record.c | 5 | ||||
-rw-r--r-- | clang/test/Driver/darwin-ld.c | 4 | ||||
-rw-r--r-- | clang/test/Driver/opt-record.c | 9 |
4 files changed, 25 insertions, 4 deletions
diff --git a/clang/test/CodeGen/opt-record-MIR.c b/clang/test/CodeGen/opt-record-MIR.c index 37239281e9e..f9b4e745805 100644 --- a/clang/test/CodeGen/opt-record-MIR.c +++ b/clang/test/CodeGen/opt-record-MIR.c @@ -3,6 +3,8 @@ // RUN: %clang_cc1 -triple arm64-apple-ios -S -o /dev/null %s -O2 -dwarf-column-info 2>&1 | FileCheck -allow-empty -check-prefix=NO_REMARK %s // RUN: %clang_cc1 -triple arm64-apple-ios -S -o /dev/null %s -O2 -dwarf-column-info -opt-record-file %t.yaml // RUN: cat %t.yaml | FileCheck -check-prefix=YAML %s +// RUN: %clang_cc1 -triple arm64-apple-ios -S -o /dev/null %s -O2 -dwarf-column-info -opt-record-file %t.yaml -opt-record-passes asm-printer +// RUN: cat %t.yaml | FileCheck -check-prefix=PASSES %s void bar(float); @@ -15,15 +17,15 @@ void foo(float *p, int i) { } } -// REMARK: opt-record-MIR.c:10:11: remark: {{.}} spills {{.}} reloads generated in loop +// REMARK: opt-record-MIR.c:{{[1-9][0-9]*}}:{{[1-9][0-9]*}}: remark: {{.}} spills {{.}} reloads generated in loop // NO_REMARK-NOT: remark: // YAML: --- !Missed // YAML: Pass: regalloc // YAML: Name: LoopSpillReload // YAML: DebugLoc: { File: {{[^,]+}}, -// YAML: Line: 10, -// YAML: Column: 11 } +// YAML: Line: {{[1-9][0-9]*}} +// YAML: Column: {{[1-9][0-9]*}} } // YAML: Function: foo // YAML: Args: // YAML: - NumSpills: '{{.}}' @@ -32,3 +34,6 @@ void foo(float *p, int i) { // YAML: - String: ' reloads ' // YAML: - String: generated // YAML: ... + +// PASSES: Pass: asm-printer +// PASSES-NOT: regalloc diff --git a/clang/test/CodeGen/opt-record.c b/clang/test/CodeGen/opt-record.c index 3bc3c41f784..3f134854fe5 100644 --- a/clang/test/CodeGen/opt-record.c +++ b/clang/test/CodeGen/opt-record.c @@ -3,6 +3,8 @@ // RUN: llvm-profdata merge %S/Inputs/opt-record.proftext -o %t.profdata // RUN: %clang_cc1 -O3 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 -fprofile-instrument-use-path=%t.profdata %s -o %t -dwarf-column-info -opt-record-file %t.yaml -emit-obj // RUN: cat %t.yaml | FileCheck -check-prefix=CHECK -check-prefix=CHECK-PGO %s +// RUN: %clang_cc1 -O3 -triple x86_64-unknown-linux-gnu -target-cpu x86-64 %s -o %t -dwarf-column-info -opt-record-file %t.yaml -opt-record-passes inline -emit-obj +// RUN: cat %t.yaml | FileCheck -check-prefix=CHECK-PASSES %s // REQUIRES: x86-registered-target void bar(); @@ -23,6 +25,7 @@ void Test(int *res, int *c, int *d, int *p, int n) { // CHECK: DebugLoc: // CHECK: Function: foo // CHECK-PGO: Hotness: +// CHECK-PASSES: Pass: inline // CHECK: --- !Passed // CHECK: Pass: loop-vectorize @@ -30,4 +33,4 @@ void Test(int *res, int *c, int *d, int *p, int n) { // CHECK: DebugLoc: // CHECK: Function: Test // CHECK-PGO: Hotness: - +// CHECK-PASSES-NOT: loop-vectorize diff --git a/clang/test/Driver/darwin-ld.c b/clang/test/Driver/darwin-ld.c index 181d4e324cc..b120bbe8a34 100644 --- a/clang/test/Driver/darwin-ld.c +++ b/clang/test/Driver/darwin-ld.c @@ -327,6 +327,10 @@ // RUN: FileCheck -check-prefix=PASS_REMARKS_WITH_HOTNESS_THRESHOLD %s < %t.log // PASS_REMARKS_WITH_HOTNESS_THRESHOLD: "-mllvm" "-lto-pass-remarks-output" "-mllvm" "foo/bar.out.opt.yaml" "-mllvm" "-lto-pass-remarks-with-hotness" "-mllvm" "-lto-pass-remarks-hotness-threshold=100" +// RUN: %clang -target x86_64-apple-darwin12 %t.o -fsave-optimization-record -foptimization-record-passes=inline -### -o foo/bar.out 2> %t.log +// RUN: FileCheck -check-prefix=PASS_REMARKS_WITH_PASSES %s < %t.log +// PASS_REMARKS_WITH_PASSES: "-mllvm" "-lto-pass-remarks-output" "-mllvm" "foo/bar.out.opt.yaml" "-mllvm" "-lto-pass-remarks-filter=inline" + // RUN: %clang -target x86_64-apple-ios6.0 -miphoneos-version-min=6.0 -fprofile-instr-generate -### %t.o 2> %t.log // RUN: FileCheck -check-prefix=LINK_PROFILE_FIRST %s < %t.log // RUN: %clang -target x86_64-apple-darwin12 -fprofile-instr-generate -### %t.o 2> %t.log diff --git a/clang/test/Driver/opt-record.c b/clang/test/Driver/opt-record.c index 7b4ec48632e..44ad4a2a6b3 100644 --- a/clang/test/Driver/opt-record.c +++ b/clang/test/Driver/opt-record.c @@ -12,6 +12,10 @@ // RUN: %clang -### -S -o FOO -foptimization-record-file=BAR.txt %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ // RUN: %clang -### -S -o FOO -foptimization-record-file=BAR.txt -fno-save-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-FOPT-DISABLE +// RUN: %clang -### -S -o FOO -fsave-optimization-record -foptimization-record-passes=inline %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ-PASSES +// RUN: %clang -### -S -o FOO -foptimization-record-passes=inline %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ-PASSES +// RUN: %clang -### -S -o FOO -foptimization-record-passes=inline -fno-save-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-FOPT-DISABLE-PASSES +// // CHECK: "-cc1" // CHECK: "-opt-record-file" "FOO.opt.yaml" @@ -23,3 +27,8 @@ // CHECK-EQ: "-opt-record-file" "BAR.txt" // CHECK-FOPT-DISABLE-NOT: "-fno-save-optimization-record" + +// CHECK-EQ-PASSES: "-cc1" +// CHECK-EQ-PASSES: "-opt-record-passes" "inline" + +// CHECK-FOPT-DISABLE-PASSES-NOT: "-fno-save-optimization-record" |