- Jul 31, 2022
-
-
Jun Zhang authored
Without this patch, clang-repl incorrectly pass some tests when there's error occured. Signed-off-by:
Jun Zhang <jun@junz.org> Differential Revision: https://reviews.llvm.org/D130422
-
Simon Pilgrim authored
Only PACKSS/PACKUS faux shuffles make use of the demanded elts at the moment, but this at least improves the handling of a couple of truncation patterns.
-
Dawid Jurczak authored
CalculateSmallVectorDefaultInlinedElements<..>::value is already used as default value for second template parameter in SmallVector class declaration. There is no need to pass it explicitly in to_vector. Extracted from: https://reviews.llvm.org/D129781 Differential Revision: https://reviews.llvm.org/D130774
-
Jun Zhang authored
Signed-off-by:Jun Zhang <jun@junz.org>
-
Fangrui Song authored
My lld executable is 1.6KiB smaller and some functions are now more efficient.
-
Fangrui Song authored
Keep the main SectionBase hierarchy in InputSection.h. And inline MergeInputSection::getParent.
-
Sunho Kim authored
-
Sunho Kim authored
Handles COMDAT symbol with an offset and refactor the code to only generated symbol if the second symbol was encountered. This happens very infrequently but happens in recursive_mutex implementation of MSVC STL library. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D130454
-
Sunho Kim authored
Implements remaining IMAGE_REL_AMD64_REL32_*. We only need IMAGE_REL_AMD64_REL32_4 for now but doing all remaining ones for completeness. (clang only uses IMAGE_REL_AMD64_REL32_1 and IMAGE_REL_AMD64_REL32) Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D130452
-
Sunho Kim authored
Relax zero-fill edge assertions to only consider relocation edges. Keep-alive edges to zero-fill blocks can cause this assertion which is too strict. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D130450
-
Fangrui Song authored
-
Nico Weber authored
-
srishti-cb authored
Added a commutativity utility pattern and a function to populate it. The pattern sorts the operands of an op in ascending order of the "key" associated with each operand iff the op is commutative. This sorting is stable. The function is intended to be used inside passes to simplify the matching of commutative operations. After the application of the above-mentioned pattern, since the commutative operands now have a deterministic order in which they occur in an op, the matching of large DAGs becomes much simpler, i.e., requires much less number of checks to be written by a user in her/his pattern matching function. The "key" associated with an operand is the list of the "AncestorKeys" associated with the ancestors of this operand, in a breadth-first order. The operand of any op is produced by a set of ops and block arguments. Each of these ops and block arguments is called an "ancestor" of this operand. Now, the "AncestorKey" associated with: 1. A block argument is `{type: BLOCK_ARGUMENT, opName: ""}`. 2. A non-constant-like op, for example, `arith.addi`, is `{type: NON_CONSTANT_OP, opName: "arith.addi"}`. 3. A constant-like op, for example, `arith.constant`, is `{type: CONSTANT_OP, opName: "arith.constant"}`. So, if an operand, say `A`, was produced as follows: ``` `<block argument>` `<block argument>` \ / \ / `arith.subi` `arith.constant` \ / `arith.addi` | returns `A` ``` Then, the block arguments and operations present in the backward slice of `A`, in the breadth-first order are: `arith.addi`, `arith.subi`, `arith.constant`, `<block argument>`, and `<block argument>`. Thus, the "key" associated with operand `A` is: ``` { {type: NON_CONSTANT_OP, opName: "arith.addi"}, {type: NON_CONSTANT_OP, opName: "arith.subi"}, {type: CONSTANT_OP, opName: "arith.constant"}, {type: BLOCK_ARGUMENT, opName: ""}, {type: BLOCK_ARGUMENT, opName: ""} } ``` Now, if "keyA" is the key associated with operand `A` and "keyB" is the key associated with operand `B`, then: "keyA" < "keyB" iff: 1. In the first unequal pair of corresponding AncestorKeys, the AncestorKey in operand `A` is smaller, or, 2. Both the AncestorKeys in every pair are the same and the size of operand `A`'s "key" is smaller. AncestorKeys of type `BLOCK_ARGUMENT` are considered the smallest, those of type `CONSTANT_OP`, the largest, and `NON_CONSTANT_OP` types come in between. Within the types `NON_CONSTANT_OP` and `CONSTANT_OP`, the smaller ones are the ones with smaller op names (lexicographically). --- Some examples of such a sorting: Assume that the sorting is being applied to `foo.commutative`, which is a commutative op. Example 1: > %1 = foo.const 0 > %2 = foo.mul <block argument>, <block argument> > %3 = foo.commutative %1, %2 Here, 1. The key associated with %1 is: ``` { {CONSTANT_OP, "foo.const"} } ``` 2. The key associated with %2 is: ``` { {NON_CONSTANT_OP, "foo.mul"}, {BLOCK_ARGUMENT, ""}, {BLOCK_ARGUMENT, ""} } ``` The key of %2 < the key of %1 Thus, the sorted `foo.commutative` is: > %3 = foo.commutative %2, %1 Example 2: > %1 = foo.const 0 > %2 = foo.mul <block argument>, <block argument> > %3 = foo.mul %2, %1 > %4 = foo.add %2, %1 > %5 = foo.commutative %1, %2, %3, %4 Here, 1. The key associated with %1 is: ``` { {CONSTANT_OP, "foo.const"} } ``` 2. The key associated with %2 is: ``` { {NON_CONSTANT_OP, "foo.mul"}, {BLOCK_ARGUMENT, ""} } ``` 3. The key associated with %3 is: ``` { {NON_CONSTANT_OP, "foo.mul"}, {NON_CONSTANT_OP, "foo.mul"}, {CONSTANT_OP, "foo.const"}, {BLOCK_ARGUMENT, ""}, {BLOCK_ARGUMENT, ""} } ``` 4. The key associated with %4 is: ``` { {NON_CONSTANT_OP, "foo.add"}, {NON_CONSTANT_OP, "foo.mul"}, {CONSTANT_OP, "foo.const"}, {BLOCK_ARGUMENT, ""}, {BLOCK_ARGUMENT, ""} } ``` Thus, the sorted `foo.commutative` is: > %5 = foo.commutative %4, %3, %2, %1 Signed-off-by:Srishti Srivastava <srishti.srivastava@polymagelabs.com> Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D124750
-
Sunho Kim authored
-
Sunho Kim authored
-
Sunho Kim authored
Since ArgList is not copyable we need to make sure it's moved explicitly.
-
Nico Weber authored
-
Sunho Kim authored
Implements include/alternatename linker directive. Alternatename is used by static msvc runtime library. Alias symbol is technically incorrect (we have to search for external definition) but we don't have a way to represent this in jitlink/orc yet, this is solved in the following up patch. Inlcude linker directive is used in ucrt to forcelly lookup the static initializer symbols so that they will be emitted. It's implemented as extenral symbols with live flag on that cause the lookup of these symbols. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D130276
-
Sunho Kim authored
We have seen random symbol not found "__cxa_throw" error in fuschia build bots and out-of-tree users. The understanding have been that they are built without exception support, but it turned out that these platforms have LLVM_STATIC_LINK_CXX_STDLIB ON so that they link libstdc++ to llvm statically. The reason why this is problematic for clang-repl is that by default clang-repl tries to find symbols from symbol table of executable and dynamic libraries loaded by current process. It needs to load another libstdc++, but the platform that had LLVM_STATIC_LINK_CXX_STDLIB turned on is usally those with missing or obsolate shared libstdc++ in the first place -- trying to load it again would be destined to fail eventually with a risk to introuduce mixed libstdc++ versions. A proper solution that doesn't take a workaround is statically link the same libstdc++ by clang-repl side, but this is not possible with old JIT linker runtimedyld. New just...
-
Joseph Huber authored
This test hasn't been fixed and causes spurious failures when testing. This patch sets it as unsupported until we have a reliable fix. Reviewed By: ronlieb Differential Revision: https://reviews.llvm.org/D130789
-
Craig Topper authored
Use masked operations to suppress spurious exception bits being set in fflags. Unfortunately, doing this adds extra copies.
-
Simon Pilgrim authored
[X86] Use std::tie so we can have more meaningful variable names for demanded bits/elts pairs. NFCI. *.first + *.second were proving difficult to keep track of.
-
Fangrui Song authored
-
Fangrui Song authored
-
Amir Ayupov authored
This diff uncovers an ASAN leak in getOrCreateJumpTable: ``` Indirect leak of 264 byte(s) in 1 object(s) allocated from: #1 0x4f6e48c in llvm::bolt::BinaryContext::getOrCreateJumpTable ... ``` The removal of an assertion needs to be accompanied by proper deallocation of a `JumpTable` object for which `analyzeJumpTable` was unsuccessful. This reverts commit 52cd00ca. -
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
Identified with modernize-use-override.
-
Kazu Hirata authored
Identified with readability-redundant-control-flow.
-
Kazu Hirata authored
Identified with modernize-use-nullptr.
-
Kazu Hirata authored
-
Kazu Hirata authored
Identified with llvm-header-guard.
-
Kazu Hirata authored
-
Craig Topper authored
This adds a merge operand to all of the binary _VL nodes. Including integer and widening. They all share multiclasses in tablegen so doing them all at once was easiest. I plan to use FADD_VL in an upcoming patch. The rest are just for consistency to keep tablegen working. This does reduce the isel table size by about 25k so that's nice. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D130816
-
Craig Topper authored
Based on review feedback from D130816.
-
Simon Pilgrim authored
Noticed by inspection and I can't seem to make a test case, but SSE arithmetic bit shifts clamp to the max shift amount (i.e. create a sign splat) - combineVectorShiftImm already does something similar.
-
Dmitry Vassiliev authored
This patch fixes the error llvm/lib/CodeGen/MachineScheduler.cpp(755): error C2065: 'MISchedCutoff': undeclared identifier in case of NDEBUG and LLVM_ENABLE_ABI_BREAKING_CHECKS. Note MISchedCutoff is declared under #ifndef NDEBUG. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D130425
-
- Jul 30, 2022
-
-
Sanjay Patel authored
https://alive2.llvm.org/ce/z/vBNiiM This matches variants of patterns that were folded with: b5a9361c
-
Austin Kerbow authored
-