- Jun 14, 2021
-
-
Raphael Isemann authored
-
Raphael Isemann authored
-
Arthur O'Dwyer authored
Differential Revision: https://reviews.llvm.org/D104166
-
Denys Shabalin authored
This change adds `AutomaticAllocationScope` to the memref.alloca_scope op. Additionally, it also clarifies that alloca_scope is is conceptually a passthrough operation. Reviewed By: ftynse, bondhugula Differential Revision: https://reviews.llvm.org/D104227
-
Peter Steinfeld authored
Revision https://reviews.llvm.org/D104190 renamed MemRefDataFlow -> AffineScalarReplacement. After this rename, mlir failed to build. With this change, all of clang, mlir, and flang build and test correctly. Differential Revision: https://reviews.llvm.org/D104223
-
David Spickett authored
This reverts commit ac031c8d. SB API usage has been corrected.
-
Roman Lebedev authored
Not all supported compilers like such lambdas, at least one buildbot is unhappy.
-
Roman Lebedev authored
The sorting, obviously, must be stable, else we will have random assembly fluctuations. Apparently there was no test coverage that would benefit from that, so i've added one test. The sorting consists of two parts - just sort the input vectors, and recompute the shuffle mask -> input vector mapping. I don't believe we need to do anything else. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D104187
-
Jan Svoboda authored
The dependency scanning worker uses `std::move` to "reset" `DependencyOutputOptions` in the `CompilerInstance` that performs the implicit build. It's probably preferable to replace the object with value-initialized instance, rather than depending on the behavior of a moved-from object. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D104106
-
Jan Svoboda authored
There's no need to pass `DependencyOutputOptions` to each call of `handleFileDependency`, since the options don't ever change. This patch adds new `handleDependencyOutputOpts` method to the `DependencyConsumer` interface and the dependency scanner uses it to report the options only once. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D104104
-
Jeroen Dobbelaere authored
Ensure that we provide a `Module` when checking if a rename of an intrinsic is necessary. This fixes the issue that was detected by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32288 (as mentioned by @fhahn), after committing D91250. Note that the `LLVMIntrinsicCopyOverloadedName` is being deprecated in favor of `LLVMIntrinsicCopyOverloadedName2`. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D99173
-
Louis Dionne authored
-
Jan Svoboda authored
The `sed` command ensures Windows-specific path separators (single and double backslashes) are replaced by forward slashes in the output file. FileCheck can continue using forward slashes in paths this way.
-
Uday Bondhugula authored
NFC. Rename MemRefDataFlow -> AffineScalarReplacement and move to AffineTransforms library. Pass command line rename: -memref-dataflow-opt -> affine-scalrep. Update outdated pass documentation. Rationale: https://llvm.discourse.group/t/move-and-rename-memref-dataflow-opt-lib-transforms-lib-affine-dialect-transforms/3640 Differential Revision: https://reviews.llvm.org/D104190
-
Louis Dionne authored
This started as an attempt to fix a GCC 11 warning of misplaced parentheses. I then noticed that trying to fix the parentheses warning actually triggered errors in the tests, showing that we were incorrectly assuming that the implementation of ranges::advance was using operator+= or operator-=. This commit fixes that issue and makes the tests easier to follow by localizing the assertions it makes. Differential Revision: https://reviews.llvm.org/D103272
-
David Spickett authored
This reverts commit f583029d, 0f94d68a and a2363c0c. Due to test failures from incorrect SB API usage.
-
Jan Svoboda authored
One of the goals of the dependency scanner is to generate command-lines that can be used to explicitly build modular dependencies of a translation unit. The only modifications to these command-lines should be for the purposes of explicit modular build. However, the current version of dependency scanner leaks its implementation details into the command-lines. The first problem is that the `clang-scan-deps` tool adjusts the original textual command-line (adding `-Eonly -M -MT <target> -sys-header-deps -Wno-error -o /dev/null `, removing `--serialize-diagnostics`) in order to set up the `DependencyScanning` library. This has been addressed in D103461, D104012, D104030, D104031, D104033. With these patches, the `DependencyScanning` library receives the unmodified `CompilerInvocation`, sets it up and uses it for the implicit modular build. Finally, to prevent leaking the implementation details to the resulting command-lines, this patch generates them from the **original** unmodified `CompilerInvocation` rather than from the one that drives the implicit build. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D104036
-
Jan Svoboda authored
The `clang-scan-deps` tests for the full output format were written under the assumption that most TUs/modules have the same context hash. This is no longer true, since we're changing the original compilation options. This patch updates the tests, which no longer conflate multiple context hashes into a single FileCheck variable.
-
Raphael Isemann authored
This documents the behaviour of the different SBType functions with notes for the language-specific behaviour for C/C++/Objective-C. All of this reflects the current behaviour of LLDB (even though that also means some functions behave kinda weird but at least they are now documented to be weird) Reviewed By: #lldb, mib Differential Revision: https://reviews.llvm.org/D103454
-
Jan Svoboda authored
Commit d8bab69e updated the ClangScanDeps/modules.cpp test. The new `{{.*}}` regex is supposed to only match `modules_cdb_input.o`, `a.o` or `b.o`. However, due to non-determinism, this can sometimes also match `modules_cdb_input2.o`, causing match failure on the next line. This commit changes the regex to only match one of the three valid cases. Buildbot failure: https://lab.llvm.org/buildbot/#/builders/109/builds/16675
-
Florian Hahn authored
Add additional tests suggested in D100260. Also drop the unneeded `indvars.` prefix from induction phi name.
-
Jan Svoboda authored
[clang][deps] Move enabling system header deps from `clang-scan-deps` to `DependencyScanning` library This patch moves enabling system header deps from `clang-scan-deps` into the `DependencyScanning` library. This will make it easier to preserve semantics of the original TU command-line for modular dependencies (see D104036). Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D104033
-
Jan Svoboda authored
This moves another piece of logic specific to `clang-scan-deps` into the `DependencyScanning` library. This makes it easier to check how the original command-line looked like in the library and will enable the library to stop inventing `-Wno-error` for modular dependencies (see D104036). Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D104031
-
Jan Svoboda authored
The `clang-scan-deps` tool has some logic that parses and modifies the original Clang command-line. The goal is to setup `DependencyOutputOptions` by injecting `-M -MT <target>` and prevent the creation of output files. This patch moves the logic into the `DependencyScanning` library, and uses the parsed `CompilerInvocation` instead of the raw command-line. The code simpler and can be used from the C++ API as well. The `-o /dev/null` arguments are not necessary, since the `DependencyScanning` library only runs a preprocessing action, so there's no way it'll produce an actual object file. Related: The `-M` argument implies `-w`, which would appear on the command-line of modular dependencies even though it was not on the original TU command line (see D104036). Some related tests were updated. Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D104030
-
Jan Svoboda authored
[clang][deps] Move stripping of diagnostic serialization from `clang-scan-deps` to `DependencyScanning` library To prevent the creation of diagnostics file, `clang-scan-deps` strips the corresponding command-line argument. This behavior is useful even when using the C++ `DependencyScanner` library. This patch transforms stripping of command-line in `clang-scan-deps` into stripping of `CompilerInvocation` in `DependencyScanning`. AFAIK, the `clang-cl` driver doesn't even accept `--serialize-diagnostics`, so I've removed the test. (It would fail with an unknown command-line argument otherwise.) Note: Since we're generating command-lines for modular dependencies from `CompilerInvocation`, the `--serialize-diagnostics` will be dropped. This was already happening in `clang-scan-deps` before this patch, but it will now happen also when using `DependencyScanning` library directly. This is resolved in D104036. Reviewed By: dexonsmith, arphaman Differential Revision: https://reviews.llvm.org/D104012
-
Gabor Marton authored
Update `setConstraint` to simplify existing equivalence classes when a new constraint is added. In this patch we iterate over all existing equivalence classes and constraints and try to simplfy them with simplifySVal. This solves problematic cases where we have two symbols in the tree, e.g.: ``` int test_rhs_further_constrained(int x, int y) { if (x + y != 0) return 0; if (y != 0) return 0; clang_analyzer_eval(x + y == 0); // expected-warning{{TRUE}} clang_analyzer_eval(y == 0); // expected-warning{{TRUE}} return 0; } ``` Differential Revision: https://reviews.llvm.org/D103314 -
Jan Svoboda authored
When a translation unit uses a PCH and imports the same modules as the PCH, we'd prefer to resolve to those modules instead of inventing new modules and reporting them as modular dependencies. Since the PCH modules have already been built nudge the compiler to reuse them when deciding whether to build a new module and don't report them as regular modular dependencies. Depends on D103524 & D103802. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D103526
-
Haojian Wu authored
-
Diana Picus authored
Add an implementation for CPU_TIME using the POSIX function clock_gettime. I think on most POSIX systems this will be included for free via <ctime>, which corresponds to "time.h" (YMMV, we can fix the code if the need arises). Detecting that clock_gettime is available is tricky. For instance, commit 827407a8 used the following incantation in f18-parse-demo.cpp: #if _POSIX_C_SOURCE >= 199309L && _POSIX_TIMERS > 0 && _POSIX_CPUTIME && \ defined CLOCK_PROCESS_CPUTIME_ID This doesn't work on my AArch64 Ubuntu system, which provides clock_gettime but doesn't define _POSIX_TIMERS. Since finding the right combination of macros requires infinite time, patience and access to sundry POSIX systems, we should probably try a different approach. This patch attempts to use SFINAE instead of the preprocessor to choose an implementation for CPU_TIME. We define a helper function template which helps us check if clock_gettime is available (and has the interface we expect). I hope the comments explain it well enough. This approach has the advantage that it keeps the detection of clock_gettime close to the code that uses it. An alternative would be to use CMake to check for the symbol (I personally haven't used this before so I don't know if there are any quirks). Differential Revision: https://reviews.llvm.org/D104020
-
David Spickett authored
-
Guillaume Chatelet authored
This reverts commit e63f27a3.
-
Jan Svoboda authored
The `PreprocessOnlyAction` doesn't support loading the AST file of a precompiled header. This is problematic for dependency scanning, since the `#include` manufactured for the PCH is treated as textual. This means the PCH contents get scanned with each TU, which is redundant. Moreover, dependencies of the PCH end up being considered dependency of the TU. To handle AST file of PCH properly, this patch creates new `FrontendAction` that behaves the same way `PreprocessorOnlyAction` does, but treats the manufactured PCH `#include` as a normal compilation would (by not claiming it only uses a preprocessor and creating the default AST consumer). The AST file is now reported as a file dependency of the TU. Depends on D103519. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D103524
-
David Spickett authored
Completely forgot to actually update the change before relanding it. This adds the Darwin AVX changes.
-
David Spickett authored
This reverts commit db93e4e7. This modifies TestRegsters.py to account for Darwin showing AVX registers as part of "Floating Point Registers" instead of in a separate "Advanced Vector Extensions" category.
-
Jan Svoboda authored
It's useful to be able to load explicitly-built PCH files into an implicit build (e.g. during dependency scanning). That's currently impossible, since the explicitly-built PCH has an empty modules cache path, while the current compilation has (and needs to have) a valid path, triggering an error in the `PCHValidator`. This patch adds a preprocessor option and command-line flag that can be used to omit this check. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D103802
-
Guillaume Chatelet authored
Each of these elementary operations can be assembled to support higher order constructs (Overlapping access, Loop, Aligned Loop). The patch does not compile yet as it depends on other ones (D100571, D100631) but it allows to get the conversation started. Differential Revision: https://reviews.llvm.org/D100646
-
Jan Svoboda authored
This patch stops adjusting the frontend action when `clang-scan-deps` is configured to use the full output format. In a future patch, the dependency scanner needs to check whether the original compiler invocation builds a PCH. That's impossible when `-Eonly` et al. override `-emit-pch`. The `-Eonly` flag is not needed - the dependency scanner explicitly sets up its own frontend action anyways. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D103461
-
Guillaume Chatelet authored
There's no need for `toSmallVector()` as `SmallVector.h` already provides a `to_vector` free function that takes a range. Reviewed By: Quuxplusone Differential Revision: https://reviews.llvm.org/D104024
-
Diana Picus authored
Add an implementation for CPU_TIME based on std::clock(), which should be available on all the platforms that we support. Also add a test that's basically just a sanity check to make sure we return positive values and that the value returned at the start of some amount of work is larger than the one returned after the end. Differential Revision: https://reviews.llvm.org/D104019
-
Simon Moll authored
This patch implements vector-predicated intrinsics on IR level for fadd, fsub, fmul, fdiv and frem. There operate in the default floating-point environment. We will use constrained fp operand bundles for constrained vector-predicated fp math (D93455). Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D93470
-