- Feb 09, 2022
-
-
Matthias Springer authored
They used to be classes with a virtual `run` function. This was inconvenient because post analysis steps are stored in BufferizationOptions. Because of this design choice, BufferizationOptions were not copyable. Differential Revision: https://reviews.llvm.org/D119258
-
Diana Picus authored
Use a single entry point with several optional parameters. Differential Revision: https://reviews.llvm.org/D118776
-
Kiran Chandramohan authored
This patch adds support for lowering the Fortran goto statement from parse-tree to MLIR. The goto statement in Fortran is a form of unstructured control flow. The statement transfers control to the code starting at the label specified in the statement. This can be faithfully represented in MLIR by a branch instruction. To assist the lowering of code with unstructured control flow, blocks are created in advance and associated with the relevant pre-fir tree evaluations. This is part of the upstreaming effort from the fir-dev branch in [1]. [1] https://github.com/flang-compiler/f18-llvm-project Reviewed By: clementval, vdonaldson, schweitz, awarzynski Differential Revision: https://reviews.llvm.org/D118983 Co-authored-by:
V Donaldson <vdonaldson@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com>
-
Muhammad Omair Javaid authored
VS2019 version 1920 in now the default and get tested in llvm/include/llvm/Support/Compiler.h. This patch propagates LLVM_FORCE_USE_OLD_TOOLCHAIN macro to disable testing for VS2019. Differential Revision: https://reviews.llvm.org/D114639
-
Roman Lebedev authored
-
Balazs Benics authored
- We should report bugs to the GitHub Issues - We should advocate using Discourse instead of the superseded cfe-dev mailing list. There are a couple of other cosmetic changes such as preferring `using` instead of `typedef` and quoting the `-analyze-function` parameter's payload for escaping the braces. Thanks @loic-joly-sonarsource for reporting this on Discord! Reviewed By: NoQ, Szelethus Differential Revision: https://reviews.llvm.org/D119245
-
Nikita Popov authored
D116208 may cause a macro clash on older versions of linux, where fs.h defines a READ macro. This is resolved by switching to a more typical casing style for non-macro symbols. Reapplying with changes to the symbol names in various platform specific code, which I missed previously. Differential Revision: https://reviews.llvm.org/D118783
-
Nikolas Klauser authored
Reviewed By: ldionne, Quuxplusone, #libc Spies: arichardson, libcxx-commits Differential Revision: https://reviews.llvm.org/D119189
-
Valentin Clement authored
ISO_Fortran_binding.h was updated with missing entries for CFI types for REAL and COMPLEX kinds 2,3,10,16. This patch updates TypeCode.h to use these new types. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D119283
-
Nikita Popov authored
This reverts commit fda29264. This breaks the sanitizer build on windows, will reapply with additional changes.
-
Qiu Chaofan authored
Previous test in ppc-pmmintrin.c did not check IR of intrinsic function definition. Add them and simplify. These tests shouldn't be auto-generated, because we don't want to check wrapper functions.
-
Muhammad Omair Javaid authored
clang-cl MSVC required version is 19.20 now. Update the default -fms-compatibility-version to 19.14. Differential Revision: https://reviews.llvm.org/D114639
-
RVP authored
This patch fixes two issues with clearing of the internal storage for cl::bits 1. The internal bits storage for cl::bits is uninitialized. This is a problem if a cl::bits option is not defined with static lifetime. 2. ResetAllOptionOccurrences does not reset cl::bits options. The latter is also discussed in: https://lists.llvm.org/pipermail/llvm-dev/2021-February/148299.html Differential Revision: https://reviews.llvm.org/D119066
-
Nikita Popov authored
D116208 may cause a macro clash on older versions of linux, where fs.h defines a READ macro. This is resolved by switching to a more typical casing style for non-macro symbols. Differential Revision: https://reviews.llvm.org/D118783
-
Nikita Popov authored
I suspect that this is dead code. There is no test coverage for this special case, and the struct type names this checks against don't seem to match what OpenCL actually generates (which would be %opencl.sampler_t rather than %struct._sampler_t for example). Motivation for this change is that this code is incompatible with opaque pointers -- simply deleting it is the simplest way of making it compatible :) Differential Revision: https://reviews.llvm.org/D119229
-
Andrzej Warzynski authored
This patch adds support for generating MLIR files in Flang's frontend driver (i.e. `flang-new -fc1`). `-emit-fir` is added as an alias for `-emit-mlir`. We may want to decide to split the two in the future. A new parent class for code-gen frontend actions is introduced: `CodeGenAction`. We will be using this class to encapsulate logic shared between all code-generation actions, but not required otherwise. For now, it will: * run prescanning, parsing and semantic checks, * lower the input to MLIR. `EmitObjAction` is updated to inherit from this class. This means that the behaviour of `flang-new -fc1 -emit-obj` is also updated (previously, it would just exit immediately). This change required `flang/test/Driver/syntax-only.f90` to be updated. For `-emit-fir`, a specialisation of `CodeGenAction` is introduced: `EmitMLIRAction`. The key logic for this class is implemented in `EmitMLIRAction::ExecuteAction`. Differential Revision: https://reviews.llvm.org/D118985
-
Nikita Popov authored
This rewrites ArgPromotion to be based on offsets rather than GEP structure. We inspect all loads at constant offsets and remember which types are loaded at which offsets. Then we promote based on those types. This generalizes ArgPromotion to work with bitcasted loads, and is compatible with opaque pointers. This patch also fixes incorrect handling of alignment during argument promotion. Previously, the implementation only checked that the pointer is dereferenceable, but was happy to speculate overaligned loads. (I would have fixed this separately in advance, but I found this hard to do with the previous implementation approach). Differential Revision: https://reviews.llvm.org/D118685
-
Jean Perier authored
Previously, when calling a procedure implicitly for which a global scope procedure symbol with the same name existed, semantics resolved the procedure name in the call to the global symbol without checking that the symbol interface was compatible with the implicit interface of the call. This could cause expression rewrite and lowering to later badly process the implicit call assuming a different result type or an explicit interface. This could lead to lowering crash in case the actual argument were incompatible with the dummies from the explicit interface. Emit errors in the following problematic cases: - If the result type from the symbol did not match the one from the implicit interface. - If the symbol requires an explicit interface. This patch still allows calling an F77 like procedure with different actual argument types than the one it was defined with because it is correctly supported in lowering and is a feature in some program (it is a pointer cast). The two cases that won't be accepted have little chance to make much sense. Results returning ABIs may differ depending on the return types, and function that requires explicit interface usually requires descriptors or specific processing that is incompatible with implicit interfaces. Note that this patch is not making a deep analysis, and it will only catch mistakes if a global symbol and an implicit interface are involved. Cases where the user provided a conflicting explicit interface would still require a pass after name resolution to study conflicts more deeply. But these cases will not crash lowering or trigger expression rewrite to do weird things. Differential Revision: https://reviews.llvm.org/D119274
-
Rainer Orth authored
As reported in Issue #41838, `clang` doesn't correctly implement `long double` on 32-bit Solaris/SPARC: the psABI requires this to be an 128-bit type. Four sanitizer tests currently `FAIL` for this reason. While there is a WIP patch to fix `clang` (D89130 <https://reviews.llvm.org/D89130>), it isn't complete yet and I've hit so many brick walls while trying to finish it that I'm unsure if I ever will. This patch therefore `XFAIL`s those tests in the meantime. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D119016
-
Haojian Wu authored
These will be used when building parsing table for LR parsers. Separate from https://reviews.llvm.org/D118196. Differential Revision: https://reviews.llvm.org/D118990
-
Rainer Orth authored
Enabling `sanitizer_common` tests on Solaris (D91606 <https://reviews.llvm.org/D91606>) and SPARC (D91608 <https://reviews.llvm.org/D91608>) uncovered a sparcv9 failure SanitizerCommon-Unit :: ./Sanitizer-sparcv9-Test/CompactRingBuffer.int64 like this: [ RUN ] CompactRingBuffer.int64 ==24576==ERROR: SanitizerTool failed to deallocate 0x2000 (8192) bytes at address 0xffffffff7f59b000 ==24576==Sanitizer CHECK failed: /vol/llvm/src/llvm-project/local/compiler-rt/lib/sanitizer_common/sanitizer_posix.cpp:61 (("unable to unmap" && 0)) != (0) (0, 0) The problem is that the original allocation via `MmapAlignedOrDieOnFatalError` is for 4 kB, but the Solaris/sparcv9 pagesize is 8 kB. So the initial allocation is for 12 kB, rounded to a multiple of the pagesize. Afterwards, the unneeded rest is unmapped again, but this fails since the address is not pagesize-aligned. This patch avoids this by aligning the end of the mapping to the pagesize. With D91827 <https://reviews.llvm.org/D91827> added, the test `PASS`es on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D91615
-
Rainer Orth authored
As described in Issue #53523, the `DenseMapCustomTest.DefaultMinReservedSizeTest` test FAILs on Solaris/SPARC (both 32 and 64-bit): /vol/llvm/src/llvm-project/local/compiler-rt/lib/sanitizer_common/tests/sanitizer_dense_map_test.cpp:399: Failure Expected: (MemorySize) != (Map.getMemorySize()), actual: 8192 vs 8192 This happens because SPARC, unlike many other CPUs, uses an 8 kB pagesize. Fixed by incorporating the pagesize into the calculations of `ExpectedInitialBucketCount` and derived values. Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`. Differential Revision: https://reviews.llvm.org/D118771
-
Tobias Hieta authored
This patch makes llvm-rc/windres prefer <target>-clang over clang when doing it's preprocessing. This is so that we can have a .cfg file for <target> and configure sysroot and other important flags. Config files not picked up with clang --target=<target> automatically. We only look for <target>-clang in the same dir as llvm-windres and not for all PATHs to minimize the change. Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D119219
-
Fraser Cormack authored
This patch drops TableGen patterns matching all-ones masked RVV pseudos in the case where there are fallback patterns matching the generic masked forms to "_MASK" pseudos. This optimization is now performed with a SelectionDAG post-processing step which peephole-optimizes these same pseudos with all-ones masks and swaps them out to their unmasked pseudos. This cuts our generated ISel table down by around ~5% (~110kB) in lieu of a far smaller auto-generated table to help with the peephole. This only targets our custom RISCVISD::*_VL binary operator nodes, which use the one form for both masked and unmasked variants. A similar approach could be used for our intrinsics but we'd need to do some work, e.g., to represent unmasked intrinsics as true-masked intrinsics at the IR or ISel level. At a rough estimate, this could save us a further 9% on the size of our ISel table for the binary intrinsic patterns alone. There is no observable impact on our tests. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D118810
-
Saiyedul Islam authored
OpenMP Spec 5.2 requires unimplemented requires clauses to produce compile time error termination. Moving current partial support of reverse_offload to a distant future version 9.9 so that existing code can be tested and maintained until a complete implementation is available. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D119256
-
Fangrui Song authored
-
Jonas Devlieghere authored
Recognize arm64 triples as AArch64 so we can XFAIL/skip tests using target-aarch64. Differential revision: https://reviews.llvm.org/D119169
-
Fangrui Song authored
-
Sameer Sahasrabuddhe authored
Differential Revision: https://reviews.llvm.org/D119308
-
Yaxun (Sam) Liu authored
code object version determines ABI, therefore should not be mixed. This patch emits amdgpu_code_object_version module flag in LLVM IR based on code object version (default 4). The amdgpu_code_object_version value is code object version times 100. LLVM IR with different amdgpu_code_object_version module flag cannot be linked. The -cc1 option -mcode-object-version=none is for ROCm device library use only, which supports multiple ABI. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D119026
-
Zakk Chen authored
1. Remove computeDefaultABIFromArch and add computeDefaultABI in RISCVISAInfo. 2. Add parseFeatureBits which may used in D118333. Differential Revision: https://reviews.llvm.org/D119250
-
jacquesguan authored
Add patterns for vector widening floating-point fused multiply-add instructions. Differential Revision: https://reviews.llvm.org/D117546
-
Jon Roelofs authored
-
Bill Wendling authored
The "-fzero-call-used-regs" option tells the compiler to zero out certain registers before the function returns. It's also available as a function attribute: zero_call_used_regs. The two upper categories are: - "used": Zero out used registers. - "all": Zero out all registers, whether used or not. The individual options are: - "skip": Don't zero out any registers. This is the default. - "used": Zero out all used registers. - "used-arg": Zero out used registers that are used for arguments. - "used-gpr": Zero out used registers that are GPRs. - "used-gpr-arg": Zero out used GPRs that are used as arguments. - "all": Zero out all registers. - "all-arg": Zero out all registers used for arguments. - "all-gpr": Zero out all GPRs. - "all-gpr-arg": Zero out all GPRs used for arguments. This is used to help mitigate Return-Oriented Programming exploits. Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D110869
-
Richard Smith authored
-
LLVM GN Syncbot authored
-
Nico Weber authored
-
Nico Weber authored
-
Mircea Trofin authored
-
Nico Weber authored
-