2016-10-11 08:26:09 +08:00
|
|
|
// RUN: %clang -### -S -o FOO -fsave-optimization-record %s 2>&1 | FileCheck %s
|
|
|
|
// RUN: %clang -### -c -o FOO -fsave-optimization-record %s 2>&1 | FileCheck %s
|
2017-08-17 05:34:27 +08:00
|
|
|
// RUN: %clang -### -c -o FOO.o -fsave-optimization-record %s 2>&1 | FileCheck %s
|
|
|
|
// RUN: %clang -### -save-temps -S -o FOO -fsave-optimization-record %s 2>&1 | FileCheck %s
|
|
|
|
// RUN: %clang -### -save-temps -c -o FOO.o -fsave-optimization-record %s 2>&1 | FileCheck %s
|
2016-10-11 08:26:09 +08:00
|
|
|
// RUN: %clang -### -c -fsave-optimization-record %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O
|
2017-08-17 05:34:27 +08:00
|
|
|
// RUN: %clang -### -save-temps -c -fsave-optimization-record %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O
|
2016-10-11 08:26:09 +08:00
|
|
|
// RUN: %clang -### -fsave-optimization-record %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O
|
|
|
|
// RUN: %clang -### -S -fsave-optimization-record -x cuda -nocudainc -nocudalib %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O -check-prefix=CHECK-CUDA-DEV
|
|
|
|
// RUN: %clang -### -fsave-optimization-record -x cuda -nocudainc -nocudalib %s 2>&1 | FileCheck %s -check-prefix=CHECK-NO-O -check-prefix=CHECK-CUDA-DEV
|
|
|
|
// RUN: %clang -### -S -o FOO -fsave-optimization-record -foptimization-record-file=BAR.txt %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ
|
2017-12-20 01:16:45 +08:00
|
|
|
// 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
|
2016-10-11 08:26:09 +08:00
|
|
|
|
2019-03-13 05:22:27 +08:00
|
|
|
// 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
|
2019-06-18 00:06:00 +08:00
|
|
|
// RUN: %clang -### -S -o FOO -fsave-optimization-record -fsave-optimization-record=some-format %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ-FORMAT
|
|
|
|
// RUN: %clang -### -S -o FOO -fsave-optimization-record=some-format %s 2>&1 | FileCheck %s -check-prefix=CHECK-EQ-FORMAT
|
|
|
|
// RUN: %clang -### -S -o FOO -fsave-optimization-record=some-format -fno-save-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-FOPT-DISABLE-FORMAT
|
2019-03-13 05:22:27 +08:00
|
|
|
//
|
2016-10-11 08:26:09 +08:00
|
|
|
// CHECK: "-cc1"
|
|
|
|
// CHECK: "-opt-record-file" "FOO.opt.yaml"
|
|
|
|
|
|
|
|
// CHECK-NO-O: "-cc1"
|
|
|
|
// CHECK-NO-O-DAG: "-opt-record-file" "opt-record.opt.yaml"
|
[Driver][OpenMP] Add support to create jobs for unbundling actions.
Summary:
This patch adds the support to create jobs for the `OffloadBundlingAction` which will invoke the `clang-offload-bundler` tool to unbundle input files.
Unlike other actions, unbundling actions have multiple outputs. Therefore, this patch adds the required changes to have a variant of `Tool::ConstructJob` with multiple outputs.
The way the naming of the results is implemented is also slightly modified so that the same action can use a different offloading prefix for each use by the different offloading actions.
With this patch, it is possible to compile a functional OpenMP binary with offloading support, even with separate compilation.
Reviewers: echristo, tra, jlebar, ABataev, hfinkel
Subscribers: mkuron, whchung, mehdi_amini, cfe-commits, Hahnfeld, andreybokhanko, arpith-jacob, carlo.bertolli, caomhin
Differential Revision: https://reviews.llvm.org/D21857
llvm-svn: 285326
2016-10-28 02:14:55 +08:00
|
|
|
// CHECK-CUDA-DEV-DAG: "-opt-record-file" "opt-record-cuda-{{nvptx64|nvptx}}-nvidia-cuda-sm_20.opt.yaml"
|
2016-10-11 08:26:09 +08:00
|
|
|
|
|
|
|
// CHECK-EQ: "-cc1"
|
|
|
|
// CHECK-EQ: "-opt-record-file" "BAR.txt"
|
|
|
|
|
2017-12-20 01:16:45 +08:00
|
|
|
// CHECK-FOPT-DISABLE-NOT: "-fno-save-optimization-record"
|
2019-03-13 05:22:27 +08:00
|
|
|
|
|
|
|
// CHECK-EQ-PASSES: "-cc1"
|
|
|
|
// CHECK-EQ-PASSES: "-opt-record-passes" "inline"
|
|
|
|
|
|
|
|
// CHECK-FOPT-DISABLE-PASSES-NOT: "-fno-save-optimization-record"
|
2019-06-18 00:06:00 +08:00
|
|
|
|
|
|
|
// CHECK-EQ-FORMAT: "-cc1"
|
2019-06-18 06:49:38 +08:00
|
|
|
// CHECK-EQ-FORMAT: "-opt-record-file" "FOO.opt.some-format"
|
2019-06-18 00:06:00 +08:00
|
|
|
// CHECK-EQ-FORMAT: "-opt-record-format" "some-format"
|
|
|
|
|
|
|
|
// CHECK-FOPT-DISABLE-FORMAT-NOT: "-fno-save-optimization-record"
|
2020-10-28 08:11:26 +08:00
|
|
|
|
|
|
|
// Test remarks options pass-through
|
|
|
|
// No pass-through: lto is disabled
|
|
|
|
// RUN: %clang -target x86_64 -### -o FOO -fdiagnostics-hotness-threshold=100 -fsave-optimization-record %s 2>&1 | FileCheck %s -check-prefix=CHECK-NOPASS
|
|
|
|
|
|
|
|
// Pass-through:
|
|
|
|
// RUN: %clang -target x86_64-linux -### -fuse-ld=lld -flto -fdiagnostics-hotness-threshold=100 -fsave-optimization-record -foptimization-record-passes=inline %s 2>&1 | FileCheck %s -check-prefix=CHECK-PASS-A
|
|
|
|
// RUN: %clang -target x86_64-linux -### -o FOO -fuse-ld=gold -flto -fdiagnostics-hotness-threshold=100 -fsave-optimization-record -foptimization-record-passes=inline %s 2>&1 | FileCheck %s -check-prefix=CHECK-PASS
|
|
|
|
// RUN: %clang -target x86_64-linux -### -o FOO -fuse-ld=lld -flto=thin -fdiagnostics-hotness-threshold=100 -fsave-optimization-record=some-format -foptimization-record-file=FOO.txt %s 2>&1 | FileCheck %s -check-prefix=CHECK-PASS-CUSTOM
|
|
|
|
// RUN: %clang -target x86_64-linux -### -o FOO -fuse-ld=lld -flto=thin -fdiagnostics-hotness-threshold=100 -Rpass=inline -Rpass-missed=inline -Rpass-analysis=inline %s 2>&1 | FileCheck %s -check-prefix=CHECK-PASS-RPASS
|
2020-11-18 02:43:02 +08:00
|
|
|
// RUN: %clang -target x86_64-linux -### -o FOO -fuse-ld=lld -flto=thin -fdiagnostics-hotness-threshold=auto -Rpass=inline -Rpass-missed=inline -Rpass-analysis=inline %s 2>&1 | FileCheck %s -check-prefix=CHECK-PASS-AUTO
|
2020-10-28 08:11:26 +08:00
|
|
|
|
|
|
|
// CHECK-NOPASS-NOT: "--plugin-opt=opt-remarks-filename="
|
|
|
|
// CHECK-NOPASS-NOT: "--plugin-opt=opt-remarks-passes=inline"
|
|
|
|
// CHECK-NOPASS-NOT: "--plugin-opt=opt-remarks-format=yaml"
|
|
|
|
// CHECK-NOPASS-NOT: "--plugin-opt=opt-remarks-hotness-threshold=100"
|
|
|
|
|
|
|
|
// CHECK-PASS-A: "--plugin-opt=opt-remarks-filename=a.out.opt.ld.yaml"
|
|
|
|
// CHECK-PASS-A-SAME: "--plugin-opt=opt-remarks-passes=inline"
|
|
|
|
// CHECK-PASS-A-SAME: "--plugin-opt=opt-remarks-format=yaml"
|
|
|
|
// CHECK-PASS-A-SAME: "--plugin-opt=opt-remarks-hotness-threshold=100"
|
|
|
|
|
|
|
|
// CHECK-PASS: "--plugin-opt=opt-remarks-filename=FOO.opt.ld.yaml"
|
|
|
|
// CHECK-PASS-SAME: "--plugin-opt=opt-remarks-passes=inline"
|
|
|
|
// CHECK-PASS-SAME: "--plugin-opt=opt-remarks-format=yaml"
|
|
|
|
// CHECK-PASS-SAME: "--plugin-opt=opt-remarks-hotness-threshold=100"
|
|
|
|
|
|
|
|
// CHECK-PASS-CUSTOM: "--plugin-opt=opt-remarks-filename=FOO.txt.opt.ld.some-format"
|
|
|
|
// CHECK-PASS-CUSTOM-SAME: "--plugin-opt=opt-remarks-format=some-format"
|
|
|
|
// CHECK-PASS-CUSTOM-SAME: "--plugin-opt=opt-remarks-hotness-threshold=100"
|
|
|
|
|
|
|
|
// CHECK-PASS-RPASS: "--plugin-opt=-pass-remarks=inline"
|
|
|
|
// CHECK-PASS-RPASS-SAME: "--plugin-opt=-pass-remarks-missed=inline"
|
|
|
|
// CHECK-PASS-RPASS-SAME: "--plugin-opt=-pass-remarks-analysis=inline"
|
|
|
|
// CHECK-PASS-RPASS-SAME: "--plugin-opt=opt-remarks-hotness-threshold=100"
|
2020-11-18 02:43:02 +08:00
|
|
|
|
|
|
|
// CHECK-PASS-AUTO: "--plugin-opt=opt-remarks-hotness-threshold=auto"
|