| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[flang] Fix a warning This patch fixes: flang/lib/Optimizer/Transforms/AddAliasTags.cpp:169:27: error: unused function 'operator<<' [-Werror,-Wunused-function] | 1 年前 | |
[flang][debug] Make common blocks data extraction more robust. (#168752) Our current implementation for extracting information about common block required traversal of FIR which was not ideal but previously there was no other way to obtain that information. The [hl]fir.declare was extended in commit https://github.com/llvm/llvm-project/pull/155325 to include storage and storage_offset. This commit adds these operands in fircg.ext_declare and then use them in AddDebugInfoPass to create debug data for common blocks. | 11 个月前 | |
| 1 年前 | ||
[flang] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (#163916) This patch replaces LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]], introduced as part of C++17. | 1 年前 | |
[mlir] Enable decoupling two kinds of greedy behavior. (#104649) The greedy rewriter is used in many different flows and it has a lot of convenience (work list management, debugging actions, tracing, etc). But it combines two kinds of greedy behavior 1) how ops are matched, 2) folding wherever it can. These are independent forms of greedy and leads to inefficiency. E.g., cases where one need to create different phases in lowering and is required to applying patterns in specific order split across different passes. Using the driver one ends up needlessly retrying folding/having multiple rounds of folding attempts, where one final run would have sufficed. Of course folks can locally avoid this behavior by just building their own, but this is also a common requested feature that folks keep on working around locally in suboptimal ways. For downstream users, there should be no behavioral change. Updating from the deprecated should just be a find and replace (e.g., find ./ -type f -exec sed -i 's|applyPatternsAndFoldGreedily|applyPatternsGreedily|g' {} \; variety) as the API arguments hasn't changed between the two. | 1 年前 | |
[MLIR] Update pass declarations to new autogenerated files The patch introduces the required changes to update the pass declarations and definitions to use the new autogenerated files and allow dropping the old infrastructure. Reviewed By: mehdi_amini, rriddle Differential Review: https://reviews.llvm.org/D132838 | 4 年前 | |
[flang][FIR] add fir.assumed_size_extent to abstract assumed-size extent encoding (#164452) The purpose of this patch is to allow converting FIR array representation to memref when possible without hitting memref verifier issue. The issue was that FIR arrays may be assumed size, in which case the last dimension will not be known at runtime. Flang uses -1 to encode this to fulfill Fortran 2023 standard requirements in 18.5.3 point 5 about CFI_desc_t. When arrays are converted to memeref, if this -1 reaches memeref operations, it triggers verifier errors (even if the conversion happened in code that guards the code to be entered at runtime if the array is assumed-size because folders/verifiers do not take into account reachability). This follows-up on discussions in #163505 merge requests | 1 年前 | |
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[flang][Multi-Image] Moving Mutli-image lowering to PRIF into the MIF dialect (#161179) Support for multi-image features has begun to be integrated into LLVM. A new dialect which simplifies lowering to PRIF wil be proposed in this PR. The initial definition of this dialect (MIF) is based only on operations already upstreamed in LLVM and the current lowering will be moved to this dialect. --------- Co-authored-by: Dan Bonachea <dobonachea@lbl.gov> Co-authored-by: Valentin Clement (バレンタイン クレメン) <clementval@gmail.com> | 1 年前 | |
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[flang][cuda] Fix detection of assumed size arrays in shared memory offset (#167231) | 11 个月前 | |
[flang][cuda] Import type descriptor in the gpu module when needed (#149157) | 1 年前 | |
[mlir][LLVM] Add LLVMAddrSpaceAttrInterface and NVVMMemorySpaceAttr (#157339) This patch introduces the LLVMAddrSpaceAttrInterface for defining compatible LLVM address space attributes To test this interface, this patch also adds: - Adds NVVMMemorySpaceAttr implementing both LLVMAddrSpaceAttrInterface and MemorySpaceAttrInterface - Converts NVVM memory space constants from enum to MLIR enums - Updates all NVVM memory space references to use new attribute system - Adds support for NVVM memory spaces in ptr dialect translation Example: mlir llvm.func @nvvm_ptr_address_space( !ptr.ptr<#nvvm.memory_space<global>>, !ptr.ptr<#nvvm.memory_space<shared>>, !ptr.ptr<#nvvm.memory_space<constant>>, !ptr.ptr<#nvvm.memory_space<local>>, !ptr.ptr<#nvvm.memory_space<tensor>>, !ptr.ptr<#nvvm.memory_space<shared_cluster>> ) -> !ptr.ptr<#nvvm.memory_space<generic>> Translating the above code to LLVM produces: llvm declare ptr @nvvm_ptr_address_space(ptr addrspace(1), ptr addrspace(3), ptr addrspace(4), ptr addrspace(5), ptr addrspace(6), ptr addrspace(7)) To convert the memory space enum to the new enum class use: bash grep -r . -e "NVVMMemorySpace::kGenericMemorySpace" -l | xargs sed -i -e "s/NVVMMemorySpace::kGenericMemorySpace/NVVMMemorySpace::Generic/g" grep -r . -e "NVVMMemorySpace::kGlobalMemorySpace" -l | xargs sed -i -e "s/NVVMMemorySpace::kGlobalMemorySpace/NVVMMemorySpace::Global/g" grep -r . -e "NVVMMemorySpace::kSharedMemorySpace" -l | xargs sed -i -e "s/NVVMMemorySpace::kSharedMemorySpace/NVVMMemorySpace::Shared/g" grep -r . -e "NVVMMemorySpace::kConstantMemorySpace" -l | xargs sed -i -e "s/NVVMMemorySpace::kConstantMemorySpace/NVVMMemorySpace::Constant/g" grep -r . -e "NVVMMemorySpace::kLocalMemorySpace" -l | xargs sed -i -e "s/NVVMMemorySpace::kLocalMemorySpace/NVVMMemorySpace::Local/g" grep -r . -e "NVVMMemorySpace::kTensorMemorySpace" -l | xargs sed -i -e "s/NVVMMemorySpace::kTensorMemorySpace/NVVMMemorySpace::Tensor/g" grep -r . -e "NVVMMemorySpace::kSharedClusterMemorySpace" -l | xargs sed -i -e "s/NVVMMemorySpace::kSharedClusterMemorySpace/NVVMMemorySpace::SharedCluster/g" NOTE: A future patch will add support for ROCDL, it wasn't added here to keep the patch small. | 1 年前 | |
[flang][cuda] Extract element count computation into helper function (#168937) This patch extracts the common logic for computing array element counts from shape operands into a reusable helper function in CUFCommon. | 11 个月前 | |
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[flang][cuda] Update CompilerGeneratedNames pass to work on gpu module (#120660) - Update CompilerGeneratedNames so it can perform renaming in gpu.module - Update Codegen so it look in the correct module for the type descriptor. | 1 年前 | |
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[NFC][MLIR] Fix crash in ConvertComplexPow. | 1 年前 | |
| 11 个月前 | ||
[flang] improve DITypeAttr caching with recursive derived types (#146543) The current DITypeAttr caching for derived type debug metadata generation strategy is not optimal. This turns out to be an issue for compile times in apps with very very complex derived types like CP2K See the added debug-cyclic-derived-type-caching-simple.f90 test for more details about the duplication issue. As a real world example justifying the new non trivial caching strategy, in CP2K, emitting debug type info for the swarm_worker_type in swarm_worker.F caused 1,747,347 llvm debug metadata nodes to be emitted instead of 8023 after this patch (200x less) leading to noticeable compile time improvements (I measured 0.12s spent in AddDebugInfo pass instead of 7.5s prior to this patch). The main idea is that caching is now associating to the cached DITypeAttr tree for a derived type a list of parent nodes being referred to recursively via indices in this DITypeAttr. When leaving the context of a parent node, all types that were cached and linked to this parent node are cleared from the cache. This allows more reusage in sub-trees while still fulfilling the MLIR requirements that DITypeAttr types referring to a parent DITypeAttr via integer id should only be used inside the DITypeAttr of the parent. Most of the complexity comes from computing the "list of parent nodes" by merging the ones from the components. This is made is such a way that the extra cost for apps without recursive derived type is minimal because the extra data structure should not require extra dynamic allocations when they are no or little recursion. Example: Take the following type graph (Fortran source for it in the added debug-cyclic-derived-type-caching-complex.f90). A is the tope level types, and has direct components of types B, C, and E. There are cycles in the type tree introduced by type B and D. Types C and E are of interest here because they are in the middle of those cycles and appear in several places in the type tree. There occurrences is labeled in brackets in the order of visit by the DebugTypeGenerator. A -> B -> C [1] -> D -> E [1] -> F -> G -> B | | | | | | | | -> D | | | | | | -> H -> E [2] -> F -> G -> B | | | | | |-> D | | | | -> I -> E [3] -> F -> G -> B | | | | | |-> D | | -> C [2] | | -> C [3] -> D | -> E [4] -> F -> G -> B | | -> D ` With this patch, E[2] and E[3] can share the same DITypeAttr as well as C[1] and C[2] while they previously all got there own nodes. To be safe with regards to cycles in MLIR, a DITypeAttr created for a node N2 under a node N1 being recursively referred to and above the recursive reference to N1 shall not be used above N1 in the DITypeAttr tree. It can however be used in several places under N1. Hence here: -E[2] cannot reuse E[1] DITypeAttr because D appears above and under E[1]. -E[3] can reuse E[2] DITypeAttr because they are both under B and above D. -E[4] cannot reuse E[3] DITypeAttr because it is above B. This is achieved by this patch because when visiting A and reaching B, the recursive reference to B is registered in the visit context. This context is added D when going back-up in F. So when reaching back E[1] with the information to build its DITypeAttr, its recursive references are known and saved along the DITypeAttr in the cache. When reaching back D, the cache for E is cleared because it is known it depended on D. A new DITypeAttr is created after E[2], and this time it only depends on B because the D under E[2] is not a recursive reference (D is not above E[2]). Hence, when reaching E[3] it can be reused, and the cache entry for E[2] is cleared when reaching B, which leads to a new DITypeAttr to be created for E[4]. | 1 年前 | |
| 1 年前 | ||
| 1 年前 | ||
[flang] Remove "unsafe-fp-math" attribute support (#162783) These global flags block furthur improvements for clang, users should always use fast-math flags see also https://discourse.llvm.org/t/rfc-honor-pragmas-with-ffp-contract-fast/80797 Remove them incrementally, this is the flang part. | 1 年前 | |
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[flang] Adding lowering of TEAMs features to PRIF in MIF Dialect (#165573) Support for multi-image features has begun to be integrated into LLVM with the MIF dialect. In this PR, you will find lowering and operations related to the TEAM features ( SYNC TEAM, GET_TEAM, FORM TEAM, CHANGE TEAM, TEAM_NUMBER). Note regarding the operation for CHANGE TEAM : This operation is partial because it does not support the associated list of coarrays because the allocation of a coarray and the lowering of PRIF's prif_alias_{create|destroy} procedures are not yet supported in Flang. This will be integrated later. Any feedback is welcome. | 11 个月前 | |
flang] Remove remaining uses of llvm::Optional (NFC) This patch removes the unused "using" declaration and removes #include "llvm/ADT/Optional.h". This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 | 3 年前 | |
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir][NFC] update flang/Optimizer/Transforms create APIs (11/n) (#149915) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
| 1 年前 | ||
[flang] Implement !DIR$ IVDEP directive (#133728) This directive tells the compiler to ignore vector dependencies in the following loop and it must be placed before a do loop. Sometimes the compiler may not have sufficient information to decide whether a particular loop is vectorizable due to potential dependencies between iterations and the directive is here to tell to the compiler that vectorization is safe with parallelAccesses metadata. This directive is also equivalent to #pragma clang loop assume(safety) in C++ | 11 个月前 | |
[mlir][LLVM] Resync memory effect attribute with LLVM IR (#168568) - Add missing locations, namely 'ErrnoMem', 'TargetMem0', and 'TargetMem1'. | 11 个月前 | |
[flang][do concurrent] Use values yielded by local init regions (#155223) Similar to what is done for OpenMP private clauses, prefer the value yielded from the init region to the allocated private variable in case the region is operating on arguments by-value (e.g. Fortran character boxes). This changes provides the same results as https://github.com/llvm/llvm-project/pull/154303 in both the LLVM and Fujitsu test suites (so no regressions). Testing Time: 7216.26s Passed : 88522 Failed : 160 Executable Missing: 408 | 1 年前 | |
[flang] Remove unused local variables (NFC) (#167105) Identified with bugprone-unused-local-non-trivial-variable. | 11 个月前 | |
[mlir][nfc] Remove TrivialPatternRewriters (#155248) These are relics from the times when PatternRewriter was not instantiable directly, I suppose. | 1 年前 | |
[flang] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (#163916) This patch replaces LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]], introduced as part of C++17. | 1 年前 | |
[Flang] Move non-common headers to FortranSupport (#124416) Move non-common files from FortranCommon to FortranSupport (analogous to LLVMSupport) such that * declarations and definitions that are only used by the Flang compiler, but not by the runtime, are moved to FortranSupport * declarations and definitions that are used by both ("common"), the compiler and the runtime, remain in FortranCommon * generic STL-like/ADT/utility classes and algorithms remain in FortranCommon This allows a for cleaner separation between compiler and runtime components, which are compiled differently. For instance, runtime sources must not use STL's <optional> which causes problems with CUDA support. Instead, the surrogate header flang/Common/optional.h must be used. This PR fixes this for fast-int-sel.h. Declarations in include/Runtime are also used by both, but are header-only. ISO_Fortran_binding_wrapper.h, a header used by compiler and runtime, is also moved into FortranCommon. | 1 年前 | |
[Flang] Move non-common headers to FortranSupport (#124416) Move non-common files from FortranCommon to FortranSupport (analogous to LLVMSupport) such that * declarations and definitions that are only used by the Flang compiler, but not by the runtime, are moved to FortranSupport * declarations and definitions that are used by both ("common"), the compiler and the runtime, remain in FortranCommon * generic STL-like/ADT/utility classes and algorithms remain in FortranCommon This allows a for cleaner separation between compiler and runtime components, which are compiled differently. For instance, runtime sources must not use STL's <optional> which causes problems with CUDA support. Instead, the surrogate header flang/Common/optional.h must be used. This PR fixes this for fast-int-sel.h. Declarations in include/Runtime are also used by both, but are header-only. ISO_Fortran_binding_wrapper.h, a header used by compiler and runtime, is also moved into FortranCommon. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 |