- Aug 30, 2022
-
-
Utkarsh Saxena authored
Do not fold the endline which contains tokens after the end of range. Differential Revision: https://reviews.llvm.org/D131154
-
Quentin Colombet authored
Add a canonicalizetion step for reinterpret_cast(extract_strided_metadata). This step replaces this sequence of operations by either: - A noop, i.e., the original memref is directly used, or - A plain cast of the original memref The choice is ultimately made based on whether the original memref type is equal to what the reinterpret_cast iss producing. For instance, the reinterpret_cast could be changing some dimensions from static to dynamic and in such case, we need to keep a cast. The transformation is currently only performed when the reinterpret_cast uses exactly the same arguments as what the extract_strided_metadata produces. It may be possible to be more aggressive here but I wanted to start with a relatively simple MLIR patch for my first one! Differential Revision: https://reviews.llvm.org/D132776
-
Nathan Ridge authored
Currently, QueryDriverDatabase returns an empty compile command if it could not determine the file type. This failure mode is unnecessarily destructive; it's better to just return the incoming compiler command, which is still more likely to be useful than an empty command. Differential Revision: https://reviews.llvm.org/D132833
-
Aart Bik authored
This new pass provides an alternative to the current conversion pass that converts sparse tensor types and sparse primitives to opaque pointers and calls into a runtime support library. This pass will map sparse tensor types to actual data structures and primitives to actual code. In the long run, this new pass will remove our dependence on the support library, avoid the need to link in fully templated and expanded code, and provide much better opportunities for optimization on the generated code. Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D132766
-
Craig Topper authored
Mostly just modeled after vp.fneg except there is a "functional instruction" for fneg while fabs is always an intrinsic. Reviewed By: fakepaper56 Differential Revision: https://reviews.llvm.org/D132793
-
Jeff Niu authored
This patch fixes issues with generating assembly format parsers for operations that use the `operands` directive or which have unnamed arguments or results. This patch also fixes a function in `OpAsmParser` that always produced an error when trying to resolve variadic operands with the same type. Fixes #51841 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D131627
-
Craig Topper authored
Reviewed By: arcbbb, kito-cheng Differential Revision: https://reviews.llvm.org/D132792
-
Mark de Wever authored
This should avoid some copies of the output iterator. Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D132812
-
Craig Topper authored
The existing code was incorrect if we had more than one conditional branch instruction in a basic block. Though I don't think that will occur, using analyzeBranch detects that as an unsupported case. Overall this results in simpler code in RISCVRedundantCopyElimination. Reviewed By: reames, kito-cheng Differential Revision: https://reviews.llvm.org/D132347
-
Zhixun Tan authored
[mlir][dataflow] Consolidate AbstractSparseLattice::markPessimisticFixpoint() and AbstractDenseLattice::reset() into Abstract{Sparse,Dense}DataFlowAnalysis::setToEntryState(). ### Rationale For a program point where we cannot reason about incoming dataflow (e.g. an argument of an entry block), the framework needs to initialize the state. Currently, `AbstractSparseDataFlowAnalysis` initializes such state to the "pessimistic fixpoint", and `AbstractDenseDataFlowAnalysis` calls the state's `reset()` function. However, entry states aren't necessarily the pessimistic fixpoint. Example: in reaching definition, the pessimistic fixpoint is `{all definitions}`, but the entry state is `{}`. This awkwardness might be why the dense analysis API currently uses `reset()` instead of `markPessimisticFixpoint()`. This patch consolidates entry point initialization into a single function `setToEntryState()`. ### API Location Note that `setToEntryState()` is defined in the analysis rather than the lattice, so that we allow different analyses to use the same lattice but different entry states. ### Removal of the concept of optimistic/known value The concept of optimistic/known value is too specific to SCCP. Furthermore, the known value is not really used: In the current SCCP implementation, the known value (pessimistic fixpoint) is always `Attribute{}` (non-constant). This means there's no point storing a `knownValue` in each state. If we do need to re-introduce optimistic/known value, we should put it in the SCCP analysis, not the sparse analysis API. ### Terminology Please let me know if "entry state" is a good terminology. I chose "entry" from Wikipedia (https://en.wikipedia.org/wiki/Data-flow_analysis#Basic_principles). Another term I can think of is "boundary" (https://suif.stanford.edu/~courses/cs243/lectures/L3-DFA2-revised.pdf) which might be better since it also makes sense for backward analysis. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D132086 -
Florian Hahn authored
Add extra test coverage and updates some slightly stale comments as pointed out in D132365.
-
- Aug 29, 2022
-
-
Joe Nash authored
Create a field in VOPProfile called DstRCVOP3DPP to allow the VOP3 versions of DPP instructions to have a different destination register class than the non-VOP3 encoding. NFC for current instructions, but planned to be functional in upcoming ones. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D132673
-
Wei Yi Tee authored
`report_fatal_error` is overloaded on `StringRef` and `Twine &`, therefore passing a `std::string` argument leads to ambiguity as it is convertible to either type. Reviewed By: gribozavr2, sgatev Differential Revision: https://reviews.llvm.org/D132745
-
Alexey Bataev authored
When estimating the cost of the in-tree vectorized scalars in buildvector sequences, need to take into account the vectorized insertelement instruction. The top of the buildvector seuences is the topmost vectorized insertelement instruction, because it will have > than 1 use after the vectorization. For the affected test case improves througput from 21 to 16 (per llvm-mca). Differential Revision: https://reviews.llvm.org/D132740
-
Daniil Dudkin authored
If one tries to compile the attached test case code with flan, the one will get an internal compiler error on `CHECK(level == 0)` at the end of `PrivatizeAssociatedLoopIndex` function. Other compilers (gfortran and nvfortran) build this code just fine. This change fixes the ICE. Reviewed By: clementval Differential Revision: https://reviews.llvm.org/D132846
-
Peixin Qiao authored
Non-global variable which can be in threadprivate directive must be one variable in main program, and it has implicit SAVE attribute. Take it as with SAVE attribute, so to create GlobalOp for it to simplify the translation to LLVM IR. Reviewed By: NimishMishra Differential Revision: https://reviews.llvm.org/D127047
-
Peixin Qiao authored
As Fortran 2018 18.3.2, C_PTR is interoperable with any C object pointer type. C_FUNPTR is interoperable with any C function pointer type. As 18.3.6, a C pointer can correspond to a Fortran dummy argument of type C_PTR with the VALUE attribute. The interface for type(C_PTR)/type(C_FUNPTR) argument with value attribute is different from the the usual derived type. For type(C_PTR) or type(C_FUNPTR), the component is the address, and the interface is a pointer even with VALUE attribute. For a usual derived type such as the drived type with the component of integer 64, the interface is a i64 value when it has VALUE attribute on aarch64 linux. To lower the type(C_PTR)/type(C_FUNPTR) argument with value attribute, get the value of the component of the type(C_PTR)/type(C_FUNPTR), which is the address, and then convert it to the pointer and pass it. Reviewed By: Jean Perier Differential Revision: https://reviews.llvm.org/D131583
-
Sanjay Patel authored
https://alive2.llvm.org/ce/z/j_8Wz9 The arithmetic shift was converted to logical shift with: 24607860 That does not seem to uncover any other missing/conflicting folds, so convert directly to signbit test + cast. We still need to fold the pattern with logical shift to test + cast. This allows reducing patterns where the output type is not the same as the input value: https://alive2.llvm.org/ce/z/nydwFV Fixes #57394
-
Aaron Ballman authored
The rule IDs are not stable, so this uses a regex for the rule ids instead of concrete values. It also moves the CHECK lines below the code so that it's easier to modify the test in the future. It also breaks the CHECK lines into multiple lines to improve the performance of the test and aid in debugging failures. Finally, it adds a comment to the top of the test explaining that things are still rather fragile.
-
Joseph Huber authored
The only RTLs that get added to the `UsedRTLs` list have already been checked is they were valid binaries. We shouldn't need to do this again when we unregister all the used binaries as they wouldn't have been used if they were invalid anyway. Let me know if I'm incorrect in this assumption. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D131443
-
Sanjay Patel authored
(iN X s>> (N - 1)) + 1 --> (~X) u>> (N - 1) https://alive2.llvm.org/ce/z/wzS474
-
Sanjay Patel authored
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Luca Di Sera authored
The method is now wrapped by clang_getUnqualifiedType. A declaration for clang_getUnqualifiedType was added to clang-c/Index.h to expose it to user of the library. An implementation for clang_getUnqualifiedType was introduced in CXType.cpp that wraps the equivalent method of the underlying QualType of a CXType. An export symbol was added to libclang.map under the new version entry LLVM_16. A test was added to LibclangTest.cpp that tests the removal of qualifiers for some CXTypes. Differential Revision: https://reviews.llvm.org/D132749
-
Benjamin Kramer authored
-
Tres Popp authored
This operation has been deprecated for a very long time now, so remove it completely. https://llvm.discourse.group/t/rfc-memref-memory-shape-as-attribute/2229 Differential Revision: https://reviews.llvm.org/D132466
-
Martin Storsjö authored
Use `isa<T>()` instead of `Type *Var = dyn_cast<T>()` when the result of the cast isn't used.
-
Martin Storsjö authored
-
Adrian Kuegel authored
DestinationStyleOpInterface should be possible to use for ops that don't have regions. Therefore the check for block arguments should be done in verifyStructedOpInterface. Differential Revision: https://reviews.llvm.org/D132836
-
Florian Hahn authored
In the newly added test either a libfunc (VF=2) or a intrinsic (VF=4) can be chosen. Test coverage for D132585.
-
Jonas Toth authored
Improve the documentation for 'misc-const-correctness' to: - include better examples - improve the english - fix links to other checks that were broken due to the directory-layout changes - mention the limitation that the check does not run on `C` code. Addresses #56749, #56958 Reviewed By: njames93 Differential Revision: https://reviews.llvm.org/D132244
-
Florian Hahn authored
Suggested as independent fix during the review of D132585.
-
Nikita Popov authored
There are two scenarios here: 1. Standalone flang build, where we use an installed clang-tblgen binary. We need to use find_package() to find it. 2. Combined build of clang and flang, where we want to use the path specified in CLANG_TABLEGEN_EXE during the clang build -- however, this variable was previously not exported. The new implementation matches what is done for mlir-tblgen. Differential Revision: https://reviews.llvm.org/D131475
-
Alvin Wong authored
Control Flow Guard is only supported on Windows target, therefore there is no point to make it an accepted attribute for other targets. Reviewed By: rnk, aaron.ballman Differential Revision: https://reviews.llvm.org/D132661
-
Phoebe Wang authored
Reviewed By: FreddyYe Differential Revision: https://reviews.llvm.org/D132742
-
Nicolas Vasilache authored
Co-authored-by:
Michal Terepeta <michalt@google.com> Reviewed-by: nicolasvasilache Differential Revision: https://reviews.llvm.org/D115744
-
Petr Hosek authored
We already disable plugin support in Clang, disable LLVM side as well since we don't support plugins in Fuchsia toolchain.
-
Adrian Kuegel authored
-
Wei Yi Tee authored
Differential Revision: https://reviews.llvm.org/D132744
-