- Mar 18, 2021
-
-
Valeriy Savchenko authored
Cleanup attribute allows users to attach a destructor-like functions to variable declarations to be called whenever they leave the scope. The logic of such functions is not supported by the Clang's CFG and is too hard to be reasoned about. In order to avoid false positives in this situation, we assume that we didn't see ALL of the executtion paths of the function and, thus, can warn only about multiple call violation. rdar://74441906 Differential Revision: https://reviews.llvm.org/D98694
-
Vladislav Vinogradov authored
Do not limit the number of arguments in rewriter pattern. Introduce separate `FmtStrVecObject` class to handle format of variadic `std::string` array. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D97839
-
Wang, Pengfei authored
-
Bing1 Yu authored
-
Valeriy Savchenko authored
This patch introduces a very simple inter-procedural analysis between blocks and enclosing functions. We always analyze blocks first (analysis is done as part of semantic analysis that goes side-by-side with the parsing process), and at the moment of reporting we don't know how that block will be actually used. This patch introduces new logic delaying reports of the "never called" warnings on blocks. If we are not sure that the block will be called exactly once, we shouldn't warn our users about that. Double calls, however, don't require such delays. While analyzing the enclosing function, we can actually decide what we should do with those warnings. Additionally, as a side effect, we can be more confident about blocks in such context and can treat them not as escapes, but as direct calls. rdar://74090107 Differential Revision: https://reviews.llvm.org/D98688
-
Fraser Cormack authored
Without this patch, bitcasts of fixed-length mask vectors would go through the stack. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D98779
-
Luo, Yuanke authored
D93594 depend on the dominate tree and loop information. It increased the compile time when build with -O0. However this is just to amend the dominate tree and loop information, so that it is unnecessary to re-analyze them again. Given the dominate tree of loop information are absent in this pass, we can avoid amending them. Differential Revision: https://reviews.llvm.org/D98773
-
Sjoerd Meijer authored
Don't rewrite an add instruction with 2 SET_CC operands into a csel instruction. The total instruction sequence uses an extra instruction and register. Preventing this allows us to match a `(add, csel)` pattern and rewrite this into a `cinc`. Differential Revision: https://reviews.llvm.org/D98704
-
Markus Böck authored
The current cmake script attempts to add the path containing clangs various runtime systems by getting the resource directory and then appending the hardcoded value /lib/windows to it. This works for a normal clang-cl build but fails for a build of clang using LLVM_ENABLE_PER_TARGET_RUNTIME_DIR, such as the builds from llvm/runtimes. This patch instead uses -print-libgcc-file-name in conjunction with --rtlib=compiler-rt, and instead adds the containing directory as library path. For non per-target runtime directory builds, such as the release builds, there is no change. Even if the builtins library were to be deleted or moved it would output the same path as before. For per-target runtime builds that also have the builtins library, this now finds the correct directory containing all of clang runtime libraries. Only case still not handled by this change, is if a per-target runtime directory build is used, but the builtins library was not built. I believe that is the best we can do for now however, without modifying clang. Differential Revision: https://reviews.llvm.org/D98786
-
Maxim Kuvyrkov authored
The patch was wrong. We use "const Arg *A" at the end of GetLinkerPath, so can't remove it. This reverts commit 6802fdf8.
-
Frederik Gossen authored
This covers cases that are not folded away because the extent tensor type becomes more concrete in the process. Differential Revision: https://reviews.llvm.org/D98782
-
Maxim Kuvyrkov authored
Noticed this while I was looking at linker defaults. Reviewed By: asl Differential Revision: https://reviews.llvm.org/D98494
-
Maxim Kuvyrkov authored
At the moment "link.exe" is hard-coded as default linker in MSVC.cpp, so there's no way to use LLD as default linker for MSVC driver. This patch adds checking of CLANG_DEFAULT_LINKER to MSVC.cpp. Reviewed By: asl Differential Revision: https://reviews.llvm.org/D98493
-
Lang Hames authored
-
Lang Hames authored
Switches all backends to use the makeTargetOutOfRangeError function from JITLink.h.
-
Artem Dergachev authored
This category is generic enough to hold a variety of checkers. Currently it contains the Dead Stores checker and an alpha unreachable code checker. Differential Revision: https://reviews.llvm.org/D98741
-
Zakk Chen authored
Add new field PermuteOperands to mapping different operand order between C/C++ API and clang builtin. Reviewed By: craig.topper, rogfer01 Authored-by:
Roger Ferrer Ibanez <rofirrim@gmail.com> Co-Authored-by:
Hsiangkai Wang <kai.wang@sifive.com> Co-Authored-by:
Zakk Chen <zakk.chen@sifive.com> Differential Revision: https://reviews.llvm.org/D98388
-
Zakk Chen authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D96843
-
ShihPo Hung authored
This patch changes the operand order of masked vmslt[u] from (mask, rs1, scalar, maskedoff, vl) to (maskedoff, rs1, scalar, mask, vl). Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D98839
-
Vitaly Buka authored
-
Krzysztof Parzyszek authored
-
Vitaly Buka authored
-
Krzysztof Parzyszek authored
The offset in HVX loads/stores is only 4 bits long, so often an extra register is needed to hold the address. Minimize the number of such registers by "standardizing" the base addresses and reusing preexisting base registers when replacing frame indices.
-
Krzysztof Parzyszek authored
In particular, add patterns for loads/stores to the stack (with a frame index as address).
-
Chen Zheng authored
-
Chen Zheng authored
Author: hubert.reinterpretcast, shchenz Reviewed By: jasonliu, echristo Differential Revision: https://reviews.llvm.org/D97186
-
Amara Emerson authored
These are pseudos without any users, so DCE was killing them in the combiner. Marking them as having side effects doesn't seem quite right since they don't. Gives a nice 0.3% geomean size win on CTMark -Os. Differential Revision: https://reviews.llvm.org/D98811
-
Carl Ritson authored
Avoid revisiting nodes with the same set of defined lanes by using a unified visited set which integrates lanes into the key. This retains the intent of the original code by still revisiting a subgraph if a different set of lanes is defined and hence marking might progress differently. Note: default size of the visited set has been confirmed to cover >99% of invocations in large array of test shaders. Reviewed By: piotr Differential Revision: https://reviews.llvm.org/D98772
-
River Riddle authored
This performs a few rewordings, expands on a few parts, etc.
-
River Riddle authored
This was missed when the feature was originally added. Differential Revision: https://reviews.llvm.org/D87060
-
Rob Suderman authored
Lowering to subtensor is added for tosa.slice operator. Differential Revision: https://reviews.llvm.org/D98825
-
Alex Lorenz authored
This reverts commit 809a1e0f. Mach-O doesn't support dso_local and this change broke XNU because of the use of dso_local. Differential Revision: https://reviews.llvm.org/D98458
-
Richard Smith authored
This would assert if we hit the evaluation step limit between starting to delay the call and finishing. In any case, delaying the call was largely pointless as it doesn't really matter when we mark the evaluation as having had side effects.
-
Vitaly Buka authored
InternalScopedString uses InternalMmapVector internally so it can be resized dynamically as needed. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D98751
-
Joel E. Denny authored
Fixed substitution printing not to produce an empty diagnostic for errors handled elsewhere. Reviewed By: thopre Differential Revision: https://reviews.llvm.org/D98088
-
Joel E. Denny authored
A more general name might be match-time error propagation. That is, it's conceivable we'll one day have non-numeric errors that require the handling fixed by this patch. Without this patch, FileCheck behaves as follows: ``` $ cat check CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]] $ FileCheck -vv -dump-input=never check < input check:1:54: remark: implicit EOF: expected string found in input CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]] ^ <stdin>:2:1: note: found here ^ check:1:15: error: unable to substitute variable or numeric expression: overflow error CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]] ^ $ echo $? 0 ``` Notice that the exit status is 0 even though there's an error. Moreover, FileCheck doesn't print the error diagnostic unless both `-dump-input=never` and `-vv` are specified. The same problem occurs when `CHECK-NOT` does have a match but a capture fails due to overflow: exit status is 0, and no diagnostic is printed unless both `-dump-input=never` and `-vv` are specified. The usefulness of capturing from `CHECK-NOT` is questionable, but this case should certainly produce an error. With this patch, FileCheck always includes the error diagnostic and has non-zero exit status for the above examples. It's conceivable that this change will cause some existing tests to fail, but my assumption is that they should fail. Moreover, with nearly every project enabled, this patch didn't produce additional `check-all` failures for me. This patch also extends input dumps to include such numeric error diagnostics for both expected and excluded patterns. As noted in fixmes in some of the tests added by this patch, this patch worsens an existing issue with redundant diagnostics. I'll fix that bug in a subsequent patch. Reviewed By: thopre, jhenderson Differential Revision: https://reviews.llvm.org/D98086
-
Richard Smith authored
PR49585: Emit the jump destination for a for loop 'continue' from within the scope of the condition variable. The condition variable is in scope in the loop increment, so we need to emit the jump destination from wthin the scope of the condition variable. For GCC compatibility (and compatibility with real-world 'FOR_EACH' macros), 'continue' is permitted in a statement expression within the condition of a for loop, though, so there are two cases here: * If the for loop has no condition variable, we can emit the jump destination before emitting the condition. * If the for loop has a condition variable, we must defer emitting the jump destination until after emitting the variable. We diagnose a 'continue' appearing in the initializer of the condition variable, because it would jump past the initializer into the scope of that variable. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D98816
-
- Mar 17, 2021
-
-
Mike Rice authored
Added basic parsing/sema/serialization support for the 'use' clause. Differential Revision: https://reviews.llvm.org/D98815
-
Arthur Eubanks authored
This reverts commit 6db3ab29. Causing too large of compile time regression.
-
Greg McGary authored
Move some functions closer to their uses. Move detailed address-assignment logic out of the otherwise abstract `Writer::run()`. This prepares the ground for a diff to implement branch range extension thunks. * `SyntheticSections.cpp` ** move `needsBinding()` and `prepareBranchTarget()` into `Writer.cpp` ** move `addNonLazyBindingEntries()` adjacent to its use. * `Writer.cpp` ** move address-assignment logic from `Writer::run()` into new function `Writer::assignAddresses()` ** move `needsBinding()` and `prepareBranchTarget()` from `SyntheticSections.cpp` * `Target.h` ** remove orphaned decls of `prepareSymbolRelocation()` and `validateRelocationInfo()` which were moved to other files in earlier diffs. Differential Revision: https://reviews.llvm.org/D98795
-