#
b89af18d |
| 10-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Generate and round-trip Target options
This patch implements generation of remaining target options and tests it by performing parse-generate-parse round trip.
Reviewed By: dexonsmith
[clang][cli] Generate and round-trip Target options
This patch implements generation of remaining target options and tests it by performing parse-generate-parse round trip.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D96158
show more ...
|
#
cb933632 |
| 10-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Generate and round-trip PreprocessorOutput options
This patch implements generation of remaining preprocessor output options and tests it by performing parse-generate-parse round trip.
[clang][cli] Generate and round-trip PreprocessorOutput options
This patch implements generation of remaining preprocessor output options and tests it by performing parse-generate-parse round trip.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D96156
show more ...
|
#
66ac53fe |
| 10-Feb-2021 |
Yang Fan <nullptr.cpp@gmail.com> |
[clang][cli] Fix gcc "enumeral and non-enumeral type in conditional expression" warning (NFC)
|
#
5e8a246a |
| 09-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Generate and round-trip Frontend options
This patch implements generation of remaining frontend options and tests it by performing parse-generate-parse round trip.
Depends on D96269.
[clang][cli] Generate and round-trip Frontend options
This patch implements generation of remaining frontend options and tests it by performing parse-generate-parse round trip.
Depends on D96269.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D96155
show more ...
|
#
396d6a32 |
| 09-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Store unsigned instead of OptSpecifier in table
This fixes some buildbot failures with ambiguous call to OptSpecifier constructor.
|
#
7369bfb8 |
| 09-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Look up program action argument in a table
This patch extracts the mapping between command line option and frontend::ActionKind into a table. The table can be reused when parsing and al
[clang][cli] Look up program action argument in a table
This patch extracts the mapping between command line option and frontend::ActionKind into a table. The table can be reused when parsing and also generating command line options.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D96269
show more ...
|
#
521e1733 |
| 09-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Store InputKind in FrontendOptions
This patch stores the `InputKind` (parsed mainly from `-x`) to `FrontendOptions`. This is necessary for command line generation.
Reviewed By: dexonsm
[clang][cli] Store InputKind in FrontendOptions
This patch stores the `InputKind` (parsed mainly from `-x`) to `FrontendOptions`. This is necessary for command line generation.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D96149
show more ...
|
#
e721bc9e |
| 09-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Generate and round-trip CodeGen options
This patch implements generation of remaining codegen options and tests it by performing parse-generate-parse round trip.
Reviewed By: dexonsmit
[clang][cli] Generate and round-trip CodeGen options
This patch implements generation of remaining codegen options and tests it by performing parse-generate-parse round trip.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D96056
show more ...
|
#
ec12f5fe |
| 09-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][codegen] Remember string used to create llvm::Regex for optimization remarks
Regular expression patterns passed through the command line are being used to create an instances of `llvm::Regex
[clang][codegen] Remember string used to create llvm::Regex for optimization remarks
Regular expression patterns passed through the command line are being used to create an instances of `llvm::Regex` and thrown away.
There is no API to serialize `Regex` back to the original pattern. This means we have no way to reconstruct the original pattern from command line. This is necessary for serializing `CompilerInvocation`.
This patch stores the original pattern string in `CodeGenOptions` alongside the `llvm::Regex` instance.
Reviewed By: dexonsmith, thegameg
Differential Revision: https://reviews.llvm.org/D96036
show more ...
|
#
40c261c4 |
| 09-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Generate and round-trip language options
This patch implements generation of remaining language options and tests it by performing parse-generate-parse round trip (on by default for ass
[clang][cli] Generate and round-trip language options
This patch implements generation of remaining language options and tests it by performing parse-generate-parse round trip (on by default for assert builds, off otherwise).
This patch also correctly reports failures in `parseSanitizerKinds`, which is necessary for emitting diagnostics when an invalid sanitizer is passed to `-fsanitize=` during round-trip.
This patch also removes TableGen marshalling classes from two options: * `fsanitize_blacklist` When parsing: it's first initialized via the generated code, but then also changed by manually written code, which is confusing. * `fopenmp` When parsing: it's first initialized via generated code, but then conditionally changed by manually written code. This is also confusing. Moreover, we need to do some extra checks when generating it, which would be really cumbersome in TableGen. (Specifically, not emitting it when `-fopenmp-simd` was present.)
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D95793
show more ...
|
#
98c21289 |
| 19-Jan-2021 |
Yaxun (Sam) Liu <yaxun.liu@amd.com> |
[CUDA][HIP] Add -fuse-cuid
This patch added a distinct CUID for each input file, which is represented by InputAction. clang initially creates an InputAction for each input file for the host compilat
[CUDA][HIP] Add -fuse-cuid
This patch added a distinct CUID for each input file, which is represented by InputAction. clang initially creates an InputAction for each input file for the host compilation. In CUDA/HIP action builder, each InputAction is given a CUID and cloned for each GPU arch, and the CUID is also cloned. In this way, we guarantee the corresponding device and host compilation for the same file shared the same CUID. On the other hand, different compilation units have different CUID.
-fuse-cuid=random|hash|none is added to control the method to generate CUID. The default is hash. -cuid=X is also added to specify CUID explicitly, which overrides -fuse-cuid.
Reviewed by: Artem Belevich
Differential Revision: https://reviews.llvm.org/D95007
show more ...
|
#
e22677bb |
| 08-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
Reapply "[clang][cli] Report result of ParseLangArgs"
This reverts commit 6039f821 and reapplies bff6d9bb.
Clang's Index/implicit-attrs.m test invokes c-index-test with -fobjc-arc. This flag is not
Reapply "[clang][cli] Report result of ParseLangArgs"
This reverts commit 6039f821 and reapplies bff6d9bb.
Clang's Index/implicit-attrs.m test invokes c-index-test with -fobjc-arc. This flag is not compatible with -fobjc-runtime=gcc, which gets implied on Linux.
The original commit uncovered this by correctly reporting issues when parsing -cc1 command line.
This commit fixes the test to explicitly provide ObjectiveC runtime compatible with ARC.
show more ...
|
#
6039f821 |
| 08-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
Revert "[clang][cli] Report result of ParseLangArgs"
This reverts commit bff6d9bb
The change causes failure of Clang's Index/implicit-attrs.m test.
|
#
63623982 |
| 08-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] NFC: Mirror CreateFromArgs order in generateCC1CommandLine
|
#
bff6d9bb |
| 08-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Report result of ParseLangArgs
This patch correctly reports success/failure of `ParseLangArgs`. Besides being consistent with other `Parse` functions, this is required to make round-tr
[clang][cli] Report result of ParseLangArgs
This patch correctly reports success/failure of `ParseLangArgs`. Besides being consistent with other `Parse` functions, this is required to make round-tripping of `LangOptions` work.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D95792
show more ...
|
#
0c42d87e |
| 08-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Generate and round-trip preprocessor options
This patch implements generation of remaining preprocessor options and tests it by performing parse-generate-parse round trip.
Reviewed By:
[clang][cli] Generate and round-trip preprocessor options
This patch implements generation of remaining preprocessor options and tests it by performing parse-generate-parse round trip.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D95366
show more ...
|
#
0e073834 |
| 08-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Generate and round-trip analyzer options
This patch implements generation of remaining analyzer options and tests it by performing parse-generate-parse round trip.
Reviewed By: dexonsm
[clang][cli] Generate and round-trip analyzer options
This patch implements generation of remaining analyzer options and tests it by performing parse-generate-parse round trip.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D95369
show more ...
|
#
a5b627aa |
| 05-Feb-2021 |
Anton Zabaznov <anton.zabaznov@intel.com> |
[OpenCL] Introduce new language options for OpenCL keywords.
OpenCL keywords 'pipe' and 'generic' are unconditionally supported for OpenCL C 2.0 or in OpenCL C++ mode. In OpenCL C 3.0 these keywords
[OpenCL] Introduce new language options for OpenCL keywords.
OpenCL keywords 'pipe' and 'generic' are unconditionally supported for OpenCL C 2.0 or in OpenCL C++ mode. In OpenCL C 3.0 these keywords are available if corresponding optional core feature is supported.
Reviewed By: Anastasia, svenvh
Differential Revision: https://reviews.llvm.org/D95778
show more ...
|
#
6625680a |
| 02-Feb-2021 |
Hans Wennborg <hans@chromium.org> |
[clang-cl] Remove the /fallback option
As discussed in https://lists.llvm.org/pipermail/cfe-dev/2021-January/067524.html
It doesn't appear to be used, isn't really maintained, and adds some complex
[clang-cl] Remove the /fallback option
As discussed in https://lists.llvm.org/pipermail/cfe-dev/2021-January/067524.html
It doesn't appear to be used, isn't really maintained, and adds some complexity to the code. Let's remove it.
Differential revision: https://reviews.llvm.org/D95876
show more ...
|
#
225ccf0c |
| 04-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Command line round-trip for HeaderSearch options
This patch implements generation of remaining header search arguments. It's done manually in C++ as opposed to TableGen, because we need
[clang][cli] Command line round-trip for HeaderSearch options
This patch implements generation of remaining header search arguments. It's done manually in C++ as opposed to TableGen, because we need the flexibility and don't anticipate reuse.
This patch also tests the generation of header search options via a round-trip. This way, the code gets exercised whenever Clang is built and tested in asserts mode. All `check-clang` tests pass.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D94472
show more ...
|
#
0f0ce3c1 |
| 04-Feb-2021 |
Shilei Tian <tianshilei1992@gmail.com> |
[OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`
OpenMP device compiler (similar to other SPMD compilers) assumes that functions are convergent by default to avoid invalid transformati
[OpenMP][NVPTX] Take functions in `deviceRTLs` as `convergent`
OpenMP device compiler (similar to other SPMD compilers) assumes that functions are convergent by default to avoid invalid transformations, such as the bug (https://bugs.llvm.org/show_bug.cgi?id=49021).
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D95971
show more ...
|
#
eefa8a9f |
| 01-Feb-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
Revert "[clang][cli] Port OpenMP-related LangOpts to marshalling system"
This reverts commit 9ad94c12
It turns out that to correctly generate command line flags for LangOptions::OpenMP and LangOpti
Revert "[clang][cli] Port OpenMP-related LangOpts to marshalling system"
This reverts commit 9ad94c12
It turns out that to correctly generate command line flags for LangOptions::OpenMP and LangOptions::OpenMPSimd, we need the flexibility of C++.
show more ...
|
#
2393b032 |
| 28-Jan-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
Revert "[clang][cli] Use variadic macros for parsing/generating"
This reverts commit 374862d7.
Some build bots are failing with: clang/Driver/Options.inc(4315): warning C4003: not enough arguments
Revert "[clang][cli] Use variadic macros for parsing/generating"
This reverts commit 374862d7.
Some build bots are failing with: clang/Driver/Options.inc(4315): warning C4003: not enough arguments for function-like macro invocation 'PARSE_OPTION_WITH_MARSHALLING' clang/Driver/Options.inc(4315): warning C4003: not enough arguments for function-like macro invocation 'NO_PREFIX' clang/Driver/Options.inc(4315): error C2059: syntax error: ')' clang/Driver/Options.inc(4315): error C2143: syntax error: missing ';' before '{' clang/Driver/Options.inc(4315): error C2059: syntax error: '='
show more ...
|
#
374862d7 |
| 28-Jan-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Use variadic macros for parsing/generating
This patch makes all macros forwarding to `PARSE_OPTION_WITH_MARSHALLING` and `GENERATE_OPTION_WITH_MARSHALLING` variadic.
Sice we will be sp
[clang][cli] Use variadic macros for parsing/generating
This patch makes all macros forwarding to `PARSE_OPTION_WITH_MARSHALLING` and `GENERATE_OPTION_WITH_MARSHALLING` variadic.
Sice we will be splitting up all CompilerInvocation parts, this will allow us to avoid a lot of boilerplate code.
The local macros prefix forwarded arguments with local variables required by the main macros. The `{THIS,NO}_PREFIX` macros make it possible for forwarding macros in member functions (`parseSimpleArgs`, `generateCC1CommandLine`) to prefix keypaths with `this->`. (Some build bots seem to require that.)
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D95532
show more ...
|
#
d0e8a9e5 |
| 27-Jan-2021 |
Jan Svoboda <jan_svoboda@apple.com> |
[clang][cli] Generate HeaderSearch options separately
This patch moves parsing of header search options from `generateCC1Options` to separate `GenerateHeaderSearchArgs`.
The round-trip algorithm in
[clang][cli] Generate HeaderSearch options separately
This patch moves parsing of header search options from `generateCC1Options` to separate `GenerateHeaderSearchArgs`.
The round-trip algorithm in D94472 requires this separation to be able to run parsing and generating **only** for the options that need to be tested via round-tripping.
This also moves the `GENERATE_OPTION_WITH_MARSHALLING` to the top of the file, because other kinds of options will be generated in separate functions that will be spread throughout `CompilerInvocation.cpp` to be close to their parsing counterparts.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D94803
show more ...
|