Revision tags: llvmorg-8.0.1-rc2 |
|
#
6f48c076 |
| 07-Jun-2019 |
Keno Fischer <keno@alumni.harvard.edu> |
[analyzer] Add werror flag for analyzer warnings
Summary: We're using the clang static analyzer together with a number of custom analyses in our CI system to ensure that certain invariants are stati
[analyzer] Add werror flag for analyzer warnings
Summary: We're using the clang static analyzer together with a number of custom analyses in our CI system to ensure that certain invariants are statiesfied for by the code every commit. Unfortunately, there currently doesn't seem to be a good way to determine whether any analyzer warnings were emitted, other than parsing clang's output (or using scan-build, which then in turn parses clang's output). As a simpler mechanism, simply add a `-analyzer-werror` flag to CC1 that causes the analyzer to emit its warnings as errors instead. I briefly tried to have this be `Werror=analyzer` and make it go through that machinery instead, but that seemed more trouble than it was worth in terms of conflicting with options to the actual build and special cases that would be required to circumvent the analyzers usual attempts to quiet non-analyzer warnings. This is simple and it works well.
Reviewed-By: NoQ, Szelethusw Differential Revision: https://reviews.llvm.org/D62885
llvm-svn: 362855
show more ...
|
#
e08e68de |
| 07-Jun-2019 |
Peter Collingbourne <peter@pcc.me.uk> |
Driver, IRGen: Set partitions on GlobalValues according to -fsymbol-partition flag.
Differential Revision: https://reviews.llvm.org/D62636
llvm-svn: 362829
|
#
6321c680 |
| 05-Jun-2019 |
Nemanja Ivanovic <nemanja.i.ibm@gmail.com> |
Initial support for vectorization using MASSV (IBM MASS vector library)
Part 2 (the Clang portion) of D59881.
This patch (first of two patches) enables the vectorizer to recognize the IBM MASS vect
Initial support for vectorization using MASSV (IBM MASS vector library)
Part 2 (the Clang portion) of D59881.
This patch (first of two patches) enables the vectorizer to recognize the IBM MASS vector library routines. This patch specifically adds support for recognizing the -vector-library=MASSV option, and defines mappings from IEEE standard scalar math functions to generic PowerPC MASS vector counterparts. For instance, the generic PowerPC MASS vector entry for double-precision cbrt function is __cbrtd2_massv.
The second patch will further lower the generic PowerPC vector entries to PowerPC subtarget-specific entries. For instance, the PowerPC generic entry cbrtd2_massv is lowered to cbrtd2_P9 for Power9 subtarget.
The overall support for MASS vector library is presented as such in two patches for ease of review.
Patch by Jeeva Paudel.
Differential revision: https://reviews.llvm.org/D59881
llvm-svn: 362571
show more ...
|
#
6e2d36b6 |
| 03-Jun-2019 |
Alex Lorenz <arphaman@gmail.com> |
Add clang source minimizer that reduces source to directives that might affect the dependency list for a compilation
This commit introduces a dependency directives source minimizer to clang that min
Add clang source minimizer that reduces source to directives that might affect the dependency list for a compilation
This commit introduces a dependency directives source minimizer to clang that minimizes header and source files to the minimum necessary preprocessor directives for evaluating includes. It reduces the source down to #define, #include,
The source minimizer works by lexing the input with a custom fast lexer that recognizes the preprocessor directives it cares about, and emitting those directives in the minimized source. It ignores source code, comments, and normalizes whitespace. It gives up and fails if seems any directives that it doesn't recognize as valid (e.g. #define 0).
In addition to the source minimizer this patch adds a -print-dependency-directives-minimized-source CC1 option that allows you to invoke the minimizer from clang directly.
Differential Revision: https://reviews.llvm.org/D55463
llvm-svn: 362459
show more ...
|
#
79a222fc |
| 03-Jun-2019 |
Sven van Haastregt <sven.vanhaastregt@arm.com> |
[OpenCL] Declare builtin functions using TableGen
This patch adds a `-fdeclare-opencl-builtins` command line option to the clang frontend. This enables clang to verify OpenCL C builtin function dec
[OpenCL] Declare builtin functions using TableGen
This patch adds a `-fdeclare-opencl-builtins` command line option to the clang frontend. This enables clang to verify OpenCL C builtin function declarations using a fast StringMatcher lookup, instead of including the opencl-c.h file with the `-finclude-default-header` option. This avoids the large parse time penalty of the header file.
This commit only adds the basic infrastructure and some of the OpenCL builtins. It does not cover all builtins defined by the various OpenCL specifications. As such, it is not a replacement for `-finclude-default-header` yet.
RFC: http://lists.llvm.org/pipermail/cfe-dev/2018-November/060041.html
Co-authored-by: Pierre Gondois Co-authored-by: Joey Gouly Co-authored-by: Sven van Haastregt
Differential Revision: https://reviews.llvm.org/D60763
llvm-svn: 362371
show more ...
|
#
ac95c865 |
| 23-May-2019 |
Kristof Umann <kristof.umann@ericsson.com> |
[analyzer] List checker/plugin options in 3 categories: released, alpha, developer
Same patch as D62093, but for checker/plugin options, the only difference being that options for alpha checkers are
[analyzer] List checker/plugin options in 3 categories: released, alpha, developer
Same patch as D62093, but for checker/plugin options, the only difference being that options for alpha checkers are implicitly marked as alpha.
Differential Revision: https://reviews.llvm.org/D62093
llvm-svn: 361566
show more ...
|
#
7e55ed84 |
| 23-May-2019 |
Kristof Umann <kristof.umann@ericsson.com> |
[analyzer] Hide developer-only checker/package options by default
These options are now only visible under -analyzer-checker-option-help-developer.
Differential Revision: https://reviews.llvm.org/D
[analyzer] Hide developer-only checker/package options by default
These options are now only visible under -analyzer-checker-option-help-developer.
Differential Revision: https://reviews.llvm.org/D61839
llvm-svn: 361561
show more ...
|
#
5bc40d9b |
| 23-May-2019 |
Kristof Umann <kristof.umann@ericsson.com> |
[analyzer] List checkers in 3 categories: released, alpha, developer
Previously, the only way to display the list of available checkers was to invoke the analyzer with -analyzer-checker-help fronten
[analyzer] List checkers in 3 categories: released, alpha, developer
Previously, the only way to display the list of available checkers was to invoke the analyzer with -analyzer-checker-help frontend flag. This however wasn't really great from a maintainer standpoint: users came across checkers meant strictly for development purposes that weren't to be tinkered with, or those that were still in development. This patch creates a clearer division in between these categories.
From now on, we'll have 3 flags to display the list checkers. These lists are mutually exclusive and can be used in any combination (for example to display both stable and alpha checkers).
-analyzer-checker-help: Displays the list for stable, production ready checkers.
-analyzer-checker-help-alpha: Displays the list for in development checkers. Enabling is discouraged for non-development purposes.
-analyzer-checker-help-developer: Modeling and debug checkers. Modeling checkers shouldn't be enabled/disabled by hand, and debug checkers shouldn't be touched by users.
Differential Revision: https://reviews.llvm.org/D62093
llvm-svn: 361558
show more ...
|
#
e8df27d9 |
| 23-May-2019 |
Kristof Umann <kristof.umann@ericsson.com> |
[analyzer] Add a new frontend flag to display all checker options
Add the new frontend flag -analyzer-checker-option-help to display all checker/package options.
Differential Revision: https://revi
[analyzer] Add a new frontend flag to display all checker options
Add the new frontend flag -analyzer-checker-option-help to display all checker/package options.
Differential Revision: https://reviews.llvm.org/D57858
llvm-svn: 361552
show more ...
|
#
603a2bac |
| 21-May-2019 |
Javed Absar <javed.absar@arm.com> |
[ARM][CMSE] Add commandline option and feature macro
Defines macro ARM_FEATURE_CMSE to 1 for v8-M targets and introduces -mcmse option which for v8-M targets sets ARM_FEATURE_CMSE to 3. A diagnostic
[ARM][CMSE] Add commandline option and feature macro
Defines macro ARM_FEATURE_CMSE to 1 for v8-M targets and introduces -mcmse option which for v8-M targets sets ARM_FEATURE_CMSE to 3. A diagnostic is produced when the option is given on architectures without support for Security Extensions. Reviewed By: dmgreen, snidertm Differential Revision: https://reviews.llvm.org/D59879
llvm-svn: 361261
show more ...
|
Revision tags: llvmorg-8.0.1-rc1 |
|
#
030b17db |
| 14-May-2019 |
Eric Christopher <echristo@gmail.com> |
Temporarily revert "Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED)"
This affects users of older (pre 2.26) binutils in such a way that they can't necessarily w
Temporarily revert "Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED)"
This affects users of older (pre 2.26) binutils in such a way that they can't necessarily work around it as it doesn't support the compress option on the command line. Reverting to unblock them and we can revisit whether to make this change now or fix how we want to express the option.
This reverts commit bdb21337e6e1732c9895966449c33c408336d295/r360403.
llvm-svn: 360703
show more ...
|
#
d06f3917 |
| 14-May-2019 |
Aaron Ballman <aaron@aaronballman.com> |
Add a new language mode for C2x; enable [[attribute]] support by default in C2x.
llvm-svn: 360667
|
#
2ce598a4 |
| 13-May-2019 |
Aaron Ballman <aaron@aaronballman.com> |
Introduce the ability to dump the AST to JSON.
This adds the -ast-dump=json cc1 flag (in addition to -ast-dump=default, which is the default if no dump format is specified), as well as some initial
Introduce the ability to dump the AST to JSON.
This adds the -ast-dump=json cc1 flag (in addition to -ast-dump=default, which is the default if no dump format is specified), as well as some initial AST dumping functionality and tests.
llvm-svn: 360622
show more ...
|
#
bdb21337 |
| 10-May-2019 |
Fangrui Song <maskray@google.com> |
Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED)
Since July 15, 2015 (binutils-gdb commit 19a7fe52ae3d0971e67a134bcb1648899e21ae1c, included in 2.26), gas --comp
Change -gz and -Wa,--compress-debug-sections to use gABI compression (SHF_COMPRESSED)
Since July 15, 2015 (binutils-gdb commit 19a7fe52ae3d0971e67a134bcb1648899e21ae1c, included in 2.26), gas --compress-debug-sections=zlib (gcc -gz) means zlib-gabi: SHF_COMPRESSED. Before that it meant zlib-gnu (.zdebug).
clang's -gz was introduced in rC306115 (Jun 2017) to indicate zlib-gnu. It is 2019 now and it is not unreasonable to assume users of the new feature to have new linkers (ld.bfd/gold >= 2.26, lld >= rLLD273661).
Change clang's default accordingly to improve standard conformance. zlib-gnu becomes out of fashion and gets poorer toolchain support. Its mangled names confuse tools and are more likely to cause problems.
Reviewed By: compnerd
Differential Revision: https://reviews.llvm.org/D61689
llvm-svn: 360403
show more ...
|
#
eba9a6e0 |
| 09-May-2019 |
Anastasia Stulova <anastasia.stulova@arm.com> |
[SPIR] Simplified target checking.
Switched to Triple::isSPIR() helper to simplify code.
Patch by kpet (Kevin Petit)!
Differential revision: https://reviews.llvm.org/D61639
llvm-svn: 360325
|
#
9f7fc983 |
| 01-May-2019 |
Kristof Umann <kristof.umann@ericsson.com> |
[analyzer] Don't display implementation checkers under -analyzer-checker-help, but do under the new flag -analyzer-checker-help-hidden
During my work on analyzer dependencies, I created a great amou
[analyzer] Don't display implementation checkers under -analyzer-checker-help, but do under the new flag -analyzer-checker-help-hidden
During my work on analyzer dependencies, I created a great amount of new checkers that emitted no diagnostics at all, and were purely modeling some function or another.
However, the user shouldn't really disable/enable these by hand, hence this patch, which hides these by default. I intentionally chose not to hide alpha checkers, because they have a scary enough name, in my opinion, to cause no surprise when they emit false positives or cause crashes.
The patch introduces the Hidden bit into the TableGen files (you may remember it before I removed it in D53995), and checkers that are either marked as hidden, or are in a package that is marked hidden won't be displayed under -analyzer-checker-help. -analyzer-checker-help-hidden, a new flag meant for developers only, displays the full list.
Differential Revision: https://reviews.llvm.org/D60925
llvm-svn: 359720
show more ...
|
#
b4788b26 |
| 19-Apr-2019 |
Kristof Umann <kristof.umann@ericsson.com> |
[analyzer][NFC] Reimplement checker options
TL;DR:
* Add checker and package options to the TableGen files * Added a new class called CmdLineOption, and both Package and Checker recieved a list<
[analyzer][NFC] Reimplement checker options
TL;DR:
* Add checker and package options to the TableGen files * Added a new class called CmdLineOption, and both Package and Checker recieved a list<CmdLineOption> field. * Added every existing checker and package option to Checkers.td. * The CheckerRegistry class * Received some comments to most of it's inline classes * Received the CmdLineOption and PackageInfo inline classes, a list of CmdLineOption was added to CheckerInfo and PackageInfo * Added addCheckerOption and addPackageOption * Added a new field called Packages, used in addPackageOptions, filled up in addPackage
Detailed description:
In the last couple months, a lot of effort was put into tightening the analyzer's command line interface. The main issue is that it's spectacularly easy to mess up a lenghty enough invocation of the analyzer, and the user was given no warnings or errors at all in that case.
We can divide the effort of resolving this into several chapters:
* Non-checker analyzer configurations: Gather every analyzer configuration into a dedicated file. Emit errors for non-existent configurations or incorrect values. Be able to list these configurations. Tighten AnalyzerOptions interface to disallow making such a mistake in the future.
* Fix the "Checker Naming Bug" by reimplementing checker dependencies: When cplusplus.InnerPointer was enabled, it implicitly registered unix.Malloc, which implicitly registered some sort of a modeling checker from the CStringChecker family. This resulted in all of these checker objects recieving the name "cplusplus.InnerPointer", making AnalyzerOptions asking for the wrong checker options from the command line: cplusplus.InnerPointer:Optimisic istead of unix.Malloc:Optimistic. This was resolved by making CheckerRegistry responsible for checker dependency handling, instead of checkers themselves.
* Checker options: (this patch included!) Same as the first item, but for checkers.
(+ minor fixes here and there, and everything else that is yet to come)
There were several issues regarding checker options, that non-checker configurations didn't suffer from: checker plugins are loaded runtime, and they could add new checkers and new options, meaning that unlike for non-checker configurations, we can't collect every checker option purely by generating code. Also, as seen from the "Checker Naming Bug" issue raised above, they are very rarely used in practice, and all sorts of skeletons fell out of the closet while working on this project.
They were extremely problematic for users as well, purely because of how long they were. Consider the following monster of a checker option:
alpha.cplusplus.UninitializedObject:CheckPointeeInitialization=false
While we were able to verify whether the checker itself (the part before the colon) existed, any errors past that point were unreported, easily resulting in 7+ hours of analyses going to waste.
This patch, similarly to how dependencies were reimplemented, uses TableGen to register checker options into Checkers.td, so that Checkers.inc now contains entries for both checker and package options. Using the preprocessor, Checkers.inc is converted into code in CheckerRegistry, adding every builtin (checkers and packages that have an entry in the Checkers.td file) checker and package option to the registry. The new addPackageOption and addCheckerOption functions expose the same functionality to statically-linked non-builtin and plugin checkers and packages as well.
Emitting errors for incorrect user input, being able to list these options, and some other functionalies will land in later patches.
Differential Revision: https://reviews.llvm.org/D57855
llvm-svn: 358752
show more ...
|
#
8af8b861 |
| 11-Apr-2019 |
Richard Smith <richard-llvm@metafoo.co.uk> |
[C++20] Implement context-sensitive header-name lexing and pp-import parsing in the preprocessor.
llvm-svn: 358231
|
#
75e74e07 |
| 31-Mar-2019 |
Fangrui Song <maskray@google.com> |
Range-style std::find{,_if} -> llvm::find{,_if}. NFC
llvm-svn: 357359
|
#
d880de2d |
| 30-Mar-2019 |
Anton Afanasyev <anton.a.afanasyev@gmail.com> |
Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps.
This change adds hierarchical "time trace" profiling blocks that can be visualized
Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps.
This change adds hierarchical "time trace" profiling blocks that can be visualized in Chrome, in a "flame chart" style. Each profiling block can have a "detail" string that for example indicates the file being processed, template name being instantiated, function being optimized etc.
This is taken from GitHub PR: https://github.com/aras-p/llvm-project-20170507/pull/2
Patch by Aras Pranckevičius.
Differential Revision: https://reviews.llvm.org/D58675
llvm-svn: 357340
show more ...
|
Revision tags: llvmorg-8.0.0 |
|
#
dd42236c |
| 12-Mar-2019 |
Francis Visoiu Mistrih <francisvm@yahoo.com> |
Reland "[Remarks] Add -foptimization-record-passes to filter remark emission"
Currently we have -Rpass for filtering the remarks that are displayed as diagnostics, but when using -fsave-optimization
Reland "[Remarks] Add -foptimization-record-passes to filter remark emission"
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
show more ...
|
#
1d6c47ad |
| 12-Mar-2019 |
Francis Visoiu Mistrih <francisvm@yahoo.com> |
Revert "[Remarks] Add -foptimization-record-passes to filter remark emission"
This reverts commit 20fff32b7d1f1a1bd417b22aa9f26ededd97a3e5.
llvm-svn: 355976
|
#
20fff32b |
| 12-Mar-2019 |
Francis Visoiu Mistrih <francisvm@yahoo.com> |
[Remarks] Add -foptimization-record-passes to filter remark emission
Currently we have -Rpass for filtering the remarks that are displayed as diagnostics, but when using -fsave-optimization-record,
[Remarks] Add -foptimization-record-passes to filter remark emission
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
show more ...
|
Revision tags: llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4 |
|
#
a4a09b23 |
| 04-Mar-2019 |
Rong Xu <xur@google.com> |
[PGO] Clang part of change for context-sensitive PGO (part1)
Part 1 of CSPGO change in Clang. This includes changes in clang options and calls to llvm PassManager. Tests will be committed in part2.
[PGO] Clang part of change for context-sensitive PGO (part1)
Part 1 of CSPGO change in Clang. This includes changes in clang options and calls to llvm PassManager. Tests will be committed in part2. This change needs the PassManager change in llvm.
Differential Revision: https://reviews.llvm.org/D54176
llvm-svn: 355331
show more ...
|
#
ae5303d0 |
| 01-Mar-2019 |
Pierre Gousseau <pierregousseau14@gmail.com> |
[Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC.
enum SanitizerOrdinal has reached maximum capacity, this change extends the capacity to 128 sanitizer
[Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC.
enum SanitizerOrdinal has reached maximum capacity, this change extends the capacity to 128 sanitizer checks. This can eventually allow us to add gcc 8's options "-fsanitize=pointer-substract" and "-fsanitize=pointer-compare".
This is a recommit of r354873 but with a fix for unqualified lookup error in lldb cmake build bot.
Fixes: https://llvm.org/PR39425
Differential Revision: https://reviews.llvm.org/D57914
llvm-svn: 355190
show more ...
|