| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[CodeGen][LLVM] Make the va_list related intrinsics generic. (#85460) Currently, the builtins used for implementing va_list handling unconditionally take their arguments as unqualified ptrs i.e. pointers to AS 0. This does not work for targets where the default AS is not 0 or AS 0 is not a viable AS (for example, a target might choose 0 to represent the constant address space). This patch changes the builtins' signature to take generic anyptr args, which corrects this issue. It is noisy due to the number of tests affected. A test for an upstream target which does not use 0 as its default AS (SPIRV for HIP device compilations) is added as well. | 2 年前 | |
[mlir][llvm] Import call site calling conventions (#76391) This revision adds support for importing call site calling conventions. Additionally, the revision also adds a roundtrip test for an indirect call with a non-standard calling convention. | 2 年前 | |
[mlir][llvm] Add comdat attribute to functions This revision adds comdat support to functions. Additionally, it ensures only comdats that have uses are imported/exported and only non-empty global comdat operations are created. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D153739 | 2 年前 | |
[mlir] Add missing fields in DICompositeTypeAttr. (#93226) The fortran arrays use 'dataLocation', 'rank', 'allocated' and 'associated' fields of the DICompositeType. These were not available in 'DICompositeTypeAttr'. This PR adds the missing fields. --------- Co-authored-by: Tobias Gysi <tobias.gysi@nextsilicon.com> | 2 年前 | |
[mlir][llvm] Drop unreachable basic block during import (#78467) This revision updates the LLVM IR import to support unreachable basic blocks. An unreachable block may dominate itself and a value defined inside the block may thus be used before its definition. The import does not support such dependencies. We thus delete the unreachable basic blocks before the import. This is possible since MLIR does not have basic block labels that can be reached using an indirect call and unreachable blocks can indeed be deleted safely. Additionally, add a small poison constant import test. | 2 年前 | |
[mlir][llvm] Fix import of SwitchOp This revision ensures SwitchOps with case and condition bitwidths other than 32-bit are imported properly. It adds an APInt based builder to the SwitchOp and implements a verifier that checks that the condition and the case value types match. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D153438 | 2 年前 | |
[mlir] use TypeSize and uint64_t in DataLayout (#72874) Data layout queries may be issued for types whose size exceeds the range of 32-bit integer as well as for types that don't have a size known at compile time, such as scalable vectors. Use best practices from LLVM IR and adopt llvm::TypeSize for size-related queries and uint64_t for alignment-related queries. See #72678. | 2 年前 | |
[MLIR][LLVM] Use CyclicReplacerCache for recursive DIType import (#98203) Use the new CyclicReplacerCache from https://github.com/llvm/llvm-project/pull/98202 to support importing of recursive DITypes in LLVM dialect's DebugImporter. This helps simplify the implementation, allows for separate testing of the cache infra itself, and as a result we even got more efficient translations. | 1 年前 | |
[mlir][llvm] Drop unreachable basic block during import (#78467) This revision updates the LLVM IR import to support unreachable basic blocks. An unreachable block may dominate itself and a value defined inside the block may thus be used before its definition. The import does not support such dependencies. We thus delete the unreachable basic blocks before the import. This is possible since MLIR does not have basic block labels that can be reached using an indirect call and unreachable blocks can indeed be deleted safely. Additionally, add a small poison constant import test. | 2 年前 | |
[mlir][LLVM] Introduce reduction intrinsics for minimum/maximum This patch adds supports for the reduction intrinsic for floating point minimum and maximum that have been added to LLVM by https://reviews.llvm.org/D152370. Related to: #63969 Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D155869 | 2 年前 | |
[MLIR] Add support for frame pointers in MLIR (#72145) Add support for frame pointers in MLIR. --------- Co-authored-by: Markus Böck <markus.boeck02@gmail.com> Co-authored-by: Christian Ulmann <christianulmann@gmail.com> | 2 年前 | |
[mlir][LLVM] Fix empty res attr import This commit ensures that an empty list of result attributes is not imported as an empty ArrayAttr. Instead, the attribute is just not added to the LLVMFuncOp. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D153553 | 2 年前 | |
[MLIR] Add attributes no_unwind and will_return to the LLVMIR dialect (#98921) And testing. These are being added to be used in the GPU to LLVM SPV pass. --------- Co-authored-by: Victor Perez <victor.perez@codeplay.com> | 1 年前 | |
[mlir][LLVMIR] Fix identified structs with same name Different identified struct types may have the same name (""). Previously, these were deduplicated based on their name, which caused an assertion failure when nesting identified structs: %0 = type { %1 } %1 = type { i8 } declare void @fn(%0) Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D156531 | 2 年前 | |
[mlir][test] Fix filecheck annotation typos (#92897) Moved fixes for mlir from https://github.com/llvm/llvm-project/pull/91854, plus few additional in second commit. --------- Co-authored-by: klensy <nightouser@gmail.com> | 2 年前 | |
[MLIR][LLVM] Add vector exception to composite type element ignore mode (#89385) This commit fixes a bug in the DICompositeType element ignore mode. It seems that vectors require the presence of elements, as they otherwise do not pass the verifier. | 2 年前 | |
[RemoveDIs][MLIR] Don't process debug records in the LLVM-IR translator (#89735) We are almost ready to enable the use of debug records everywhere in LLVM by default; part of the prep-work for this means ensuring that every tool supports them. Every tool in the llvm/ project supports them, front-ends that use the DIBuilder will support them, and as far as I can tell, the only other tool in the LLVM repo that needs to support them but doesn't is mlir-translate. This patch trivially unblocks them by converting from debug records to debug intrinsics before translating a module. | 2 年前 | |
[mlir][llvm] Fix bug in constant import from LLVM IR. The revision addresses a bug during constant expression traversal when importing LLVM IR. A constant expression may have cyclic dependencies, for example, when a constant is initialized with its address. This revision extends the constant expression traversal to detect cyclic dependencies and adds a test to verify this case is handled properly. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D143152 | 3 年前 | |
[mlir][llvm] Fix bug in constant import from LLVM IR. The revision addresses a bug during constant expression traversal when importing LLVM IR. A constant expression may have cyclic dependencies, for example, when a constant is initialized with its address. This revision extends the constant expression traversal to detect cyclic dependencies and adds a test to verify this case is handled properly. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D143152 | 3 年前 | |
[MLIR] Convert some tests to opaque pointers (NFC) | 3 年前 | |
[MLIR] Convert remaining tests to opaque pointers (NFC) These were the final tests using -opaque-pointers=0 in mlir/. | 3 年前 | |
[mlir][LLVM] Add !invariant.load metadata support to llvm.load (#76754) Add support for !invariant.load metadata (by way of a unit attribute) to the MLIR representation of llvm.load. | 2 年前 | |
[Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (#88182) At the moment, Clang is rather liberal in assuming that 0 (and by extension unqualified) is always a safe default. This does not work for targets that actually use a different value for the default / generic AS (for example, the SPIRV that obtains from HIPSPV or SYCL). This patch is a first, fairly safe step towards trying to clear things up by querying a modules' default AS from the target, rather than assuming it's 0, alongside fixing a few places where things break / we encode the 0 == DefaultAS assumption. A bunch of existing tests are extended to check for non-zero default AS usage. | 2 年前 | |
[mlir][LLVM] Convert alias metadata to using attributes instead of ops Using MLIR attributes instead of metadata has many advantages: * No indirection: Attributes can simply refer to each other seemlessly without having to use the indirection of SymbolRefAttr. This also gives us correctness by construction in a lot of places as well * Multithreading save: The Attribute infrastructure gives us thread-safety for free. Creating operations and inserting them into a block is not thread-safe. This is a major use case for e.g. the inliner in MLIR which runs in parallel * Easier to create: There is no need for a builder or a metadata region This patch therefore does exactly that. It leverages the new distinct attributes to create distinct alias domains and scopes in a deterministic and threadsafe manner. Differential Revision: https://reviews.llvm.org/D155159 | 2 年前 | |
[mlir,test] Convert text files from CRLF to LF | 2 年前 | |
[mlir][test] Fix filecheck annotation typos (#92897) Moved fixes for mlir from https://github.com/llvm/llvm-project/pull/91854, plus few additional in second commit. --------- Co-authored-by: klensy <nightouser@gmail.com> | 2 年前 | |
[mlir][llvm] Add branch weight op interface This revision adds a branch weight op interface for the call / branch operations that support branch weights. It can be used in the LLVM IR import and export to simplify the branch weight conversion. An additional mapping between call operations and instructions ensures the actual conversion can be done in the module translation itself, rather than in the dialect translation interface. It also has the benefit that downstream users can amend custom metadata to the call operation during the export to LLVM IR. Reviewed By: zero9178, definelicht Differential Revision: https://reviews.llvm.org/D155702 | 2 年前 | |
[mlir][flang] Convert TBAA metadata to an attribute representation The current representation of TBAA is the very last in-tree user of the llvm.metadata operation. Using ops to model metadata has a few disadvantages: * Building a graph has to be done through some weakly typed indirection mechanism such as SymbolRefAttr * Creating the metadata has to be done through a builder within a metadata op. * It is not multithreading safe as operation insertion into the same block is not thread-safe This patch therefore converts TBAA metadata into an attribute representation, in a similar manner as it has been done for alias groups and access groups in previous patches. This additionally has the large benefit of giving us more "correctness by construction" as it makes things like cycles in a TBAA graph, or references to an incorrectly typed metadata node impossible. Differential Revision: https://reviews.llvm.org/D155444 | 2 年前 | |
[mlir][LLVM] Add nsw and nuw flags (#74508) The implementation of these are modeled after the existing fastmath flags for floating point arithmetic. | 2 年前 | |
[MLIR][NVVM] Enable nvvm intrinsics import to LLVMIR (#68843) Co-authored-by: Tobias Gysi <tobias.gysi@nextsilicon.com> Co-authored-by: Christian Ulmann <christianulmann@gmail.com> | 2 年前 | |
Expose Tail Kind Call to MLIR (#98080) I would like to mark a call op in LLVM dialect as Musttail. The calling convention attribute only exposes Tail, not Musttail. I noticed that the CallInst of LLVM has an additional field to specify the flavor of tail call kind. I bubbled this up to the LLVM dialect by adding another attribute that maps to LLVM::CallInst::TailCallKind. | 1 年前 | |
[MLIR][LLVM] Add explicit target_cpu attribute to llvm.func (#78287) This patch adds the target_cpu attribute to llvm.func MLIR operations and updates the translation to/from LLVM IR to match "target-cpu" function attributes. | 2 年前 | |
[mlir][llvm] Use zeroinitializer for TargetExtType (#66510) Use the recently introduced llvm.mlir.zero operation for values with LLVM target extension type. Replaces the previous workaround that uses a single zero-valued integer attribute constant operation. Signed-off-by: Lukas Sommer <lukas.sommer@codeplay.com> | 2 年前 | |
[mlir][llvm] Add llvm.target_features features attribute (#71510) This patch adds a target_features (TargetFeaturesAttr) to the LLVM dialect to allow setting and querying the features in use on a function. The motivation for this comes from the Arm SME dialect where we would like a convenient way to check what variants of an operation are available based on the CPU features. Intended usage: The target_features attribute is populated manually or by a pass: mlir func.func @example() attributes { target_features = #llvm.target_features<["+sme", "+sve", "+sme-f64f64"]> } { // ... } Then within a later rewrite the attribute can be checked, and used to make lowering decisions. c++ // Finds the "target_features" attribute on the parent // FunctionOpInterface. auto targetFeatures = LLVM::TargetFeaturesAttr::featuresAt(op); // Check a feature. // Returns false if targetFeatures is null or the feature is not in // the list. if (!targetFeatures.contains("+sme-f64f64")) return failure(); For now, this is rather simple just checks if the exact feature is in the list, though it could be possible to extend with implied features using information from LLVM. | 2 年前 | |
[mlir] Add convertInstruction and getSupportedInstructions to LLVMImportInterface (#86799) This patch adds the convertInstruction and getSupportedInstructions to LLVMImportInterface, allowing any non-LLVM dialect to specify how to import LLVM IR instructions and overriding the default import of LLVM instructions. | 2 年前 | |
| 1 年前 | ||
[mlir][llvm] Drop unreachable basic block during import (#78467) This revision updates the LLVM IR import to support unreachable basic blocks. An unreachable block may dominate itself and a value defined inside the block may thus be used before its definition. The import does not support such dependencies. We thus delete the unreachable basic blocks before the import. This is possible since MLIR does not have basic block labels that can be reached using an indirect call and unreachable blocks can indeed be deleted safely. Additionally, add a small poison constant import test. | 2 年前 | |
Add support for MLIR to llvm vscale attribute (#67012) The vscale_range is used for scalabale vector functionality in Arm Scalable Vector Extension to select the size of vector operation (and I thnk RISCV has something similar). This patch adds the base support for the vscale_range attribute to the LLVM::FuncOp, and the marshalling for translation to LLVM-IR and import from LLVM-IR to LLVM dialect. This attribute is intended to be used at higher level MLIR, specified either by command-line options to the compiler or using compiler directives (e.g. pragmas or function attributes in the source code) to indicate the desired range. | 2 年前 | |
[mlir][llvm] Replace NullOp by ZeroOp (#67183) This revision replaces the LLVM dialect NullOp by the recently introduced ZeroOp. The ZeroOp is more generic in the sense that it represents zero values of any LLVM type rather than null pointers only. This is a follow to https://github.com/llvm/llvm-project/pull/65508 | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 |