summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/opt-record.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[Remarks][Driver] Use different remark files when targeting multiple ↵Reid Kleckner2019-11-181-6/+0
| | | | | | | | architectures" This reverts commit b4e2b112b58154a89171df39dae80044865ff4ff. Test doesn't appear to pass on Windows, maybe all non-Mac.
* [Remarks][Driver] Use different remark files when targeting multiple ↵Francis Visoiu Mistrih2019-11-181-0/+6
| | | | | | | | | | | | | | | | | | architectures When the driver is targeting multiple architectures at once, for things like Universal Mach-Os, we need to emit different remark files for each cc1 invocation to avoid overwriting the files from a different invocation. For example: $ clang -c -o foo.o -fsave-optimization-record -arch x86_64 -arch x86_64h will create two remark files: * foo-x86_64.opt.yaml * foo-x86_64h.opt.yaml
* [Remarks][Driver] Use the specified format in the remarks file extensionFrancis Visoiu Mistrih2019-06-171-0/+1
| | | | | | | By default, use `.opt.yaml`, but when a format is specified with `-fsave-optimization-record=<format>`, use `.opt.<format>`. llvm-svn: 363627
* [Remarks] Extend -fsave-optimization-record to specify the formatFrancis Visoiu Mistrih2019-06-171-0/+8
| | | | | | | | | Use -fsave-optimization-record=<format> to specify a different format than the default, which is YAML. For now, only YAML is supported. llvm-svn: 363573
* Reland "[Remarks] Add -foptimization-record-passes to filter remark emission"Francis Visoiu Mistrih2019-03-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we have -Rpass for filtering the remarks that are displayed as diagnostics, but when using -fsave-optimization-record, there is no way to filter the remarks while generating them. This adds support for filtering remarks by passes using a regex. Ex: `clang -fsave-optimization-record -foptimization-record-passes=inline` will only emit the remarks coming from the pass `inline`. This adds: * `-fsave-optimization-record` to the driver * `-opt-record-passes` to cc1 * `-lto-pass-remarks-filter` to the LTOCodeGenerator * `--opt-remarks-passes` to lld * `-pass-remarks-filter` to llc, opt, llvm-lto, llvm-lto2 * `-opt-remarks-passes` to gold-plugin Differential Revision: https://reviews.llvm.org/D59268 Original llvm-svn: 355964 llvm-svn: 355984
* Revert "[Remarks] Add -foptimization-record-passes to filter remark emission"Francis Visoiu Mistrih2019-03-121-9/+0
| | | | | | This reverts commit 20fff32b7d1f1a1bd417b22aa9f26ededd97a3e5. llvm-svn: 355976
* [Remarks] Add -foptimization-record-passes to filter remark emissionFrancis Visoiu Mistrih2019-03-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Currently we have -Rpass for filtering the remarks that are displayed as diagnostics, but when using -fsave-optimization-record, there is no way to filter the remarks while generating them. This adds support for filtering remarks by passes using a regex. Ex: `clang -fsave-optimization-record -foptimization-record-passes=inline` will only emit the remarks coming from the pass `inline`. This adds: * `-fsave-optimization-record` to the driver * `-opt-record-passes` to cc1 * `-lto-pass-remarks-filter` to the LTOCodeGenerator * `--opt-remarks-passes` to lld * `-pass-remarks-filter` to llc, opt, llvm-lto, llvm-lto2 * `-opt-remarks-passes` to gold-plugin Differential Revision: https://reviews.llvm.org/D59268 llvm-svn: 355964
* [clang] -foptimization-record-file= should imply -fsave-optimization-recordJonas Devlieghere2017-12-191-0/+3
| | | | | | | | | | | | | | | | | The Clang option -foptimization-record-file= controls which file an optimization record is output to. Optimization records are output if you use the Clang option -fsave-optimization-record. If you specify the first option without the second, you get a warning that the command line argument was unused. Passing -foptimization-record-file= should imply -fsave-optimization-record. This fixes PR33670 Patch by: Dmitry Venikov <venikov@phystech.edu> Differential revision: https://reviews.llvm.org/D39834 llvm-svn: 321090
* Don't use -no-integrated-as in test/Driver/opt-record.cHal Finkel2017-08-161-3/+0
| | | | | | | | -no-integrated-as is not supported on some targets (e.g., x86_64-pc-windows-msvc). Testing using -save-temps is good enough to cover the relevant logic, and that should work everywhere. llvm-svn: 311043
* Base optimization-record file names on the final outputHal Finkel2017-08-161-0/+7
| | | | | | | | | | | | | | Using Output.getFilename() to construct the file name used for optimization recording in Clang::ConstructJob, when -c is provided, does not work correctly if we're not using the integrated assembler. With -no-integrated-as (or -save-temps) Output.getFilename() gives the name of the temporary assembly file, not the final output file. Instead, use the final output (as provided by -o). If this is not available, then fall back to using a name based on the input file. Fixes PR31532. llvm-svn: 311041
* [Driver][OpenMP] Add support to create jobs for unbundling actions.Samuel Antao2016-10-271-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Fixup test/Driver/opt-record.c for nvptx pointer sizeHal Finkel2016-10-111-1/+1
| | | | | | On some systems, it looks like nvptx is used instead of nvptx64. llvm-svn: 283839
* Add an option to save the backend-produced YAML optimization record to a fileHal Finkel2016-10-111-0/+18
The backend now has the capability to save information from optimizations, the same information that can be used to generate optimization diagnostics but in machine-consumable form, into an output file. This can be enabled when using opt (see r282539), and this change enables it when using clang. The idea is that other tools will be able to consume these files, and perhaps in combination with the original source code, produce various kinds of optimization reports for users (and for compiler developers). We now have at-least two tools that can consume these files: * tools/llvm-opt-report * utils/opt-viewer Using the flag -fsave-optimization-record will cause the YAML file to be generated; the file name will be based on the output file name (if we're using -c or -S and have an output name), or the input file name. When we're using CUDA, or some other offloading mechanism, separate files are generated for each backend target. The output file name can be specified by the user using -foptimization-record-file=filename. Differential Revision: https://reviews.llvm.org/D25225 llvm-svn: 283834
OpenPOWER on IntegriCloud