- Sep 14, 2022
-
-
Chris Bieneman authored
HLSL requires aggressive inlineing for resource accesses. This just enforces that we get resource handle accesses inlined early.
-
Zequan Wu authored
Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D133794
-
Jim Kitchen authored
The new select operation allows filtering of sparse tensors by conditionally keeping or removing each element. This can be used to remove negative values or select the upper triangle of a matrix. The select op has a single region which operates on a single value and must return a boolean True to keep or False to drop. Reviewed by: aartbik Differential Revision: https://reviews.llvm.org/D133569
-
Evgeny Shulgin authored
If a redeclaration of a multiversion function is invalid, it may be in a broken condition (for example, missing an important attribute). We shouldn't analyze invalid redeclarations. Fixes https://github.com/llvm/llvm-project/issues/57343 Reviewed By: tahonermann Differential Revision: https://reviews.llvm.org/D133641
-
Chris Bieneman authored
HLSL doesn't have a C++ runtime that supports `atexit` registration. To enable global destructors we instead rely on the `llvm.global_dtor` mechanism. This change disables `atexit` generation for HLSL and updates the HLSL code generation to call global destructors on the exit from entry functions. Depends on D132977. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D133518
-
Jim Ingham authored
-
Jorge Gorbe Moya authored
Modify `SBTypeNameSpecifier` and `lldb_private::TypeMatcher` so they have an enum value for the type of matching to perform instead of an `m_is_regex` boolean value. This change paves the way for introducing formatter matching based on the result of a python callback in addition to the existing name-based matching. See the RFC thread at https://discourse.llvm.org/t/rfc-python-callback-for-data-formatters-type-matching/64204 for more details. Differential Revision: https://reviews.llvm.org/D133240
-
Jay Foad authored
In GFX10, there is no advantage to shrinking these instructions pre-RA, so this just saves a bit of work. In GFX11 there is an advantage to *not* shrinking them pre-RA, because the register classes for 16-bit operands are less restrictive in the VOP3 form than in the shrunk form. This patch is a prerequisite for actually setting up those register classes correctly for 16-bit vs non-16-bit operands. Differential Revision: https://reviews.llvm.org/D133769
-
Sotiris Apostolakis authored
When a select is converted to a branch and load instructions are sinked to the true/false blocks, lifetime intrinsics (if present) could be made unsound if not moved. This conservatively moves all lifetime intrinsics in a transformed BB to the end block to ensure preserved lifetime semantics. Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D133777
-
Chris Bieneman authored
The DXContainer is pretty primitive, but doesn't support COMDAT. We need to set that in the Triple so that Clang won't try to emit COMDATs.
-
theidexisted authored
Reviewed By: gchatelet Differential Revision: https://reviews.llvm.org/D129632
-
Philip Reames authored
Per original review, only one test needed the MIR output checks. Copy that to it's own file, and use auto-gen for all three files.
-
River Riddle authored
This adds bytecode support for DenseArrayAttr, DenseIntOrFpElementsAttr, DenseStringElementsAttr, and SparseElementsAttr. Differential Revision: https://reviews.llvm.org/D133744
-
River Riddle authored
Boolean splats currently can't roundtrip via the "raw" DenseElementsAttr API. This is because internally we treat true splats in some cases as "1"(one bit set) and in other cases as "0xFF"(all bits set). This commit cleans up this handling to consistently use 0xFF (all bits set) as the value for a splat of true. Differential Revision: https://reviews.llvm.org/D133743
-
River Riddle authored
This is necessary/useful for building generic tooling that can roundtrip external resources without needing to explicitly handle them. For example, this allows for viewing the resources encoded within a bytecode file without having to explicitly know how to process them (e.g. making it easier to interact with a reproducer encoded in bytecode). Differential Revision: https://reviews.llvm.org/D133460
-
River Riddle authored
Resources are encoded in two separate sections similarly to attributes/types, one for the actual data and one for the data offsets. Unlike other sections, the resource sections are optional given that in many cases they won't be present. For testing, bytecode serialization is added for DenseResourceElementsAttr. Differential Revision: https://reviews.llvm.org/D132729
-
Jessica Paquette authored
We don't need to populate a string table, so we don't need to pre-parse the remarks. Split the bitstream2yaml and yaml2bitstream cases up so that we can avoid the extra remark traversal in the bitstream2yaml case. This kills the TODO.
-
Siva Chandra Reddy authored
-
Michal Paszkowski authored
-
Zequan Wu authored
Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D133718
-
Christian Sigg authored
See https://discourse.llvm.org/t/use-bazelisk-for-bazel-buildbots/65188. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D133750
-
Craig Topper authored
Unary shuffles such as <0,2,4,6,8,10,12,14> or <1,3,5,7,9,11,13,15> where half the elements are returned, can be lowered using vnsrl. SelectionDAGBuilder lowers such shuffles as a build_vector of extract_elements since the mask has less elements than the source. To fix this, I've enable the extractSubvectorIsCheapHook to allow DAGCombine to rebuild the shuffle using 2 extract_subvectors preceding the shufffle. I've gone very conservative on extractSubvectorIsCheapHook to minimize test impact and match what we have test coverage for. This can be improved in the future. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D133736
-
Siva Chandra Reddy authored
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D133748
-
Jim Ingham authored
This is particularly a problem for alias construction, where you might want to have a backtick surrounded option in the alias. Before this patch: command alias expression -Z \`argc\` -- argv for instance would be rendered as: expression -Z argc -- argv and would fail to work. Differential Revision: https://reviews.llvm.org/D133045
-
Scott Linder authored
Add pointer-to-member example to AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack.md Differential Revision: https://reviews.llvm.org/D133735
-
Scott Linder authored
Differential Revision: https://reviews.llvm.org/D133734
-
Scott Linder authored
Differential Revision: https://reviews.llvm.org/D133733
-
Alex Bradbury authored
This hook is currently only used by CodeGenPrepare, which will sink *and duplicate* an 'and' into a block that has an 'icmp 0' user of it if the hook returns true. This hook is less useful for RISC-V than for targets like AArch64 that have a TBZ (test bit and branch if zero instruction), but may still be profitable if Zbs is available and a BEXTI can be selected. Conservatively, we return false even if Zbs is enabled for any masks that fit in the ANDI immediate because it's possible the only use is a branch on the result, and ANDI+BNEZ => BEXTI+BNEZ isn't a profitable transformation. Differential Revision: https://reviews.llvm.org/D131492
-
Zequan Wu authored
https://reviews.llvm.org/rGa3172df59c32aac48c113eb7d6a1324aaa95c474 breaks check-lldb gn build. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D133604
-
Gabriel Ravier authored
I went over the output of the following mess of a command: (ulimit -m 2000000; ulimit -v 2000000; git ls-files -z | parallel --xargs -0 cat | aspell list --mode=none --ignore-case | grep -E '^[A-Za-z][a-z]*$' | sort | uniq -c | sort -n | grep -vE '.{25}' | aspell pipe -W3 | grep : | cut -d' ' -f2 | less) and proceeded to spend a few days looking at it to find probable typos and fixed a few hundred of them in all of the llvm project (note, the ones I found are not anywhere near all of them, but it seems like a good start). Differential revision: https://reviews.llvm.org/D131122 -
Christian Sigg authored
The following replacements have been changed to `%mlir_lib_dir`: - `%linalg_test_lib_dir` - `%cuda_wrapper_library_dir` - `%spirv_wrapper_library_dir` - `%vulkan_wrapper_library_dir` - `%mlir_runner_utils_dir` - `%mlir_integration_test_dir` If there are no requests to delay submission, I plan to submit this on 9/13/2002 (Tuesday). See also PSA: https://discourse.llvm.org/t/psa-removing-mlir-lit-test-replacements/65124 Reviewed By: herhut Differential Revision: https://reviews.llvm.org/D133409
-
Jessica Paquette authored
All the functions in this file should be static to avoid ODR violations.
-
Daniel Bertalan authored
Previously, we would add entries to DataInCodeSection in the order they appeared in input files. Because of this, entries would not be sorted if sections were reordered due to e.g. `-order_file` or call graph profile sorting. ld64 always keeps data-in-code information sorted. This commit also fixes an incorrect assertion. The original assertion from D103006 used to check that data-in-code entries are sorted in the input objects -- likely because we use binary search on that data. In D115556, the assertion was moved into `collectDataInCodeEntries`, but the checked variable's name was not changed, so it ended up checking the final contents of the DataInCodeSection. We no longer crash when building LLVM with PGO using an asserts build of LLD as the linker. Fixes https://bugs.chromium.org/p/chromium/issues/detail?id=1265937 Numbers for linking the Chromium Framework reproducer from #48001, which has 6829 data-in-code entries: x before + after N Mi...
-
Slava Zakharin authored
subi(addi(a, b), b) -> a subi(addi(a, b), a) -> b subi(subi(a, b), a) -> subi(0, b) Differential Revision: https://reviews.llvm.org/D133615
-
David M. Lary authored
I encountered an issue where `p &variable` was finding an incorrect address for 32-bit PIC ELF files loaded into a running process. The problem was that the R_386_32 ELF relocations were not being applied to the DWARF section, so all variables in that file were reporting as being at the start of their respective section. There is an assert that catches this on debug builds, but silently ignores the issue on non-debug builds. In this changeset, I added handling for the R_386_32 relocation type to ObjectFileELF, and a supporting function to ELFRelocation to differentiate between DT_REL & DT_RELA in ObjectFileELF::ApplyRelocations(). Demonstration of issue: ``` [dmlary@host work]$ cat rel.c volatile char padding[32] = "make sure var isnt at .data+0"; volatile char var[] = "test"; [dmlary@host work]$ gcc -c rel.c -FPIC -fpic -g -m32 [dmlary@host work]$ lldb ./exec (lldb) target create "./exec" Current executable set to '/home/dmlary/src/work/exec' (i386). (lldb) process launch --stop-at-entry Process 21278 stopped * thread #1, name = 'exec', stop reason = signal SIGSTOP frame #0: 0xf7fdb150 ld-2.17.so`_start ld-2.17.so`_start: -> 0xf7fdb150 <+0>: movl %esp, %eax 0xf7fdb152 <+2>: calll 0xf7fdb990 ; _dl_start ld-2.17.so`_dl_start_user: 0xf7fdb157 <+0>: movl %eax, %edi 0xf7fdb159 <+2>: calll 0xf7fdb140 Process 21278 launched: '/home/dmlary/src/work/exec' (i386) (lldb) image add ./rel.o (lldb) image load --file rel.o .text 0x40000000 .data 0x50000000 section '.text' loaded at 0x40000000 section '.data' loaded at 0x50000000 (lldb) image dump symtab rel.o Symtab, file = rel.o, num_symbols = 13: Debug symbol |Synthetic symbol ||Externally Visible ||| Index UserID DSX Type File Address/Value Load Address Size Flags Name ------- ------ --- --------------- ------------------ ------------------ ------------------ ---------- ---------------------------------- [ 0] 1 SourceFile 0x0000000000000000 0x0000000000000000 0x00000004 rel.c [ 1] 2 Invalid 0x0000000000000000 0x0000000000000020 0x00000003 [ 2] 3 Invalid 0x0000000000000000 0x50000000 0x0000000000000020 0x00000003 [ 3] 4 Invalid 0x0000000000000025 0x0000000000000000 0x00000003 [ 4] 5 Invalid 0x0000000000000000 0x0000000000000020 0x00000003 [ 5] 6 Invalid 0x0000000000000000 0x0000000000000020 0x00000003 [ 6] 7 Invalid 0x0000000000000000 0x0000000000000020 0x00000003 [ 7] 8 Invalid 0x0000000000000000 0x0000000000000020 0x00000003 [ 8] 9 Invalid 0x0000000000000000 0x0000000000000020 0x00000003 [ 9] 10 Invalid 0x0000000000000000 0x0000000000000020 0x00000003 [ 10] 11 Invalid 0x0000000000000000 0x0000000000000020 0x00000003 [ 11] 12 X Data 0x0000000000000000 0x50000000 0x0000000000000020 0x00000011 padding [ 12] 13 X Data 0x0000000000000020 0x50000020 0x0000000000000005 0x00000011 var (lldb) p &var (volatile char (*)[5]) $1 = 0x50000000 ``` Reviewed By: labath Differential Revision: https://reviews.llvm.org/D132954 -
Kazu Hirata authored
This patch fixes: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5879:5: error: expression result unused [-Werror,-Wunused-value]
-
Arthur Eubanks authored
D129370 started hoisting allocas across stacksave/stackrestore boundaries which is wrong. Reviewed By: chill, rnk Differential Revision: https://reviews.llvm.org/D133730
-
Valery N Dmitriev authored
Make main/alternate operation selection logic for CmpInst consistent across SLP vectorizer. Differential Revision: https://reviews.llvm.org/D133430
-
Craig Topper authored
This is the ultimate fallback code if UADDO isn't supported. If the target uses 0/1 we used one compare, but if the target doesn't use 0/1 we emitted two compares. Regardless of boolean constants we should only need to check that the Result is less than one of the original operands. So we only need one compare. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D133708
-
Hendrik Greving authored
Adds MVT::v256i2, MVT::v128i4. Differential Revision: https://reviews.llvm.org/D133603
-