- Mar 27, 2024
-
-
Craig Topper authored
It is identical to PALUVINoVm so we can use that instead.
-
Kazu Hirata authored
This patch fixes: mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp:76:46: error: 'multiplies' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
-
Alexey Bataev authored
minbitwidth analysis. Need to drop nuw/nsw flags, if the alternate node is resized after the minbitwidth analysis, to avoid producing poison values in corner cases.
-
Piotr Zegar authored
Because check emitted multiple warnings for every template instance fix-it couldn't be applied due to overlaps. Using TK_IgnoreUnlessSpelledInSource and restricting check to C++ only.
-
Peter Klausler authored
An apparent attempt to override a type-bound procedure is not allowed to be interpreted as on override when the procedure is PRIVATE and the override attempt appears in another module. However, if the TBP that would have been overridden is a DEFERRED procedure in an abstract base type, the override must take place. PRIVATE DEFERRED procedures must therefore have all of their overrides appear in the same module as the abstract base type.
-
Ivan Butygin authored
Most of arith/math ops support fastmath attribute, use it instead of global flag.
-
smanna12 authored
Reported by Static Analyzer Tool: In clang::dataflow::Environment::initialize(): Using the auto keyword without an & causes the copy of an object of type LambdaCapture
-
Jonas Hahnfeld authored
Since the restructuring in commit fa3d789d, the option DISABLE_LLVM_LINK_LLVM_DYLIB is counter-productive and leads to CommandLine Error: Option 'debug-counter' registered more than once!
-
Peter Klausler authored
A function uses "if constexpr" to consider all possible types in a variant, but looks as if it can fall out without returning an expression. Add a final "else" with a crash to make things more clear and to protect against unlikely future extensions of the type. Fixes https://github.com/llvm/llvm-project/issues/86391.
-
Andrzej Warzyński authored
This patch refactors the `linearize.mlir` test - currently it contains some duplication and can be tricky to follow. Summary of changes: * reduce duplication by introducing a shared check prefix (`ALL`) and by introducing `-check-prefixes`, * make sure that every "check" line is directly above the corresponding line of input MLIR, * group check lines corresponding to a particular prefix together (so that it's easier to see the expected output for a particular prefix), * remove `CHECK` from prefix names (with multiple prefixes that's just noise that can be avoided) and use a bit more descriptive prefixes instead (`CHECK0` -> `BW-0`, where `BW` stands for bitwidth), * unify indentation, * `nonvec_result` -> `test_tensor_no_linearize` (for consistency with `test_index_no_linearize`). NOTE: This change only updates the format of the "CHECK" lines and doesn't affect what's being tested. This change is intended as preparation for adding support for scalable vectors to `LinearizeConstant` and `LinearizeVectorizable` - i.e. patterns that `linearlize.mlir` is meant to test. -
Craig Topper authored
-
Peter Klausler authored
Fortran allows the INTRINSIC attribute to be specified with a distinct attribute statement, and also as part of the attribute list of a type-declaration-stmt. This is an odd case (especially as the declared type is mandated to be ignored if it doesn't match the type of the intrinsic function) that can lead to odd error messages and crashes, since the rest of name resolution expects that intrinsics with explicit declarations will have been declared with INTRINSIC attribute statements. Resolve by handling an "inline" INTRINSIC attribute as a special case while processing a type-declaration-stmt, so that real, intrinsic :: acos, asin, atan is processed exactly as if it had been intrinsic acos, asin, atan; real acos, asin, atan Fixes https://github.com/llvm/llvm-project/issues/86382.
-
smanna12 authored
This patch replaces getAs<> with castAs<> to resolve potential static analyzer bugs for 1. Dereferencing a pointer issue with nullptr FPT when calling ResolveExceptionSpec() in checkEscapingByref(clang::VarDecl *, clang::Sema &). 3. Dereferencing a pointer issue with nullptr ElementTy->getAs() when calling getElementType() in clang::Sema::SemaBuiltinFPClassification(clang::CallExpr *, unsigned int). 4. Dereferencing a pointer issue with nullptr ConvType->getAs() when calling getKeyword() in clang::Sema::ActOnConversionDeclarator(clang::CXXConversionDecl *). -
Slava Zakharin authored
Added `FLANG_LIBCUDACXX_PATH` CMake variable to specify installation of header-only libcudacxx library. If it is specified, the `<cuda/std/variant>` is used to provide implementation of `std::variant`.
-
Farzon Lotfi authored
Completes #86192 `DXIL.td` - add log2 to dxilop lowering `DXILIntrinsicExpansion.cpp` - add log and log10 to log2 expansions
-
Zahira Ammarguellat authored
Sanitizer failure in https://lab.llvm.org/buildbot/#/builders/19/builds/25788
-
Peter Klausler authored
Detect attempts to use non-constant targets, including internal procedures, as initializers for procedure pointers, including components of structure components being used as initializers.
-
Peter Klausler authored
Supports the REDUCE() transformational intrinsic function of Fortran (see F'2023 16.9.173) in a manner similar to the existing support for SUM(), PRODUCT(), &c. There are APIs for total reductions to scalar results, and APIs for partial reductions that reduce the rank of the argument by one. This implementation requires more functions than other reductions because the various possible types of the user-supplied OPERATION= function need to be elaborated. Once the basic API in reduce.h has been approved, later patches will implement lowering. REDUCE() is primarily for completeness, not portability; only one other Fortran compiler implements this F'2018 feature today, and only some types work correctly with it.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
X32 should be used for gnux32 triples
-
Jonas Devlieghere authored
lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp:1195:15: warning: comparison of unsigned expression in ‘>= 0’ is always true 1195 | if (weekday >= 0 && weekday < 7) | ~~~~~~~~^~~~ -
Alfie Richards authored
These aliases were supported previously there was a regression at some point. This adds back the alternate forms and tidies up this section of code a little. See https://github.com/llvm/llvm-project/pull/83436#issuecomment-2010213714 for the initial report regarding this change.
-
Abhin P Jose authored
Changing type of DiagnosticHandlerTy due to adding -Wcast-function-type-mismatch to -Wextra group(https://github.com/llvm/llvm-project/pull/86131#issuecomment-2018014179). Changed the reference argument DiagnosticInfo to a pointer and edited the test cases failing due to this change. Added another small change where Gtest api was throwing an warning due varargs argument not being passed.
-
Jason Molenda authored
Fixing a crash in lldb when `symbols.auto-download` setting is enabled. When doing a backtrace, this feature has lldb search for a SymbolFile for stack frames when we are backtracing, and add them either synchoronously or asynchronously, depending on the specific setting used. Module::SetSymbolFileFileSpec clears the Module's UnwindTable, once we find a new SymbolFile. We may be adding a source of unwind information that we did not have when lldb was working only with the executable binary. What happens in practice is that we're using a reference to the Module's UnwindTable, and then the other thread getting the SymbolFile clears it and now the first thread is referring to freed memory and we can crash. When built with address sanitizer, it crashes much more reliably. Given that unwind information used for exception handling -- eh_frame, compact unwind -- is present in executable binaries, the only thing we're likely to *add* would be DWARF's `debug_frame` if that was also available. The actual value of re-creating the UnwindTable when we have added a SymbolFile is not large. I also tried fixing this by changing the Module to have a shared_ptr to the UnwindTable, so we could have two different UnwindTable's in use simultaneously for a brief period. This would be fine TODAY, but it introduces a very subtle bug that someone will have a heck of a time figuring out in the future. In the end, I believe the safest approach is to sacrifice the possible marginal gain of reconstructing the UnwindTable once a SymbolFile has been added, to sidestep this whole problem area. Also, in `Module::GetUnwindTable()`, call `DownloadSymbolFileAsync` before we create the UnwindTable for the first time, in case the symbol file is fetched synchronously, we will have it for that possible marginal gain.
-
- Mar 26, 2024
-
-
Peter Klausler authored
ConvertToObjectEntity() returns true for use- and host-associated object symbols, too. Ensure in this case that the symbol really is a non-associated object. Fixes https://github.com/llvm/llvm-project/issues/85776.
-
Cyndy Ishida authored
-
Peter Klausler authored
When encountering an unparsable !DIR$ compiler directive line, accept it as a whole source line and emit a warning that it is unrecognizable. Fixes https://github.com/llvm/llvm-project/issues/59107, https://github.com/llvm/llvm-project/issues/82212, and https://github.com/llvm/llvm-project/issues/82654.
-
Daniel Chen authored
[Flang] Support for passing procedure pointer, reference to a function that returns a procedure pointer to structure constructor. (#86533) This PR fixes `not yet implemented: procedure pointer component in structure constructor` as shown in the following test case. ``` MODULE M TYPE :: DT PROCEDURE(Fun), POINTER, NOPASS :: pp1 END TYPE CONTAINS INTEGER FUNCTION Fun(Arg) INTEGER :: Arg Fun = Arg END FUNCTION END MODULE PROGRAM MAIN USE M IMPLICIT NONE TYPE (DT) :: v2 PROCEDURE(FUN), POINTER :: pp2 v2 = DT(pp2) v2 = DT(bar()) CONTAINS FUNCTION BAR() RESULT(res) PROCEDURE(FUN), POINTER :: res END END ``` -
Luke Lau authored
Building on #86248, we can also narrow the width of a mul of zexts. This is specifically legal because on RVV we always extend to the next power of 2 width, and multiplying two N bit integers produces a maximum value of 2\*N bits. So as long as we keep an inner zext of 2\*N, we will have enough space for the multiply and won't overflow. Alive2 proof: https://alive2.llvm.org/ce/z/XteYyb
-
Nick Desaulniers authored
The usage of __builtin_unreachable after calls to quick_exit were distressing. If a function is properly marked [[noreturn]] then __builtin_unreachable is not necessary. Looking into this further, we seem to have header only implementations for CPU targets. The inline nature of these functions is curious; we're going to exit, it doesn't matter if we need to pay the call of a function or not. If we just make these functions have distinct TUs rather than be header only, we can clean up the cmake rules for quick_exit which were different between CPU and GPU. Remove darwin support for quick_exit. This isn't being tested, and we can bring it back when necessary.
-
Simon Pilgrim authored
[X86] combineConcatVectorOps - concatenate FADD/FSUB/FMUL ops if we don't increase the number of INSERT_SUBVECTOR nodes. FADD/FSUB/FMUL are usually less port-bound than INSERT_SUBVECTOR, so only concatenate if it reduces the instruction count and doesn't introduce extra INSERT_SUBVECTOR nodes.
-
Simon Pilgrim authored
[X86] Add fadd/fsub/fmul tests showing failure to concat operands together and perform as a wider vector We don't want to concat fadd/fsub/fmul if both operands would need concatenating (as the fp op is usually cheaper than the concat), but if at least one operand is free to concat (i.e. constant or extracted from a wider vector), then we should try to concat the fp op.
-
Florian Hahn authored
Add a new PtrAdd opcode to VPInstruction that corresponds to IRBuilder::CreatePtrAdd, which creates a GEP with source element type i8. This is then used to model scalarizing VPWidenPointerInductionRecipe by introducing scalar-steps to model the index increment followed by a PtrAdd. Note that PtrAdd needs to be able to generate code for only the first lane or for all lanes. This may warrant introducing a separate recipe for scalarizing that can be created without relying on the underlying IR. Depends on https://github.com/llvm/llvm-project/pull/80271 PR: https://github.com/llvm/llvm-project/pull/83068
-
Rafael Ubal authored
- Revamped lowering conversion pattern for `tosa.reshape` to handle previously unsupported combinations of dynamic dimensions in input and output tensors. The lowering strategy continues to rely on pairs `tensor.collapse_shape` + `tensor.expand_shape`, which allow for downstream fusion with surrounding `linalg.generic` ops. - Fixed bug in canonicalization pattern `ReshapeOp::fold()` in `TosaCanonicalizations.cpp`. The input and result types being equal is not a sufficient condition for folding. If there is more than 1 dynamic dimension in the input and result types, a productive reshape could still occur. - This work exposed the fact that bufferization does not properly handle a `tensor.collapse_shape` op producing a 0D tensor from a dynamically shaped one due to a limitation in `memref.collapse_shape`. While the proper way to address this would involve releasing the `memref.collapse_shape` restriction and verifying correct bufferization, this is left as possible future work. For now, this scenario is avoided by casting the `tosa.reshape` input tensor to a static shape if necessary (see `inferReshapeInputType()`. - An extended set of tests are intended to cover relevant conversion paths. Tests are named using pattern `test_reshape_<rank>_{up|down|same}_{s2s|s2d|d2s|d2d}_{explicit|auto}[_empty][_identity]`, where: - `<rank>` is the input rank (e.g., 3d, 6d) - `{up|down|same}` indicates whether the reshape increases, decreases, or retains the input rank. - `{s2s|s2d|d2s|d2d}` indicates whether reshape converts a statically shaped input to a statically shaped result (`s2s`), a statically shaped input to a dynamically shaped result (`s2d`), etc. - `{explicit|auto}` is used to indicate that all values in the `new_shape` attribute are >=0 (`explicit`) or that a -1 placeholder value is used (`auto`). - `empty` is used to indicate that `new_shape` includes a component set to 0. - `identity` is used when the input and result shapes are the same. -
Julian Nagele authored
These tests show invalid tbaa.struct metadata that is currently accepted in preparation for a change to the IR Verifier that will then reject it. PR: https://github.com/llvm/llvm-project/pull/86167
-
Akira Hatanaka authored
Revert "[CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (#67454)" (#86674) This reverts commit 8bd1f911. It appears that the commit broke msan bots.
-
Stefan Gränitz authored
Using remove() on DeclContext::lookup_result list invalidates iterators. This assertion failure was one (fortunate) symptom: ``` clang/include/clang/AST/DeclBase.h:1337: reference clang::DeclListNode::iterator::operator*() const: Assertion `Ptr && "dereferencing end() iterator"' failed. ```
-
Christian Sigg authored
This matches the CMake targets and reduces the number of headers that need to be included in multiple targets.
-
Tim Creech authored
This change: - Updates the existing Clang User's Manual section on SPGO so that it describes how to use llvm-profgen to perform SPGO on Windows. This is new functionality implemented in #83972. - Fixes a minor typo in the existing llvm-profgen invocation example. - Adds an LLVM release note on this new functionality in llvm-profgen.
-
Carlos Seo authored
Added a new variant of the CHECK() function that takes a custom message as a parameter. This is useful for more meaninful error messages when the compiler is expected to crash. Fixes #78931
-