| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[flang][cuf] Add to cuf.alloc/cuf.allocate mem alloc effect (#167414) Add MemAlloc effect to the result so that cuf.alloc/cuf.allocate can be recognized by FIR alias analysis. | 8 个月前 | |
[Flang] Add -ffast-real-mod back for further control of MOD optimizations (#167118) It turns out that having -ffast-math as the only option to control optimizations for MOD for REAL kinds (PR #160660) is too coarse-grained for some applications. Thus, this PR adds back -ffast-real-mod to have more control over the optimization. The -ffast-math flag will still enable the optimization, and -fno-fast-real-mod allows one to disable it. | 8 个月前 | |
[flang][NFC] Strip trailing whitespace from tests (2 of N) Only the fortran source files in flang/test have been modified. The other files in the directory will be cleaned up in subsequent commits | 8 个月前 | |
[flang][NFC] Strip trailing whitespace from tests (2 of N) Only the fortran source files in flang/test have been modified. The other files in the directory will be cleaned up in subsequent commits | 8 个月前 | |
[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. | 8 个月前 | |
[flang][debug] Track dummy argument positions explicitly. (#167489) CHARACTER dummy arguments were treated as local variables in debug info. This happened because our method to get the argument number was not robust. It relied on DeclareOp having a direct reference to arguments which was not the case for character arguments. This is fixed by storing source-level argument positions in DeclareOp. Fixes #112886 | 8 个月前 | |
[MLIR][OpenMP] Introduce overlapped record type map support (#119588) This PR introduces a new additional type of map lowering for record types that Clang currently supports, in which a user can map a top-level record type and then individual members with different mapping, effectively creating a sort of "overlapping" mapping that we attempt to cut around. This is currently most predominantly used in Fortran, when mapping descriptors and there data, we map the descriptor and its data with separate map modifiers and "cut around" the pointer data, so that wedo not overwrite it unless the runtime deems it a neccesary action based on its reference counting mechanism. However, it is a mechanism that will come in handy/trigger when a user explitily maps a record type (derived type or structure) and then explicitly maps a member with a different map type. These additions were predominantly in the OpenMPToLLVMIRTranslation.cpp file and phase, however, one Flang test that checks end-to-end IR compilation (as far as we care for now at least) was altered. 2/3 required PRs to enable declare target to mapping, should look at PR 3/3 to check for full green passes (this one will fail a number due to some dependencies). Co-authored-by: Raghu Maddhipatla raghu.maddhipatla@amd.com | 8 个月前 | |
[mlir][math] Add missing trig math-to-llvm conversion patterns (#141069) asin, acos, atan, and atan2 were being lowered to libm calls instead of llvm intrinsics. Add the conversion patterns to handle these intrinsics and update tests to expect this. | 1 年前 | |
[flang][cuda] Add support for cluster_block_index in cooperative groups (#169427) | 8 个月前 | |
[Flang/Flang-RT] Fix OldUnit tests on Windows (#150734) Flang and Flang-RT have two flavours of unittests: 1. GTest unittests, using lit's lit.formats.GoogleTest format ending with Tests${CMAKE_EXECUTABLE_SUFFIX} 2. "non-GTest" or "OldUnit" unittests, a plain executable ending with .test${CMAKE_EXECUTABLE_SUFFIX} Both executables are emitted into the same unittests/ subdirectory. When running ... 1. tests/Unit/lit.cfg.py, only considers executable ending with Tests (or Tests.exe on Windows), hence skips the non-GTest tests. 2. tests/NonGtestUnit/lit.cfg.py considers all tests ending with .test or .exe. On Windows, The GTest unitests also end with .exe. In Flang-RT, .exe is considered an extension for non-GTest unitests which causes tests such as Flang's RuntimeTests.exe to be executed for both on Windows. This particular test includes a file write test, using a hard-coded filename ucsfile. If the two instances are executed concurrently, they might interfere with each other reading/writing ucsfile which results in a flaky test. This patch avoids the redundant execution by requiring the suffix .test.exe on Windows. lit has to be modified because it uses os.path.splitext the extract the extension, which would only recognize the last component. It was changed from the orginal endswith in c865abe747aa72192f02ebfdcabe730f2553e42f for unknown reasons. In Flang, .exe is not considered a suffix for non-GTest unittests and hence they are not run at all. Fixing by also added .test.exe as valid suffix, like with Flang-RT. Unfortunately, the Evaluate/real.test.exe test was failing on Windows: FAIL: flang-OldUnit :: Evaluate/real.test.exe (3592 of 3592) ******************** TEST 'flang-OldUnit :: Evaluate/real.test.exe' FAILED ******************** ..\_src\flang\unittests\Evaluate\real.cpp:511: FAIL: FlagsToBits(prod.flags) == 0x18, not 0x10 0 0x800001 * 0xbf7ffffe ..\_src\flang\unittests\Evaluate\real.cpp:511: FAIL: FlagsToBits(prod.flags) == 0x18, not 0x10 0 0x800001 * 0x3f7ffffe ..\_src\flang\unittests\Evaluate\real.cpp:511: FAIL: FlagsToBits(prod.flags) == 0x18, not 0x10 0 0x80800001 * 0xbf7ffffe ..\_src\flang\unittests\Evaluate\real.cpp:511: FAIL: FlagsToBits(prod.flags) == 0x18, not 0x10 0 0x80800001 * 0x3f7ffffe ... This is due to the __x86_64__ macro not being set by Microsoft's cl.exe and hence floating point status flags not being read out. The equivalent macro for Microsofts compiler is _M_X64 (or _M_X64). | 1 年前 | |
[flang][OpenMP] Better diagnostics for invalid or misplaced directives (#168885) Add two more AST nodes, one for a misplaced end-directive, and one for an invalid string following the OpenMP sentinel (e.g. "!$OMP XYZ"). Emit error messages when either node is encountered in semantic analysis. | 8 个月前 | |
[flang] Tokenize all -D macro bodies, and do it better (#168116) The compiler presently tokenizes the bodies of only function-like macro definitions from the command line, and does so crudely. Tokenize keyword-like macros too, get character literals right, and handle numeric constants correctly. (Also delete two needless functions noticed in characters.h.) Fixes https://github.com/llvm/llvm-project/issues/168077. | 8 个月前 | |
Fix and reapply IR PGO support for Flang (#142892) This PR resubmits the changes from #136098, which was previously reverted due to a build failure during the linking stage: `` undefined reference to llvm::DebugInfoCorrelate' undefined reference to llvm::ProfileCorrelate' ` The root cause was that llvm/lib/Frontend/Driver/CodeGenOptions.cpp references symbols from the Instrumentation component, but the LINK_COMPONENTS in the llvm/lib/Frontend/CMakeLists.txt for LLVMFrontendDriver did not include it. As a result, linking failed in configurations where these components were not transitively linked. ### Fix: This updated patch explicitly adds Instrumentation to LINK_COMPONENTS in the relevant llvm/lib/Frontend/CMakeLists.txt` file to ensure the required symbols are properly resolved. --------- Co-authored-by: ict-ql <168183727+ict-ql@users.noreply.github.com> Co-authored-by: Chyaka <52224511+liliumshade@users.noreply.github.com> Co-authored-by: Tarun Prabhu <tarunprabhu@gmail.com> | 1 年前 | |
[flang][OpenMP] Tolerate compiler directives in loop constructs (#169346) PR168884 flagged compiler directives (!dir$ ...) inside OpenMP loop constructs as errors. This caused some customer applications to fail to compile (issue 169229). Downgrade the error to a warning, and gracefully ignore compiler directives when lowering loop constructs to MLIR. Fixes https://github.com/llvm/llvm-project/issues/169229 | 8 个月前 | |
[Flang][OpenMP][MLIR] Initial declare target to for variables implementation (#119589) While the infrastructure for declare target to/enter and link for variables exists in the MLIR dialect and at the Flang level, the current lowering from MLIR -> LLVM IR isn't in place, it's only in place for variables that have the link clause applied. This PR aims to extend that lowering to an initial implementation that incorporates declare target to as well, which primarily requires changes in the OpenMPToLLVMIRTranslation phase. However, a minor addition to the OpenMP dialect was required to extend the declare target enumerator to include a default None field as well. This also requires a minor change to the Flang lowering's MapInfoFinlization.cpp pass to alter the map type for descriptors to deal with cases where a variable is marked declare to. Currently, when a descriptor variable is mapped declare target to the descriptor component can become attatched, and cannot be updated, this results in issues when an unusual allocation range is specified (effectively an off-by X error). The current solution is to map the descriptor always, as we always require an up-to-date version of this data. However, this also requires an interlinked PR that adds a more intricate type of mapping of structures/record types that clang currently implements, to circumvent the overwriting of the pointer in the descriptor. 3/3 required PRs to enable declare target to mapping, this PR should pass all tests and provide an all green CI. Co-authored-by: Raghu Maddhipatla raghu.maddhipatla@amd.com | 8 个月前 | |
[NFC][Py Reformat] Reformat python files in the rest of the dirs This is an ongoing series of commits that are reformatting our Python code. This catches the last of the python files to reformat. Since they where so few I bunched them together. Reformatting is done with black. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Reviewed By: jhenderson, #libc, Mordante, sivachandra Differential Revision: https://reviews.llvm.org/D150784 | 3 年前 | |
Reland "[flang] Set LLVM specific attributes to fir.call's of Fortran runtime. (#128093)" This change is inspired by a case in facerec benchmark, where performance of scalar code may improve by about 6%@aarch64 due to getting rid of redundant loads from Fortran descriptors. These descriptors are corresponding to subroutine local ALLOCATABLE, SAVE variables. The scalar loop nest in LocalMove subroutine contains call to Fortran runtime IO functions, and LLVM globals-aa analysis cannot prove that these calls do not modify the globalized descriptors with internal linkage. This patch sets and propagates llvm.memory_effects attribute for fir.call operations calling Fortran runtime functions. In particular, it tries to set the Other memory effect to NoModRef. The Other memory effect includes accesses to globals and captured pointers, so we cannot set it for functions taking Fortran descriptors with one exception for calls where the Fortran descriptor arguments are all null. As long as different calls to the same Fortran runtime function may have different attributes, I decided to attach the attributes to the calls rather than functions. Moreover, attaching the attributes to func.func will require propagating these attributes to llvm.func, which is not happening right now. In addition to llvm.memory_effects, the new pass sets llvm.nosync and llvm.nocallback attributes that may also help LLVM alias analysis (e.g. see #127707). These attributes are ignored currently. I will support them in LLVM IR dialect in a separate patch. I also added another pass for developers to be able to print declarations/calls of all Fortran runtime functions that are recognized by the attributes setting pass. It should help with maintenance of the LIT 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][Driver] Emit module summary for Full LTO (#164302) This PR enables module summary for Full LTO. Module summaries are enabled by default for Full LTO in clang, this change makes the flang behaviour consistent. Reference PR: https://reviews.llvm.org/D34156 | 9 个月前 | |
[Flang] Enable lit's internal shell by default Lit's internal shell is faster as it avoids the overhead of needing to fork bash for every run line, and also provides better debug information on failures. Now that all of flang's tests work correctly with lit's internal shell, we can enable it by default to take advantage of the benefits. Towards #102704. Reviewers: clementval, kiranchandramohan, Meinersbur Reviewed By: clementval Pull Request: https://github.com/llvm/llvm-project/pull/156116 | 11 个月前 | |
[flang/flang-rt] Add -isysroot flag only to tests really requiring (#152914) -isysroot flag was added to all tests, but it makes Driver/darwin-version.f90 failed. In fact, only a few tests regarding interoperability with C need -isysroot flag to search for headers and libraries. So, -isysroot flag is now eliminated from the substitution %flang, and a new substitution %isysroot has been introduced. Moreover, Integration/iso-fortran-binding.cpp invokes clang++ via a shell script, which makes it hard to add -isysroot flag. So, it is refactored. Fixes #150765 | 11 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 3 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 11 个月前 | ||
| 11 个月前 |