| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[flang] Fix standalone builds against installed MLIR (#126387) 1. Add a new MLIR_DEPS argument group to flang_add_library(), and move MLIR-specific dependencies to that group. These dependencies are added as usual in regular builds, and are skipped in standalone builds, since MLIR targets are not visible there (and were already built and installed). 2. Fix the value of MLIR_MAIN_SRC_DIR to refer to the current source directory rather than the directory written into MLIR CMake files. The latter refers to the directory used to build the MLIR package, and is no longer valid. 3. Fix non-dylib friendly linking of LLVMTargetParser in Optimizer unittests. With these changes, I can successfully run Flang's regression tests. | 1 年前 | |
[acc][flang] Define hasUnknownDimensions in MappableType (#165794) The MappableType interface currently defines a generateAccBounds method which examines a variable and generates acc.bounds operations that encode its dimensions. The implementation can extract bounds information in various ways: either from the MLIR type itself or by analyzing the IR to find dimension information from defining operations. However, we need to distinguish between cases where dimensional information is not directly available from the type itself. This new hasUnknownDimensions API returns true when the MLIR type does not encode dimensional information and there is no associated descriptor or metadata that would make this information extractable from the visible ssa value the represents the variable. The expected use case is calling generateAccBounds only when this returns true, as it indicates that bounds must be extracted from the IR (by walking back from current variable to its defining spots or its descriptor). This supports cases such as raw references to arrays with non-constant bounds (e.g., explicit-shape arrays in Fortran where bounds are passed as arguments). This functionality could also be leveraged for CIR VLA support in the future. For FIR types: - Box types return false (descriptor encodes dimensions) - Reference types check if the pointee has dynamic size using fir::hasDynamicSize() | 9 个月前 | |
[flang][acc] Implement MappableType interfaces for fir.box and fir.array (#122495) The newly introduced MappableType interface in acc dialect was primarily intended to allow variables with non-materialized storage to be used in acc data clauses (previously everything was required to be pointer-like). One motivator for this was fir.box since it is possible to be passed to functions without a wrapping fir.ref and also it can be generated directly via operations like fir.embox - and unlike other variable representations in FIR, the underlying storage for it does not get materialized until LLVM codegen. The new interface is being attached to both fir.box and fir.array. Strictly speaking, attaching to the latter is primarily for consistency since the MappableType interface requires implementation of utilities to compute byte size - and it made sense that a fir.box<fir.array<10xi32>> and fir.array<10xi32> would have a consistently computable size. This decision may be revisited as MappableType interface evolves. The new interface attachments are made in a new library named FIROpenACCSupport. The reason for this is to avoid circular dependencies since the implementation of this library is reusing code from lowering of OpenACC. More specifically, the types are defined in FIRDialect and FortranLower depends on it. Thus we cannot attach these interfaces in FIRDialect. | 1 年前 | |
[flang] CUDA Fortran - part 1/5: parsing Begin upstreaming of CUDA Fortran support in LLVM Flang. This first patch implements parsing for CUDA Fortran syntax, including: - a new LanguageFeature enum value for CUDA Fortran - driver change to enable that feature for *.cuf and *.CUF source files - parse tree representation of CUDA Fortran syntax - dumping and unparsing of the parse tree - the actual parsers for CUDA Fortran syntax - prescanning support for !@CUF and !$CUF - basic sanity testing via unparsing and parse tree dumps ... along with any minimized changes elsewhere to make these work, mostly no-op cases in common::visitors instances in semantics and lowering to allow them to compile in the face of new types in variant<> instances in the parse tree. Because CUDA Fortran allows the kernel launch chevron syntax ("call foo<<<blocks, threads>>>()") only on CALL statements and not on function references, the parse tree nodes for CallStmt, FunctionReference, and their shared Call were rearranged a bit; this caused a fair amount of one-line changes in many files. More patches will follow that implement CUDA Fortran in the symbol table and name resolution, and then semantic checking. Differential Revision: https://reviews.llvm.org/D150159 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 3 年前 |