- Oct 20, 2023
-
-
Joel E. Denny authored
Without this patch, the functions `executeScriptInternal` and thus `runOnce` in `llvm/utils/lit/lit/TestRunner.py` return either a tuple like `(out, err, exitCode, timeoutInfo)` or a `lit.Test.Result` object. They return the latter only when there's a lit internal shell parse error in a RUN line. In my opinion, a more straight-forward way to handle exceptional cases like that is to use python exceptions. For that purpose, this patch introduces `ScriptFatal`. Thus, this patch changes `executeScriptInternal` to always either return the tuple or raise the `ScriptFatal` exception. It updates `runOnce` and `libcxx/utils/libcxx/test/format.py` to catch the exception rather than check for the special return type. This patch also changes `runOnce` to convert the exception to a `Test.UNRESOLVED` result instead of `TEST.FAIL`. The former is the proper result for such a malformed test, for which a rerun (given an `ALLOW_RETRIES:`)...
-
Job Noorman authored
On RISC-V, GNU as produces the following initial instruction in CIE's: ``` DW_CFA_def_cfa_register: r2 ``` While I believe it is technically illegal to use this instruction without first using a `DW_CFA_def_cfa` (since the offset is undefined), both `readelf` and `llvm-dwarfdump` accept this and implicitly set the offset to 0. In BOLT, however, this triggers an assert (in `CFISnapshot::advanceTo`) as it (correctly) believes the offset is not set. This patch fixes this by setting the offset to 0 whenever executing `DW_CFA_def_cfa_register` while the offset is undefined. Note that this is probably the simplest workaround but it has a downside: while emitting CFI start, we check if the initial instructions are contained within `MCAsmInfo::getInitialFrameState` and omit them if they are. This will not be true for GNU CIE's (since they differ from LLVM's) which causes an unnecessary `DW_CFA_def_cfa_register` to be emitted. While...
-
Finn Plummer authored
Due to an issue when lowering from scf to spirv as there was no conversion pass for index to spirv, we are motivated to add a conversion pass from the Index dialect to the SPIR-V dialect. Furthermore, we add the new conversion patterns to the scf-to-spirv conversion. Fixes #63713
-
Krzysztof Parzyszek authored
-
weiguozhi authored
Function foldRedundantCopy records COPY instructions in CopyMIs and uses it later. But other optimizations may delete or modify it. So before using it we should check if the extracted instruction is existing and still a COPY instruction.
-
hassnaaHamdi authored
Also add Read only registers: ID_AA64FPFR0_EL1 ID_AA64ISAR3_EL1 This is based on this documentation: https://developer.arm.com/documentation/ddi0602/2023-09 Co-authored-by:
Caroline Concatto <caroline.concatto@arm.com>
-
lntue authored
Only check if gettimeofday call succeeds.
-
LLVM GN Syncbot authored
-
Congcong Cai authored
This check detects usage of ``static_cast`` pointer to the other pointer throght `static_cast` to `void *` in C++ code. Fixes: #68532
-
LLVM GN Syncbot authored
-
Christian Trott authored
This implements layout_stride for C++23 and with that completes the implementation of the C++23 mdspan header. The feature test macro is added, and the status pages updated. Co-authored-by:
Damien L-G <dalg24@gmail.com> Differential Revision: https://reviews.llvm.org/D157171
-
David Spickett authored
There are some uses of "vscode" in `lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py` where I'm not sure if it's referring to the adapter or VS Code itself, so those remain.
-
Aaron Ballman authored
This reverts commit 7339c0f7. Breaks bots: https://lab.llvm.org/buildbot/#/builders/139/builds/51875 https://lab.llvm.org/buildbot/#/builders/164/builds/45262
-
Aaron Ballman authored
Clang supports VLAs in C++ as an extension, but we currently only warn on their use when you pass -Wvla, -Wvla-extension, or -pedantic. However, VLAs as they're expressed in C have been considered by WG21 and rejected, are easy to use accidentally to the surprise of users (e.g., https://ddanilov.me/default-non-standard-features/), and they have potential security implications beyond constant-size arrays (https://wiki.sei.cmu.edu/confluence/display/c/ARR32-C.+Ensure+size+arguments+for+variable+length+arrays+are+in+a+valid+range). C++ users should strongly consider using other functionality such as std::vector instead. This seems like sufficiently compelling evidence to warn users about VLA use by default in C++ modes. This patch enables the -Wvla-extension diagnostic group in C++ language modes by default, and adds the warning group to -Wall in GNU++ language modes. The warning is still opt-in in C language modes, where support for VLAs is somewhat less surprising to users. RFC: https://discourse.llvm.org/t/rfc-diagnosing-use-of-vlas-in-c/73109 Fixes https://github.com/llvm/llvm-project/issues/62836 Differential Revision: https://reviews.llvm.org/D156565
-
Florian Hahn authored
This reverts commit e4ea0997. The recommit fixes a reported crash by adding a missing check to make sure the cast recipes are only introduced when vectorizing. Test coverage added in 3cac608f. Original commit message: Update the code to create Trunc/Ext recipes directly in adjustRecipesForReductions instead of fixing it up later in fixReductions. This explicitly models the required conversions and also makes sure they are generated at the right place (instead of after the exit condition), hence the changes in a few tests.
-
Dudeldu authored
Currently, the interpreter does not initialize `undef` constants of aggregate types correctly (with respect to arrays). The initialization of the array elements is skipped although it is valid to directly write to them. Instructions like `insertvalue {i32, [4 x i32]} undef, i32 1, 1, 2` therefore lead to a crash. This is fixed by initializing array values just as fixed-size vectors or structs. -
Nikita Popov authored
-
Nikita Popov authored
To allow using it in places where these may not be available.
-
Ivan Kosarev authored
The 16-bit instructions used in them are not available on the generic target. This patches makes them run for GFX11.
-
David Spickett authored
This adds a release note for all the SME support now in LLDB and a page where I have documented the user experience (for want of a better term) when using SVE and SME. This includes things like which mode transitions can or cannot be triggered from within LLDB. I hope this will serve to A: document what I've implemented and B: be a user's guide to these extensions. (though it is not a design document, read the commits and code for that sort of detail)
-
Madhur Amilkanthwar authored
This reverts commit ba8565fb . Co-authored-by:
Madhur A <madhura@nvidia.com>
-
Utkarsh Saxena authored
https://github.com/llvm/llvm-project/pull/68999 correctly computed conversion sequence for reversed args to a template operators. This was a breaking change as code, previously accepted in C++17, starts to break in C++20. Example: ```cpp struct P {}; template<class S> bool operator==(const P&, const S &); struct A : public P {}; struct B : public P {}; bool check(A a, B b) { return a == b; } // This is now ambiguous in C++20. ``` In order to minimise widespread breakages, as a clang extension, we had previously accepted such ambiguities with a warning (`-Wambiguous-reversed-operator`) for non-template operators. Due to the same reasons, we extend this relaxation for template operators. Fixes https://github.com/llvm/llvm-project/issues/53954
-
Madhur Amilkanthwar authored
This patch adds "nice-to-have" feature in lit. it prints the total number of discovered tests at the beginning. It is covenient to see the total number of tests and avoid scrolling up to the beginning of log. Further, this patch also prints %ge of tests. Reviewed By: RoboTux, jdenny-ornl Co-authored-by:Madhur A <madhura@nvidia.com>
-
Amadeus Gebauer authored
If PyYAML is not installed, the `-export-fixes` can be used to specify a directory (not a file). Mentioning @PiotrZSL @dyung Follows #69453
-
Adrian Kuegel authored
-
Sarthak Gupta authored
Fixes https://github.com/llvm/llvm-project/issues/67761 Trying `getDimSize()` before checking for 0-ranked-tensors throws assert errors. This PR ensures that it is checked for. Or should we throw an error if we have a 0-ranked-tensor in a tosa operation?
-
Adrian Kuegel authored
-
Nikita Popov authored
Drop code inserting pointer casts. Check pointer types instead of address spaces.
-
Jacek Caban authored
-
Adrian Kuegel authored
A recent change modified the parameter tileSize from Value to OpFoldResult. Therefore we should call getAsOpFoldResult before passing on the tileSize. Adjust a test regarding this new behavior.
-
Wenju He authored
Fix two issues: * If a constant is used in another constant, we need to insert newly created instructions to worklist so that constant used in them will be converted. * Set debug info of original instruction to newly created instructions.
-
Omar Ahmed authored
Add AfterPlacementNew option to SpaceBeforeParensOptions to have more control on placement new expressions. Fixes #41501 Relates to #54703 Differential Revision: https://reviews.llvm.org/D127270
-
Sam McCall authored
This uses the fast-check allowlist added in the previous commit. This is behind a config option to allow users/developers to enable checks we haven't timed yet, and to allow the --check-tidy-time flag to work. Fixes https://github.com/clangd/clangd/issues/1337 Differential Revision: https://reviews.llvm.org/D138505
-
martin-luecke authored
This adds a flag to the `TransformDialectInterpreter` that relaxes the requirement for only a single top-level transform op. This is useful for supporting transforms that take transform IR as payload. This also aligns the function `findTopLevelTransform` [here](https://github.com/llvm/llvm-project/commit/7b0f4c9db55c355bffddf94d7710f40ee2c1e9db#diff-551f92bb609487ccf981daf9571f0f1b1703ab2330560a388a5f0d133e520be4L59) with its documentation: In the presence of multiple top-level transform ops it now correctly returns the first of them after reporting the error instead of returning a `nullptr`.
-
jeanPerier authored
Type extension is currently handled in FIR by inlining the parents components as the first member of the record type. This is not correct from a memory layout point of view since the storage size of the parent type may be bigger than the sum of the size of its component (due to alignment requirement). To avoid making FIR types target dependent and fix this issue, make the parent component a single component with the parent type at the beginning of the record type. This also simplifies addressing since parent component is now a "normal" component that can be designated with hlfir.designate. StructureComponent lowering however is a bit more complex since the symbols in the structure component may refer to subcomponents of parent types. Notes: 1. The fix is only done in HLFIR for now, a similar fix should be done in ConvertExpr.cpp to fix the path without HLFIR (I will likely still do it in a new patch since it would be an annoying bug to investigate for people testing flang without HLFIR). 2. The private component extra mangling is useless after this patch. I will remove it after 1. 3. The "parent component" TODO in constant CTOR is free to implement for HLFIR after this patch, but I would rather remove it and test it in a different patch.
-
Graham Hunter authored
As requested in (#66521) I confirmed a crash with "return" instead of "continue" in setVectorizedCallDecision's fmuladd reduction recognition.
-
Qiu Chaofan authored
Power10 does not support Hardware Transactional Memory instructions. Remove to keep consistency.
-
jeanPerier authored
The code in `copyHostAssociateVar` is using `createSomeArrayAssignment` for arrays which is using the soon legacy expression lowering. Update the copy to use hlfir.assign instead. I used the temporary_lhs flag to mimic the current behavior, but maybe user defined assignment should be called when needed .This flag also prevents any finalizers to be called on the LHS if the LHS type has finalizers (which would occur otherwise in normal intrinsic assignment). Again, I am not sure what the OpenMP spec wants here. Also, I added special handling for ALLOCATABLE, the current code seems broken to me since it is basically copying the descriptor which would lead to memory leak given the TEMP was previously allocated with the shape of the variable in createHostAssociateVarClone. So copying the DATA instead seemed like the right thing to do.
-
Adrian Kuegel authored
-
fabrizio-indirli authored
In TOSA MLIR dialect, fix the definition of the Clamp op to accept fp16 & bf16 datatype for the min_fp and max_fp attributes. Add ClampOp verifier to check attributes types compatibility. Add related test cases in Tosa/ops.mlir. Signed-off-by:Fabrizio Indirli <Fabrizio.Indirli@arm.com>
-