- Dec 02, 2022
-
-
Maryam Moghadas authored
This patch adds 3 Power10 VSX Scalar compare for quad precision instructions including xscmpeqqp, xscmpgeqp, xscmpgtqp Reviewed By: amyk Differential Revision: https://reviews.llvm.org/D138592
-
Alex Richardson authored
This value was added to clang/Basic in D111566, but is only used during codegen, where we can use the LLVM IR DataLayout instead. I noticed this because the downstream CHERI targets would have to also set this value for AArch64/RISC-V/MIPS. Instead of duplicating more information between LLVM IR and Clang, this patch moves getTargetAddressSpace(QualType T) to CodeGenTypes, where we can consult the DataLayout. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D138296
-
Bjorn Pettersson authored
-
Alexander Shaposhnikov authored
Add variadic SaturatingAdd. Test plan: ninja check-llvm-unit check-all Differential revision: https://reviews.llvm.org/D139036
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Roman Lebedev authored
-
Eli Friedman authored
I don't think compiler-generated code could actually be affected by this, but better to be thorough. Differential Revision: https://reviews.llvm.org/D139048
-
Sanjay Patel authored
This enhances the base fold from part 1 to allow mapping a right-shift to an insert index. Example of translating a middle chunk of the scalar to vector for either endian: https://alive2.llvm.org/ce/z/fRXCOZ This only allows creating an identity shuffle (with optional shortening/lengthening) because that is considered the safe baseline for any target (can be inverted if needed). If we tried this fold with target-specific costs/legality, then we could do the transform more generally. Differential Revision: https://reviews.llvm.org/D138873
-
Sanjay Patel authored
As noted in issue #59266, the logic reduction could be beyond the capabilities of an optimizing compiler, and the code with ternary op is easier to read either way.
-
Krzysztof Parzyszek authored
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Matt Arsenault authored
-
Matt Arsenault authored
There's a data race on the UninterestingChunks set. The code seems to be operating on the assumption that all the tasks completed, so ensure the unused results do complete. This started showing up about 50% of the time when running operands-skip-parallel.ll after the recent switch to use DenseSet; previously it failed much less frequently with std::set. We should introduce a mechanism to early terminate unused results. Alternatively, I've been thinking about ways to to make the reduction order smarter. I frequently have tests that take multiple minutes to compile and hit the failure. It may be helpful to see which chunks took the least time and prefer those over just taking the first result.
-
Paul Robinson authored
I built llvm with default triple sparc-sun-solaris2 and this test XPASSed so it seems safe enough.
-
Craig Topper authored
These instructions requires both register operands to be compressible so I've only applied the hint if we already have a GPRC physical register assigned for the other register operand. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D139079
-
Diego Caballero authored
Small change to support projected permutations in the `getPermutedPosition` utility. Renamed to `getResultPosition`. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D138946
-
Mitch Phillips authored
Extends the Asm reader/writer to support reading and writing the '.memtag' directive (including allowing it on internal global variables). Also add some extra tooling support, including objdump and yaml2obj/obj2yaml. Test that the sanitize_memtag IR attribute produces the expected asm directive. Uses the new Aarch64 MemtagABI specification (https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst) to identify symbols as tagged in object files. This is done using a R_AARCH64_NONE relocation that identifies each tagged symbol, and these relocations are tagged in a special SHT_AARCH64_MEMTAG_GLOBALS_STATIC section. This signals to the linker that the global variable should be tagged. Reviewed By: fmayer, MaskRay, peter.smith Differential Revision: https://reviews.llvm.org/D128958
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Philip Reames authored
This reuses the routine implemented in 0e6f0b7c to implement several existing TODOs. Many of the operations scale linearly with LMUL; this change represents that in the cost model. Differential Revision: https://reviews.llvm.org/D139039
-
ZHU Zijia authored
In branch relaxation pass, restore blocks are created and placed before the jump destination if indirect branches are required. For example: foo sd s11, 0(sp) jump .restore, s11 bar bar bar j .dest .restore: ld s11, 0(sp) .dest: baz The BasicBlock information of the restore MachineBasicBlock should be identical to the dest MachineBasicBlock. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D131863 -
ZHU Zijia authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D131862
-
Krzysztof Parzyszek authored
-
Slava Zakharin authored
This reverts commit d5b0de35.
-
Jonas Paulsson authored
Temporarily revert and fix buildbot failure. This reverts commit 6d12599f.
-
Jonas Paulsson authored
A new pass MachineLateInstrsCleanup is added to be run after PEI. This is a simple pass that removes redundant and identical instructions whenever found by scanning the MF once while keeping track of register definitions in a map. These instructions are typically immediate loads resulting from rematerialization, and address loads emitted by target in eliminateFrameInde(). This is enabled by default, but a target could easily disable it by means of 'disablePass(&MachineLateInstrsCleanupID);'. This late cleanup is naturally not "optimal" in removing instructions as it is done by looking at phys-regs, but still quite effective. It would be desirable to improve other parts of CodeGen and avoid these redundant instructions in the first place, but there are no ideas for this yet. Differential Revision: https://reviews.llvm.org/D123394 Reviewed By: RKSimon, foad, craig.topper, arsenm, asb
-
Roman Lebedev authored
-
Vlad Serebrennikov authored
Reviewed By: #clang-language-wg, aaron.ballman, erichkeane Differential Revision: https://reviews.llvm.org/D138822
-
Dave Lee authored
`GetNumCompileUnits` has fast execution, and is high firing. Fast and frequent functions are not good candidates for timers. In a recent profile, `GetNumCompileUnits` was called >>10k times with an average duration of 1 microsecond. Differential Revision: https://reviews.llvm.org/D138878
-
Shafik Yaghmour authored
Currently Sema::BuildCXXTypeConstructExpr asserts that list initialization must mean we have an InitListExpr as well. We have several cases of valid code the result in CXXTemporaryObjectExpr in the AST instead for list initialization. Commit 1ae689c2 seems to indicate that this is not unexpected, although may be a design issue This fixes: https://github.com/llvm/llvm-project/issues/58302 https://github.com/llvm/llvm-project/issues/58753 https://github.com/llvm/llvm-project/issues/59100 Differential Revision: https://reviews.llvm.org/D138947
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Jez Ng authored
If we have two files with the same weak symbol like so: ``` ltmp0: _weak: <contents> ``` and ``` ltmp1: _weak: <contents> ``` Linking them together should leave only one copy of `<contents>`, not two. Previously, we would keep around both copies because of the private-label `ltmp<N>` symbols (i.e. symbols that start with `l`) -- we would not coalesce those, so we would treat them as retaining the contents. This matters for more than just size -- we are depending upon this behavior internally for emitting a certain file format. This file format's header is repeated in each object file, but we want it to appear just once in our output. Why can't we not emit those aliases to `_weak`, or reference the `ltmp<N>` symbols instead of `_weak`? Well, MC actually adds `ltmp<N>` symbols as part of the assembly-to-binary translation step. So any codegen at the clang level can't access them. All that said... this solution is actually kind of hacky. Here, we avoid creating the private-label symbols at parse time. This is acceptable since we never emit those symbols in our output. However, in ld64, any aliasing temporary symbols (ignored or otherwise) won't retain coalesced data. But implementing this is harder -- we would have to create those symbols first (so we can emit their names later), but we would have to ensure the linker correctly shuffles them around when their aliasees get coalesced. Additionally, ld64 treats these temporary symbols as functionally equivalent to the weak symbols themselves -- that is, it will emit weak binds when those non-weak temporary aliases are referenced. We have imitated this behavior for private-label symbols, but implementing it for local aliases in general seems substantially more difficult. I'm not sure if any programs actually depend on this behavior though, so maybe it's a moot point. Finally, ld64 does all this regardless of whether `.subsections_via_symbols` is specified. We don't. But again, given how rare the lack of that directive is (I've only seen it from hand-written assembly inputs), I don't think we need to worry about it. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D139069
-
Florian Hahn authored
This slightly simplifies the code and addresses a correctness issue where the index scaling for the precondition was not considered properly. Thanks to @nikic for pointing that out in D137840.
-
Jean Perier authored
Add hlfir.associate and hlfir.end_associate codegen. To properly allow reusing the bufferized expression storage for the newly created variable, bufferization of hlfir.expr has to be updated so that hlfir.expr are translated to a variable and a boolean to indicate if the variable storage needs to be freed after the expression was used. That way the responsibility to free the bufferized expression can be passed to the variable user, and applied in the hlfir.end_associate. Right now, not of the bufferized expression are heap allocated, so generating the conditional freemem in hlfir.end_associate is left as a TODO for when it can be tested. Differential Revision: https://reviews.llvm.org/D139020
-
Alex Richardson authored
I just tried to build all experimental targets and noticed that DirectX did not build with -DBUILD_SHARED_LIBS=ON. Differential Revision: https://reviews.llvm.org/D138431
-
Florian Hahn authored
Extend test coverage for chained GEPs.
-
Jean Perier authored
Differential Revision: https://reviews.llvm.org/D139117
-
Jean Perier authored
Only lower operations when the operands are scalar for now. Differential Revision: https://reviews.llvm.org/D139108
-
Nicolai Hähnle authored
Given a list of test files, this utility will run (optionally in parallel) the corresponding update_*_test_checks tool for all given tests that have automatically generated assertions. Differential Revision: https://reviews.llvm.org/D139100
-
Guillaume Chatelet authored
-
Jakub Kuderski authored
Allow the integer dot product cabailities to be used in SPIR-V <1.6 when the SPV_KHR_integer_dot_product extension is available. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D139063
-