- Jan 14, 2022
-
-
Arthur Eubanks authored
If a function has many uses, this can take a good chunk of compile times. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D117236
-
Peter Klausler authored
We already accept assignments of INTEGER to LOGICAL (& vice versa) as an extension, but not initialization. Extend initialization to cover those cases. (Also fix misspelling in nearby comment as suggested by code reviewer.) Decouple an inadvertent dependence cycle by moving two one-line function definitions into a header file. Differential Revision: https://reviews.llvm.org/D117159
-
Whitney Tsang authored
getLoopIndex() is added to get the loop index of a given loop. getLoopsAtDepth() is added to get the loops in the nest at a given depth. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D115590
-
Roman Lebedev authored
-
Congzhe Cao authored
This patch enables loop interchange with multiple outer loop induction variables, and hence removes the limitation that only a single outer loop induction variable is supported. In fact, it turns out that the current pass already trivially supports multiple outer indvars, which is the result of a previous patch `https://reviews.llvm.org/D102743`. Therefore, this patch removed that limitation and provides test cases for multiple outer indvars. Reviewed By: bmahjour Differential Revision: https://reviews.llvm.org/D114916
-
Philip Reames authored
-
Venkata Ramanaiah Nalamothu authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D117243
-
Jack Kirk authored
Adds NVPTX intrinsics and builtins for CUDA PTX cvt instructions for sm80 architectures and above. Requires ptx 7.0. PTX ISA description of cvt instructions : https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#data-movement-and-conversion-instructions-cvt Signed-off-by:
JackAKirk <jack.kirk@codeplay.com> Differential Revision: https://reviews.llvm.org/D116673
-
Sam McCall authored
During pop() we convert nodes into spans of expanded syntax::Tokens. If we precompute a range of plausible (expanded) tokens, then we can do an extremely cheap approximate hit-test against it, because syntax::Tokens are ordered by pointer. This would seem not to buy anything (we don't enter nodes unless they overlap the selection), but in fact the spans we have are for *newly* claimed ranges (i.e. those unclaimed by any child node). So if you have: { { [[2+2]]; } } then all of the CompoundStmts pass the hit test and are pushed, but we skip full hit-testing of the brackets during pop() as they lie outside the range. This is ~10x average speedup for selectiontree on a bad case I've seen (large gtest file). Differential Revision: https://reviews.llvm.org/D117107 -
Sam McCall authored
Not sure it's OK to suppress this in clang itself - if we're building a PCH or module, maybe it matters? Differential Revision: https://reviews.llvm.org/D116925
-
Peter Klausler authored
Implements part of the legacy "DEC structures" feature from VMS Fortran. STRUCTUREs are processed as if they were derived types with SEQUENCE. DATA-like object entity initialization is supported as well (e.g., INTEGER FOO/666/) since it was used for default component initialization in structures. Anonymous components (named %FILL) are also supported. These features, and UNION/MAP, were already being parsed. An omission in the collection of structure field names in the case of nested structures with entity declarations was fixed in the parser. Structures are supported in modules, but this is mostly for testing purposes. The names of fields in structures accessed via USE association cannot appear with dot notation in client code (at least not yet). DEC structures antedate Fortran 90, so their actual use in applications should not involve modules. This patch does not implement UNION/MAP, since that feature would impose difficulties later in lowerin...
-
Sam McCall authored
This reuses the type=>decl mapping from go-to-definition on auto. (Which could stand some improvement, but that can happen later). Fixes https://github.com/clangd/clangd/issues/367 Differential Revision: https://reviews.llvm.org/D116443
-
Roman Lebedev authored
Let's consider sequential min/max expression family to be more complex than their non-sequential counterparts, preserving internal ordering within them.
-
Roman Lebedev authored
-
Philip Reames authored
-
Roman Lebedev authored
I strongly believe we need some variant of this. The main problem is e.g. that the glibc's assert has 4 parameters, but the profitability check is only okay with one extra phi node, so D116692 doesn't even trigger on most of the expected cases. While that restriction probably makes sense in normal code, if we are about to run off of a cliff (into an `unreachable`), this successor block is unlikely so the cost to setup these PHI nodes should not be on the hotpath, and shouldn't matter performance-wise. Likewise, we don't sink if there are unconditional predecessors UNLESS we'd sink at least one non-speculatable instruction, which is a performance workaround, but if we are about to run into `unreachable`, it shouldn't matter. Note that we only allow the case where there are at most unconditiona branches on the way to the unreachable block. Differential Revision: https://reviews.llvm.org/D117045
-
Louis Dionne authored
-
Craig Topper authored
The code uses floor not trunc.
-
Tue Ly authored
-
Louis Dionne authored
-
Fangrui Song authored
See `gcc -dumpspecs` that -r essentially implies -nostdlib and suppresses default -l* and crt*.o. The behavior makes sense because otherwise there will be assuredly conflicting definitions when the relocatable output is linked into the final executable/shared object. Reviewed By: thesamesam, phosek Differential Revision: https://reviews.llvm.org/D116843
-
Christian Sigg authored
Combine the sm-version tests into a single file. Reviewed By: bkramer, tra Differential Revision: https://reviews.llvm.org/D117198
-
Julian Lettner authored
All credit to Martin Storsjö (mstorsjo) who describes the issue here: https://github.com/llvm/llvm-project/issues/53167 Differential Revision: https://reviews.llvm.org/D117179
-
Christian Sigg authored
Reviewed By: bkramer, tra Differential Revision: https://reviews.llvm.org/D117204
-
Dave Lee authored
Convert the `crashlog` command to be implemented as a class. The `Symbolicate` function is switched to a class, to implement `get_long_help`. The text for the long help comes from the help output generated by `OptionParser`. That is, the output of `help crashlog` is the same as `crashlog --help`. Differential Revision: https://reviews.llvm.org/D117165
-
Louis Dionne authored
This makes all the tests consistent and improves code coverage. This also uncovers a bug with negative indices in advance() (which also impacts prev()) -- I'll fix that in a subsequent patch. I chose to only count operations in the tests for ranges::advance because doing so in prev() and next() too was reaching diminishing returns, and didn't meaningfully improve our test coverage.
-
Markus Böck authored
The names of the generated attribute getters for ops changed some time ago. The method created from the attribute name returns the return type and an additional method of the same name with Attr as suffix is generated which returns the actual attribute as its storage type. The code generating effects however was using the methods without the Attr suffix, which is a problem in the case of FlatSymbolRefAttr as it has a return type of llvm::StringRef. This would lead to compilation errors as the constructor of SideEffects::EffectInstance expects a SymbolRefAttr in this case. This patch simply fixes the generated effects code to use the Attr suffixed getter to get the actual storage type of the attribute. Differential Revision: https://reviews.llvm.org/D117194
-
Duncan P. N. Exon Smith authored
Stop allowing use of `SmallVectorBase::set_size()` outside of the SmallVector implementation, which sets the size without calling constructors or destructors. Most callers should probably just use `resize()`. Or, if the new size is guaranteed to be `<= size()`, then the new-ish `truncate()` works too (and optimizes better). Some callers want to avoid initializing memory before overwriting, but need a pointer to the memory and so cannot use `push_back()`, `emplace_back()`, or `append()`. Before this commit, this depended on `reserve()` and `set_size()`: ``` V.reserve(V.size() + NumNew); // Reserve expected size. NumNew = initialize(V.end(), ...); // Get number added. V.set_size(V.size() + NumNew); // Set size to match. ``` Such code should be updated to use `resize_for_overwrite()` and `truncate()`: ``` auto Size = V.size(); // Save initial size. V.resize_for_overwrite(Size + NumNew); // Resize to expected size. NumNew = initialize(V.begin() + Size, ...)); // Get number added. V.truncate(Size + NumNew); // Truncate to match. ``` The new pattern is safe even for non-trivial types, since `resize_for_overwrite()` calls constructors and `truncate()` calls destructors. For trivial types, it should optimize the same way as the old pattern. Downstream code adapt to the disappearance of `set_size()` using this new pattern should carefully audit uses of `V` between the resize and the truncate: - Change `V.size()` => `Size`. - Change `V.capacity()` => `V.size()` (mostly). - Change `V.end()` => `V.begin() + Size`. - If `V` is an out-parameter, early returns need a `V.truncate()` or `V.clear()`. A scope exit is recommended. Differential Revision: https://reviews.llvm.org/D115380
-
Tue Ly authored
Add threading support for exhaustive testing and MPFRUtils. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D117028
-
Mehdi Amini authored
-
Peter Klausler authored
[flang] Any type can appear in a structure constructor for an unlimited polymorphic allocatable component A bogus error message is appearing for structure constructors containing values that correspond to unlimited polymorphic allocatable components. A value of any type can actually be used. Differential Revision: https://reviews.llvm.org/D117154
-
Duncan P. N. Exon Smith authored
-
Tue Ly authored
Add an extra argument for rounding mode to EXPECT_MPFR_MATCH and ASSERT_MPFR_MATCH macros. Reviewed By: sivachandra, michaelrj Differential Revision: https://reviews.llvm.org/D116777
-
Craig Topper authored
CodeGen for this can be improved.
-
Rob Suderman authored
Adding the optional decompositions have been verified to improve memory usage on common models. Added the decomposition to the default tosa to linalg passes. Reviewed By: NatashaKnk Differential Revision: https://reviews.llvm.org/D117175
-
Duncan P. N. Exon Smith authored
Spotted this in a final grep of projects I don't usually build before pushing https://reviews.llvm.org/D115380, which makes `SmallVector::set_size()` private. Update to `truncate()`, a new-ish variant of `resize()` that asserts the new size is not bigger and that avoids pulling in the allocation and initialization code for growing. Doesn't really look like the perf impact of that would matter here, but since `dirLength` is known to be a smaller size then we might as well. Differential Revision: https://reviews.llvm.org/D117073
-
Andrew Browne authored
[NFC][DFSan] Update DataFlowSanitizer user docs for -dfsan-conditional-callbacks, added in https://reviews.llvm.org/D116207 Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D117177
-
Louis Dionne authored
-