- Jan 11, 2023
-
-
Markus Böck authored
This is part of the RFC for a better fold API: https://discourse.llvm.org/t/rfc-a-better-fold-api-using-more-generic-adaptors/67374 This patch implements the generation of generic adaptors through TableGen. These are essentially a generalization of Adaptors, as implemented previously, but instead of indexing into a `mlir::ValueRange`, they may index into any container, regardless of the element type. This allows the use of the convenient getter methods of Adaptors to be reused on ranges that are the result of some kind of mapping functions of an ops operands. In the case of the fold API in the RFC, this would be `ArrayRef<Attribute>`, which is a mapping of the operands to their possibly-constant values. Implementation wise, some special care was taken to not cause a compile time regression, nor to break any kind of source compatibility. For that purpose, the current adaptor class was split into three: * A generic adaptor base class, within the detail name...
-
Nikita Popov authored
-
Thomas Symalla authored
-
Jay Foad authored
-
Nikita Popov authored
-
wanglei authored
Fix undefined behavior in `decodeSImmOperand` where we were left shifting a signed value.
-
Matt Arsenault authored
Just avoid crashing for now, we should be able to replace the blockaddresses themselves. BlockAddress::handleOperandChangeImpl assumes it can cast to Function. The verifier seems nonexistent and the langref isn't particularly explicit on what's allowed as a blockaddress operand. As far as I can tell bugpoint isn't doing anything to handle this. Something low level is broken with BlockAddress handling, demonstrated by reduce-functions-blockaddress-wrong-function.ll. The BasicBlock destructor of the deleted function is triggering replacement of blockaddresses for the kept function in some cases. I've only half debugged this but it seems like blockaddress is handled too-specially compared to other Constants. I have tentative patches to allow any constant to be a blockaddress input, but having the verifier check if it's really a function/block. https://reviews.llvm.org/D140909
-
Peixin Qiao authored
As Fortran 2018 C1553, if with BIND(C), the function result shall be an interoperable scalar variable. As Fortran 2018 18.3.4(1), the interoperable scalar variable is not a coarray, has neither the ALLOCATABLE nor the POINTER attribute, and if it is of type character its length is not assumed or declared by an expression that is not a constant expression. As Fortran 2018 18.3.1(1), if the type is character, the length type parameter is interoperable if and only if its value is one. Reviewed By: PeteSteinfeld, jeanPerier Differential Revision: https://reviews.llvm.org/D137254
-
Emilia Dreamer authored
This clang-format documentation file is auto-generated from Format.h, so the fix should be applied there, or else it will be overwritten whenever Format.h is modified and that file is regenerated.
-
Aaron Ballman authored
This file builds correctly for me locally, but gives a warning about not being able to lex the binary literal as C++ code. This should fix the issue found by: https://lab.llvm.org/buildbot/#/builders/92/builds/38522
-
Max Kazantsev authored
-
Timm Bäder authored
We can just use the regular VisitCallExpr logic here, since we have the pointer to initialize already on the stack.
-
Timm Bäder authored
This is unnecessary in the current state of the interpreter, but will ne important later.
-
Nikita Popov authored
-
Max Kazantsev authored
-
Victor Campos authored
This new CPU was mentioned in Clang's release notes, but was missing from LLVM's. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D141394
-
Viktoriia Bakalova authored
[include-mapping] Fix the instructions for running stdlib recognizer. Mention python command explicitly. Remove angle brackets. Differential Revision: https://reviews.llvm.org/D141477
-
Krasimir Georgiev authored
This reverts commit 879bfe6a. owenpan@ pointed out on https://reviews.llvm.org/D140956 that this actually makes the formatting more consistent, so it's not a regression.
-
Utkarsh Saxena authored
-
Owen Pan authored
-
Max Kazantsev authored
We could have same SCEVs for the following expressions: zext(umin(x, y)) and umin(zext(x), zext(y)); zext(umax(x, y)) and umax(zext(x), zext(y)) sext(smin(x, y)) and smin(zsxt(x), sext(y)); sext(smax(x, y)) and smax(sext(x), sext(y)).
-
Ivan Butygin authored
Add a pass which do arith dialect ops optimization based on integer range analysis (only cmpi for now). Differential Revision: https://reviews.llvm.org/D140629
-
Utkarsh Saxena authored
> Dependent access checks. Fixes: https://github.com/llvm/llvm-project/issues/53364 We previously ignored dependent access checks to private members. These are visible only to the `RequiresExprBodyExpr` (through `PerformDependentDiagnositcs`) and not to the individual requirements. --- > Non-dependent access checks. Fixes: https://github.com/llvm/llvm-project/issues/53334 Access to members in a non-dependent context would always yield an invalid expression. When it appears in a requires-expression, then this is a hard error as this would always result in a substitution failure. https://eel.is/c++draft/expr.prim.req#general-note-1 > Note 1: If a requires-expression contains invalid types or expressions in its requirements, and it does not appear within the declaration of a templated entity, then the program is ill-formed. — end note] > If the substitution of template arguments into a requirement would always result in a substitution failure, the program is ill-formed; no diagnostic required. The main issue here is the delaying of the diagnostics. Use a `ParsingDeclRAIIObject` creates a separate diagnostic pool for diagnositcs associated to the `RequiresExprBodyDecl`. This is important because dependent diagnostics should not be leaked/delayed to higher scopes (Eg. inside a template function or in a trailing requires). These dependent diagnostics must be attached to the `DeclContext` of the parameters of `RequiresExpr` (which is the `RequiresExprBodyDecl` in this case). Non dependent diagnostics, on the other hand, should not delayed and surfaced as hard errors. Differential Revision: https://reviews.llvm.org/D140547
-
Timm Bäder authored
-
Ties Stuij authored
The legwork for these was done by https://reviews.llvm.org/D138725. Here we're just adding the arch names to the cmake files and linking them to arm_min_SOURCES. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D141322
-
Haohai Wen authored
Automatically generated by D130897. This fixed issue #58792. Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D139301
-
Dmitri Gribenko authored
This reverts commit 73712c87. It causes a MemorySanitizer error in LLVM testsuite. See the discussion on https://reviews.llvm.org/D137882 for details.
-
Francesco Petrogalli authored
Rework the change to prevent build failures. NFCI. The failing code was submitted as cf7a8305 and reverted via 8bd65e53. The rework in this new commit prevents failures like the following: FAILED: tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Targets/RISCV.cpp.o /usr/bin/c++ [bunch of non interesting stuff] -c <path-to>/llvm-project/clang/lib/Basic/Targets/RISCV.cpp In file included from <path-to>/llvm-project/clang/lib/Basic/Targets/RISCV.cpp:19: <path-to>/llvm-project/llvm/include/llvm/TargetParser/RISCVTargetParser.h:29:10: fatal error: llvm/TargetParser/RISCVTargetParserDef.inc: No such file or directory 29 | #include "llvm/TargetParser/RISCVTargetParserDef.inc" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These failures happen because the library LLVMTargetParser depends on RISCVTargetParserTableGen, which is a tablegen target that generates the list of CPUs in llvm/TargetParser/RISCVTargetParserDef.inc. This *.inc file is included by the public header file llvm/TargetParser/RISCVTargetParser.h. The header file llvm/TargetParser/RISCVTargetParser.h is also used in components (clangDriver and clangBasic) that link into LLVMTargetParser, but on some configurations such components might end up being built before TargetParser is ready. The fix is to make sure that clangDriver and clangBasic depend on the tablegen target RISCVTargetParserTableGen, which generates the .inc file whether or not LLVMTargetParser is ready. WRT the original patch at https://reviews.llvm.org/D137517, this commit is just adding RISCVTargetParserTableGen in the DEPENDS list of clangDriver and clangBasic.
-
Denis Revunov authored
Since the pass is multithreaded, BC.Ctx must be protected. Otherwise we get crashes when processing. Reviewed by: yota9 Differential Revision: https://reviews.llvm.org/D141465
-
Luke Lau authored
The section numbers got reshuffled around between v0.10 and [[ https://github.com/riscv/riscv-v-spec/blob/v1.0/v-spec.adoc | v1.0 of the spec ]], this updates references in comments to refer to their version in v1.0. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D141382
-
David Green authored
-
Francesco Petrogalli authored
This reverts commit cf7a8305.
-
Noah Goldstein authored
If we know that X & Pow2 != 0, then the bit at that position is known one. Differential Revision: https://reviews.llvm.org/D140851
-
Weining Lu authored
This can suppress compilation warning like `enumerated mismatch in conditional expression`. See: https://lab.llvm.org/staging/#/builders/236/builds/645/steps/6/logs/warnings__1_
-
Lorenzo Chelini authored
-
Miguel Saldivar authored
LAI is cached during the LoopDistribute pass, and is later re-used during LoopVectorize. The problem is that LoopVectorize changes SCEV, and the cached LAI does not get updated. Hence, when re-using the cached LAI, it references an invalid SCEV. Fixes #59319 Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D139601
-
Noah Goldstein authored
Tests for D140851.
-
Francesco Petrogalli authored
This patch removes the file `llvm/include/llvm/TargetParser/RISCVTargetParser.def` and replaces it with a tablegen-generated `.inc` file out of `llvm/lib/Target/RISCV/RISCV.td`. The module system has been updated to make sure we can build clang/llvm with `-DLLVM_ENABLE_MODULES=On` Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D137517
-
Johannes Doerfert authored
-
David Green authored
Specifying an architecture revision should also add feature strings for any dependent default extensions. Otherwise the new checks for target-dependent features for acle intrinsics from D134353 and D132034 can fail. This patch does that in setFeatureEnabled, similar to the addition of dependent architecture revisions. +sve also needs to be added to armv9 architectures in the target parser, as it is implied by +sve2. Fixes #59911 Differential Revision: https://reviews.llvm.org/D141411
-