- Sep 02, 2021
-
-
Piotr Sobczak authored
Extend SILoadStoreOptimizer to merge into DWORDX8 variant of S_BUFFER_LOAD. Merging into DWORDX2 and DWORDX4 variants is handled already. Differential Revision: https://reviews.llvm.org/D108909
-
Marius Brehler authored
This upstreams the Cpp emitter, initially presented with [1], from [2] to MLIR core. Together with the previously upstreamed EmitC dialect [3], the target allows to translate MLIR to C/C++. [1] https://reviews.llvm.org/D76571 [2] https://github.com/iml130/mlir-emitc [3] https://reviews.llvm.org/D103969 Co-authored-by:
Jacques Pienaar <jpienaar@google.com> Co-authored-by:
Simon Camphausen <simon.camphausen@iml.fraunhofer.de> Co-authored-by:
Oliver Scherf <oliver.scherf@iml.fraunhofer.de> Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D104632
-
Alex Zinenko authored
Use the recently introduced OpenMPIRBuilder facility to transate OpenMP workshare loops with reductions to LLVM IR calling OpenMP runtime. Most of the heavy lifting is done at the OpenMPIRBuilder. When other OpenMP dialect constructs grow support for reductions, the translation can be updated to operate on, e.g., an operation interface for all reduction containers instead of workshare loops specifically. Designing such a generic translation for the single operation that currently supports reductions is premature since we don't know how the reduction modeling itself will be generalized. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D107343
-
Raphael Isemann authored
This reverts commit e387c8c4. The TestErrorMessages.test is failing on the Linux bots.
-
David Green authored
The semantics of tail predication loops means that the value of LR as an instruction is executed determines the predicate. In other words: mov r3, #3 DLSTP lr, r3 // Start tail predication, lr==3 VADD.s32 q0, q1, q2 // Lanes 0,1 and 2 are updated in q0. mov lr, #1 VADD.s32 q0, q1, q2 // Only first lane is updated. This means that the value of lr cannot be spilled and re-used in tail predication regions without potentially altering the behaviour of the program. More lanes than required could be stored, for example, and in the case of a gather those lanes might not have been setup, leading to alignment exceptions. This patch adds a new lr predicate operand to MVE instructions in order to keep a reference to the lr that they use as a tail predicate. It will usually hold the zeroreg meaning not predicated, being set to the LR phi value in the MVETPAndVPTOptimisationsPass. This will prevent it from being spilled anywhere that it needs to be used. A lot of tests needed updating. Differential Revision: https://reviews.llvm.org/D107638
-
Jan Svoboda authored
The way we parse `DiagnosticOptions` is a bit involved. `DiagnosticOptions` are parsed as part of the cc1-parsing function `CompilerInvocation::CreateFromArgs` which takes `DiagnosticsEngine` as an argument to be able to report errors in command-line arguments. But to create `DiagnosticsEngine`, `DiagnosticOptions` are needed. This is solved by exposing the `ParseDiagnosticArgs` to clients and making its `DiagnosticsEngine` argument optional, essentially breaking the dependency cycle. The `ParseDiagnosticArgs` function takes `llvm::opt::ArgList &`, which each client needs to create from the command-line (typically represented as `std::vector<const char *>`). Creating this data structure in this context is somewhat particular. This code pattern is copy-pasted in some places across the upstream code base and also in downstream repos. To make things a bit more uniform, this patch extracts the code into a new reusable function: `CreateAndPopulateDiagOpts`. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D108918
-
Roman Lebedev authored
Please refer to https://lists.llvm.org/pipermail/llvm-dev/2021-September/152440.html (and that whole thread.) TLDR: the original patch had no prior RFC, yet it had some changes that really need a proper RFC discussion. It won't be productive to discuss such an RFC, once it's actually posted, while said patch is already committed, because that introduces bias towards already-committed stuff, and the tree is potentially in broken state meanwhile. While the end result of discussion may lead back to the current design, it may also not lead to the current design. Therefore i take it upon myself to revert the tree back to last known good state. This reverts commit 4c4093e6. This reverts commit 0a2b1ba3. This reverts commit d9873711. This reverts commit 791006fb. This reverts commit c22b64ef. This reverts commit 72ebcd31. This reverts commit 5fa6039a. This reverts commit 9efda541. This reverts commit 94d3ff09.
-
Cullen Rhodes authored
Inherited from MatrixType. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D109137
-
Michał Górny authored
Implement a new target.process.follow-fork-mode setting to control LLDB's behavior on fork. If set to 'parent', the forked child is detached and parent continues being traced. If set to 'child', the parent is detached and child becomes traced instead. Differential Revision: https://reviews.llvm.org/D100503
-
Jon Chesterfield authored
Use the same debug print as the rest of libomptarget plugins with the same environment control. Also drop the max queue size debugging hook as I don't believe it is still in use, can bring it back near the rest of the env handling in rtl.cpp if someone objects. That makes most of rt.h and all of utils.cpp unused. Clean that up and simplify control flow in a couple of places. Behaviour change is that debug prints that used to use the old environment variable now use the new one and print in slightly different format, and the removal of the max queue size variable. Reviewed By: pdhaliwal Differential Revision: https://reviews.llvm.org/D108784
-
Simon Pilgrim authored
Pulled out of D108522 - handle zero-operand cases for PMADDWD/VPMADDUBSW ops
-
Simon Pilgrim authored
Pre-commit for D108522 to show failure to fold multiply by zero operands
-
Daniel Kiss authored
-Wunused-but-set-variable triggers a warning even the block of code is effectively dead. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D107835
-
Roman Lebedev authored
Breaks build with -DBUILD_SHARED_LIBS=ON ``` CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle): "LLVMFrontendOpenMP" of type SHARED_LIBRARY depends on "LLVMPasses" (weak) "LLVMipo" of type SHARED_LIBRARY depends on "LLVMFrontendOpenMP" (weak) "LLVMCoroutines" of type SHARED_LIBRARY depends on "LLVMipo" (weak) "LLVMPasses" of type SHARED_LIBRARY depends on "LLVMCoroutines" (weak) depends on "LLVMipo" (weak) At least one of these targets is not a STATIC_LIBRARY. Cyclic dependencies are allowed only among static libraries. CMake Generate step failed. Build files cannot be regenerated correctly. ``` This reverts commit 707ce34b. -
Daniel Kiss authored
EHABI defines the exception class as char[8] instead of uint64_t [1]. For ABI compatibility the ABI the definition needs to be updated. [1] https://github.com/ARM-software/abi-aa/blob/main/ehabi32/ehabi32.rst#82language-independent-unwinding-types-and-functions Reviewed By: manojgupta, MaskRay, #libunwind Differential Revision: https://reviews.llvm.org/D109047
-
Ben Shi authored
Reviewed By: asb Differential Revision: https://reviews.llvm.org/D108606
-
Ben Shi authored
Reviewed By: asb Differential Revision: https://reviews.llvm.org/D108915
-
Fraser Cormack authored
This patch extends D107904's introduction of vector-predicated (VP) operation legalization to include vector splitting. When the result of a binary VP operation needs splitting, all of its operands are split in kind. The two operands and the mask are split as usual, and the vector-length parameter EVL is "split" such that the low and high halves each execute the correct number of elements. Tests have been added to the RISC-V target to show splitting several scenarios for fixed- and scalable-vector types. Without support for `umax` (e.g. in the `B` extension) the generated code starts to branch. Ideally a cost model would prevent their insertion in the first place. Through these tests many opportunities for better codegen can be seen: combining known-undef VP operations and for constant-folding operations on `ISD::VSCALE`, to name but a few. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D107957
-
Simon Moll authored
llvm.vp.select extends the regular select instruction with an explicit vector length (%evl). All lanes with indexes at and above %evl are undefined. Lanes below %evl are taken from the first input where the mask is true and from the second input otherwise. Reviewed By: rogfer01 Differential Revision: https://reviews.llvm.org/D105351
-
Sebastian Schwartz authored
This diff modifies the LLDB server return codes to more accurately reflect usage error paths. Specifically we always propagate the return codes from the main entrypoints into GDB remote LLDB server, and platform LLDB server. This way, the top-level caller of LLDB server will be able to correctly check whether the executable exited with or without an error. We additionally modify and extend the associated shell unit tests to expect nonzero return codes on error conditions. Test Plan: LLDB tests pass: ``` ninja check-lldb ``` Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D108351
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D109140
-
David Sherwood authored
Several FP instructions (fadd, fsub, etc.) were incorrectly assigned a higher cost for SVE because they have custom lowering, however we know they are legal. This patch explicitly assigns a cost of 2 to these opcodes. Tests added here: Analysis/CostModel/AArch64/arith-fp-sve.ll Differential Revision: https://reviews.llvm.org/D108993
-
Fangrui Song authored
sh_info links to a section, therefore SHF_INFO_LINK should be set as GNU as does. The issue has been benign because linkers kindly combines relocation sections w/ and w/o the flag.
-
Fraser Cormack authored
This patch corrects the auto-generated EVL and Mask index positions of the `VP_LOAD`/`VP_STORE`/`VP_GATHER`/`VP_SCATTER` nodes. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D109063
-
Michael Kruse authored
Add methods for loop unrolling to the OpenMPIRBuilder class and use them in Clang if `-fopenmp-enable-irbuilder` is enabled. The unrolling methods are: * `unrollLoopFull` * `unrollLoopPartial` * `unrollLoopHeuristic` `unrollLoopPartial` and `unrollLoopHeuristic` can use compiler heuristics to automatically determine the unroll factor. If possible, that is if no CanonicalLoopInfo is required to pass to another method, metadata for LLVM's LoopUnrollPass is added. Otherwise the unroll factor is determined using the same heurstics as user by LoopUnrollPass. Not requiring a CanonicalLoopInfo, especially with `unrollLoopHeuristic` allows greater flexibility. With full unrolling and partial unrolling with known unroll factor, instead of duplicating instructions by the OpenMPIRBuilder, the full unroll is still delegated to the LoopUnrollPass. In case of partial unrolling the loop is first tiled using the existing `tileLoops` methods, then the inner loop fully unrolled using the same mechanism. Reviewed By: jdoerfert, kiranchandramohan Differential Revision: https://reviews.llvm.org/D107764
-
Florian Hahn authored
-
Wenlei He authored
For CSSPGO, turn on `sample-profile-use-preinliner` by default. This simplifies the use of llvm-profgen preinliner as it's now simply driven by ContextShouldBeInlined flag for each context profile without needing extra compiler switch. Note that llvm-profgen's preinliner is still off by default, under switch `csspgo-preinliner`. Differential Revision: https://reviews.llvm.org/D109111
-
Arthur Eubanks authored
Per https://lists.llvm.org/pipermail/llvm-dev/2021-August/152305.html. Reviewed By: MaskRay, fhahn Differential Revision: https://reviews.llvm.org/D109080
-
Markus Lavin authored
Added opt option -print-pipeline-passes to print a -passes compatible string describing the built pass pipeline. As an example: $ opt -enable-new-pm=1 -adce -licm -simplifycfg -o /dev/null /dev/null -print-pipeline-passes verify,function(adce),function(loop-mssa(licm)),function(simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts>),verify,BitcodeWriterPass At the moment this is best-effort only and there are some known limitations: - Not all passes accepting parameters will print their parameters (currently only implemented for simplifycfg). - Some ClassName to pass-name mappings are not unique. - Some ClassName to pass-name mappings are missing (e.g. BitcodeWriterPass). Differential Revision: https://reviews.llvm.org/D108298
-
Markus Lavin authored
This reverts commit c71869ed.
-
Markus Lavin authored
Added opt option -print-pipeline-passes to print a -passes compatible string describing the built pass pipeline. As an example: $ opt -enable-new-pm=1 -adce -licm -simplifycfg -o /dev/null /dev/null -print-pipeline-passes verify,function(adce),function(loop-mssa(licm)),function(simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts>),verify,BitcodeWriterPass At the moment this is best-effort only and there are some known limitations: - Not all passes accepting parameters will print their parameters (currently only implemented for simplifycfg). - Some ClassName to pass-name mappings are not unique. - Some ClassName to pass-name mappings are missing (e.g. BitcodeWriterPass).
-
Mark de Wever authored
After landing D103357 the worker ppc64le-sanitizer fails on `__bool`. This replaces all occurrences with `__boolean`.
-
Abinav Puthan Purayil authored
[DAGCombine] Add node level checks for fp-contract and fp-ninf in visitFMULForFMADistributiveCombine(). Differential Revision: https://reviews.llvm.org/D107551
-
Arthur Eubanks authored
Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D109132
-
Arthur Eubanks authored
-
Ye Luo authored
Use unique_ptr to achieve the effect of mutable. Remove mutable keyword of DynRefCount and HoldRefCount Remove std::shared_ptr from UpdateMtx Reviewed By: tianshilei1992, grokos Differential Revision: https://reviews.llvm.org/D109007
-
Jinsong Ji authored
Avoid some duplicate code. Reviewed By: #powerpc, shchenz Differential Revision: https://reviews.llvm.org/D109083
-
Wenlei He authored
Add some stats to help tuning pre-inliner. Differential Revision: https://reviews.llvm.org/D109098
-
Jinsong Ji authored
Following patch of https://reviews.llvm.org/D108490. Add AIX triples to tests in /Instrumentation/InstrProfiling/ to make sure we can catch regressions earlier. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D109089
-
Ben Shi authored
Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D108870
-