- Mar 18, 2021
-
-
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 ... -
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
-
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
-
Amara Emerson authored
The previous technique relied on early-exiting the legalizer predicate initialization, leaving an empty rule table. That causes a fallback for most instructions, but some have legacy rules defined like G_ZEXT which can try continue, but then crash. We should fall back earlier, in the translator, to avoid this issue. Differential Revision: https://reviews.llvm.org/D98730
-
Steven Wu authored
Fix a bug in MachOObjectFile::getSymbolType() that it is not checking if the iterator is end() before deference the iterator. Instead, return `Other` type, which aligns with the behavior of `llvm-nm`. rdar://75291638 Reviewed By: davide, ab Differential Revision: https://reviews.llvm.org/D98739
-
Nathan James authored
Changing matchers to use non-const members and adding r-value overloads of matcher conversions enables move optimisations. I don't have performance figures but I can say this knocked 120k from the clang-tidy binary(86k was from the .text section) on a Release with assertions build(x86_64-unknown-linux-gnu). Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D98792
-
David Green authored
This uses the shuffle mask cost from D98206 to give a better cost of MVE VREV instructions. This helps especially in VectorCombine where the cost of shuffles is used to reorder bitcasts, which this helps keep the phase ordering test for fp16 reductions producing optimal code. The isVREVMask has been moved to a header file to allow it to be used across target transform and isel lowering. Differential Revision: https://reviews.llvm.org/D98210
-
River Riddle authored
This has been a TODO for a while, and prevents breakages for attributes/types that contain floats that can't roundtrip outside of the hex format. Differential Revision: https://reviews.llvm.org/D98808
-
Arthur Eubanks authored
All loop passes should preserve all analyses in LoopAnalysisResults. Add checks for those. Note that due to PR44815, we don't check LAR's ScalarEvolution. Apparently calling SE.verify() can change its results. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D98805
-
Ricky Taylor authored
At the moment `getMCInstrBeads` is forward-declared in a few places, bring this together into a single header file. This was done as part of the disassembler work, since the disassembler would otherwise add one more forward declaration. Differential Revision: https://reviews.llvm.org/D98533
-