- Jan 06, 2021
-
-
Jan Svoboda authored
This fixes an issue where large integer values were rejected as invalid. Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D94101
-
Arthur Eubanks authored
To clarify that this only affects the "default" AA. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D93980
-
Craig Topper authored
vmsltu.vi v0, v1, 0 is always false there is no unsigned number less than 0. vmsleu.vi v0, v1, -1 on the other hand is always true since -1 will be considered unsigned max and all numbers are <= unsigned max. A similar problem exists for vmsgeu.vi v0, v1, 0 which is always true, but becomes vmsgtu.vi v0, v1, -1 which is always false. To match the GNU assembler we'll emit vmsne.vv and vmseq.vv with the same register for these cases instead. I'm using AsmParserOnly pseudo instructions here because we can't match an explicit immediate in an InstAlias. And we can't use a AsmOperand for the zero because the output we want doesn't use an immediate so there's nowhere to name the AsmOperand we want to use. To keep the implementations similar I'm also handling signed with pseudo instructions even though they don't have this issue. This way we can avoid the special renderMethod that decremented by 1 so the immediate we see for the pseudo instruction in processInstruction is 0 and not -1. Another option might have been to have a different simm5_plus1 operand for the unsigned case or just live with the immediate being pre-decremented. I felt this way was clearer, but I'm open to other opinions. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D94035
-
Felipe de Azevedo Piovezan authored
If an operation defines an optional attribute (OptionalAttr or UnitAttr), transformations may wish to remove these attributes while maintaining invariants established by the operation. Currently, the only way to do this is by calling `Operation::removeAttr("attrName")`, which requires developers to know the exact name of the attribute used by table-gen. Furthermore, if the attribute name changes, this won't be detected at compile time. Instead, `removeAttr` would return an empty attribute and no errors would be raised, unless the caller checks for the returned value. This patch adds table gen support for generating `remove<AttrName>Attr` methods for OptionalAttributes defined by operations. Implementation choice: to preserve camelCase for the method's name, the first character of an attribute called `myAttr` is changed to upper case in order to preserve the coding style, so the final method would be called `removeMyAttr`. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D93903 -
Whitney Tsang authored
Addressed Florian's post commit review comments: 1. included STLExtras.h 2. changed std::all_of to llvm::all_of Differential Revision: https://reviews.llvm.org/D93665
-
Dan Zheng authored
Remove unnecessary `&` from loop variables. Fix warnings: "loop variable is always a copy because the range does not return a reference". ``` [240/2862] Building CXX object tools/mlir/tools/mlir-tblgen/CMakeFiles/mlir-tblgen.dir/TypeDefGen.cpp.o llvm-project/mlir/tools/mlir-tblgen/TypeDefGen.cpp:50:25: warning: loop variable 'typeDef' is always a copy because the range of type 'llvm::iterator_range<llvm::mapped_iterator<std::__1::__wrap_iter<llvm::Record **>, (lambda at llvm-project/mlir/tools/mlir-tblgen/TypeDefGen.cpp:40:16), mlir::tblgen::TypeDef> >' does not return a reference [-Wrange-loop-analysis] for (const TypeDef &typeDef : defs) ^ llvm-project/mlir/tools/mlir-tblgen/TypeDefGen.cpp:50:10: note: use non-reference type 'mlir::tblgen::TypeDef' for (const TypeDef &typeDef : defs) ^~~~~~~~~~~~~~~~~~~~~~~~ llvm-project/mlir/tools/mlir-tblgen/TypeDefGen.cpp:64:23: warning: loop variable 'typeDef' is always a copy because the range of type 'llvm::iterator_range<llvm::mapped_iterator<std::__1::__wrap_iter<llvm::Record **>, (lambda at llvm-project/mlir/tools/mlir-tblgen/TypeDefGen.cpp:40:16), mlir::tblgen::TypeDef> >' does not return a reference [-Wrange-loop-analysis] for (const TypeDef &typeDef : defs) ^ llvm-project/mlir/tools/mlir-tblgen/TypeDefGen.cpp:64:8: note: use non-reference type 'mlir::tblgen::TypeDef' for (const TypeDef &typeDef : defs) ^~~~~~~~~~~~~~~~~~~~~~~~ 2 warnings generated. [1934/2862] Building CXX object tools...Files/toyc-ch4.dir/mlir/MLIRGen.cpp.o llvm-project/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp:139:22: warning: loop variable 'name_value' is always a copy because the range of type 'detail::zippy<detail::zip_shortest, ArrayRef<unique_ptr<VariableExprAST, default_delete<VariableExprAST> > > &, MutableArrayRef<BlockArgument> >' does not return a reference [-Wrange-loop-analysis] for (const auto &name_value : ^ llvm-project/mlir/examples/toy/Ch4/mlir/MLIRGen.cpp:139:10: note: use non-reference type 'std::__1::tuple<const std::__1::unique_ptr<toy::VariableExprAST, std::__1::default_delete<toy::VariableExprAST> > &, mlir::BlockArgument &>' for (const auto &name_value : ^~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. [1940/2862] Building CXX object tools...Files/toyc-ch5.dir/mlir/MLIRGen.cpp.o llvm-project/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp:139:22: warning: loop variable 'name_value' is always a copy because the range of type 'detail::zippy<detail::zip_shortest, ArrayRef<unique_ptr<VariableExprAST, default_delete<VariableExprAST> > > &, MutableArrayRef<BlockArgument> >' does not return a reference [-Wrange-loop-analysis] for (const auto &name_value : ^ llvm-project/mlir/examples/toy/Ch5/mlir/MLIRGen.cpp:139:10: note: use non-reference type 'std::__1::tuple<const std::__1::unique_ptr<toy::VariableExprAST, std::__1::default_delete<toy::VariableExprAST> > &, mlir::BlockArgument &>' for (const auto &name_value : ^~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. ``` Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D94003 -
Craig Topper authored
This alias for andi x, 255 was recently added to the spec. If we print it, code we output can't be compiled with -fno-integrated-as unless the GNU assembler is also a version that supports alias. Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D93826
-
Sanjay Patel authored
SLP tries to model 2 forms of vector reductions: pairwise and splitting. From the cost model code comments, those are defined using an example as: /// Pairwise: /// (v0, v1, v2, v3) /// ((v0+v1), (v2+v3), undef, undef) /// Split: /// (v0, v1, v2, v3) /// ((v0+v2), (v1+v3), undef, undef) I don't know the full history of this functionality, but it was partly added back in D29402. There are apparently no users at this point (no regression tests change). X86 might have managed to work-around the need for this through cost model and codegen improvements. Removing this code makes it easier to continue the work that was started in D87416 / D88193. The alternative -- if there is some target that is silently using this option -- is to move this logic into LoopUtils. We have related/duplicate functionality there via llvm::createTargetReduction(). Differential Revision: https://reviews.llvm.org/D93860
-
Craig Topper authored
There are vmsle(u).vx and vmsle(u).vi instructions, but there is only vmslt(u).vx and no vmslt(u).vi. vmslt(u).vi can be emulated for some immediates by decrementing the immediate and using vmsle(u).vi. To avoid the user needing to know about this, this patch does this conversion. The assembler does the same thing for vmslt(u).vi and vmsge(u).vi pseudoinstructions. There is no vmsge(u).vx intrinsic or instruction so this patch is limited to vmslt(u). Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D94070
-
Sergey Dmitriev authored
This patch fixes linker behavior when archive is linked with other inputs as a library (i.e. when --only-needed option is specified). In this case library is expected to be normally linked first into a separate module and only after that linker should import required symbols from the linked library module. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D92535
-
Matt Arsenault authored
-
Yitzhak Mandelbaum authored
Stencils `maybeDeref` and `maybeAddressOf` are designed to handle nodes that may be pointers. Currently, they only handle native pointers. This patch extends the support to recognize smart pointers and handle them as well. Differential Revision: https://reviews.llvm.org/D93637
-
Jonas Devlieghere authored
-
Hanhan Wang authored
In the past, this was a missing test case and the fusion was not supported. It's supported after the revisit of init_tensor in Linalg. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D94093
-
Stephen Kelly authored
Differential Revision: https://reviews.llvm.org/D94032
-
David Green authored
-
Simon Pilgrim authored
getAs<> can return null if the cast is invalid, which can lead to null pointer deferences. Use castAs<> instead which will assert that the cast is valid.
-
Joe Nash authored
It was removed in GFX10 GPUs, but LLVM could generate it. Reviewed By: rampitec, arsenm Differential Revision: https://reviews.llvm.org/D94020 Change-Id: Id1c716d71313edcfb768b2b175a6789ef9b01f3c
-
Yitzhak Mandelbaum authored
Migrates `change` to `changeTo`; changes to new constructor API (2-arg construct + `setRule`); refactors use of `addInclude` to newer version. Differential Revision: https://reviews.llvm.org/D93695
-
Alex Zinenko authored
BEGIN_PUBLIC [mlir] Remove LLVMType, LLVM dialect types now derive Type directly This class has become a simple `isa` hook with no proper functionality. Removing will allow us to eventually make the LLVM dialect type infrastructure open, i.e., support non-LLVM types inside container types, which itself will make the type conversion more progressive. Introduce a call `LLVM::isCompatibleType` to be used instead of `isa<LLVMType>`. For now, this is strictly equivalent. END_PUBLIC Depends On D93681 Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D93713
-
Jinsong Ji authored
In some case, the RC may have 0 allocatable reg. eg: VRSAVERC in PowerPC, which has only 1 reg, but it is also reserved. The curreent implementation will keep calling the computePSetLimit because getRegPressureSetLimit assume computePSetLimit will return a non-zero value. The fix simply early return the value from TableGen for such special case. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D92907
-
Florian Hahn authored
This patch adds the LANE variants for VCMLA on AArch64 as defined in "Arm Neon Intrinsics Reference for ACLE Q3 2020" [1] This patch also updates `dup_typed` to accept constant type strings directly. Based on a patch by Tim Northover. [1] https://developer.arm.com/documentation/ihi0073/latest Reviewed By: SjoerdMeijer Differential Revision: https://reviews.llvm.org/D93014
-
- Jan 05, 2021
-
-
Alan Phipps authored
This is an enhancement to LLVM Source-Based Code Coverage in clang to track how many times individual branch-generating conditions are taken (evaluate to TRUE) and not taken (evaluate to FALSE). Individual conditions may comprise larger boolean expressions using boolean logical operators. This functionality is very similar to what is supported by GCOV except that it is very closely anchored to the ASTs. Differential Revision: https://reviews.llvm.org/D84467
-
Stephen Kelly authored
By default, check_clang_tidy runs tests in c++11-or-later mode. Differential Revision: https://reviews.llvm.org/D94029
-
LLVM GN Syncbot authored
-
Bradley Smith authored
Co-Authored-by:
Graham Hunter <graham.hunter@arm.com> Co-Authored-by:
Paul Walker <paul.walker@arm.com> Differential Revision: https://reviews.llvm.org/D93292
-
Valeriy Savchenko authored
This commit introduces a new attribute `called_once`. It can be applied to function-like parameters to signify that this parameter should be called exactly once. This concept is particularly widespread in asynchronous programs. Additionally, this commit introduce a new group of dataflow analysis-based warnings to check this property. It identifies and reports the following situations: * parameter is called twice * parameter is never called * parameter is not called on one of the paths Current implementation can also automatically infer `called_once` attribute for completion handler paramaters that should follow the same principle by convention. This behavior is OFF by default and can be turned on by using `-Wcompletion-handler`. Differential Revision: https://reviews.llvm.org/D92039 rdar://72812043
-
Stephen Kelly authored
Differential Revision: https://reviews.llvm.org/D94030
-
Joe Ellis authored
VLST arguments are coerced to VLATs at the function boundary for consistency with the VLAT ABI. They are then bitcast back to VLSTs in the function prolog. Previously, this conversion is done through memory. With the introduction of the llvm.vector.{insert,extract} intrinsic, we can avoid going through memory here. Depends on D92761 Differential Revision: https://reviews.llvm.org/D92762 -
Whitney Tsang authored
Allow loop nests with empty basic blocks without loops in different levels as perfect. Reviewers: Meinersbur Differential Revision: https://reviews.llvm.org/D93665
-
Florian Hahn authored
Creating in-loop reductions relies on IR references to map IR values to VPValues after interleave group creation. Make sure we re-add the updated member to the plan, so the look-ups still work as expected This fixes a crash reported after D90562.
-
Simon Pilgrim authored
AVX512 has fast truncation ops, but if the truncation source is a concatenation of subvectors then its likely that we can use PACK more efficiently. This is only guaranteed to work for truncations to 128/256-bit vectors as the PACK works across 128-bit sub-lanes, for now I've just disabled 512-bit truncation cases but we need to get them working eventually for D61129.
-
Stephen Kelly authored
This makes sense to do when building only tools like clang-tidy for example. Differential Revision: https://reviews.llvm.org/D93987
-
Stephen Kelly authored
Because we don't know in ASTMatchFinder whether we're matching in AsIs or IgnoreUnlessSpelledInSource mode, we need to traverse the lambda twice, but store whether we're matching in nodes spelled in source or not. Differential Revision: https://reviews.llvm.org/D93688
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D94079
-
Anastasia Stulova authored
Pointers to member functions are a special case of function pointers and therefore have to be disallowed. Tags: #clang Differential Revision: https://reviews.llvm.org/D93958
-
Simon Pilgrim authored
Use instead of the isa_and_nonnull<StoreInst> and use the StoreInst::getPointerOperand wrapper instead of a hardcoded Instruction::getOperand. Looks cleaner and avoids a spurious clang static analyzer null dereference warning.
-
Kazushi (Jam) Marukawa authored
We supports SjLj exception handling in the backend, so changing clang to allow lowering using SjLj exceptions. Update a regression test also. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D94076
-
Fraser Cormack authored
-
Jay Foad authored
Convert it to v_fma_legacy_f32 if it is profitable to do so, just like other mac instructions that are converted to their mad equivalents. Differential Revision: https://reviews.llvm.org/D94010
-