- Oct 25, 2023
-
-
jeanPerier authored
!llvm.ptr<T> typed pointers are depreciated in MLIR LLVM dialects. Flang codegen still generated them and relied on mlir.llvm codegen to LLVM to turn them into opaque pointers. This patch update FIR codegen to directly emit and work with LLVM opaque pointers. Addresses https://github.com/llvm/llvm-project/issues/69303 - All places generating GEPs need to add an extra type argument with the base type (the T that was previously in the llvm.ptr<T> of the base). - llvm.alloca must also be provided the object type. In the process, I doscovered that we were shamelessly copying all the attribute from fir.alloca to the llvm.alloca, which makes no sense for the operand segments. The updated code that cannot take an attribute dictionnary in the llvm.alloca builder with opaque pointers only propagate the "pinned" and "bindc_name" attributes to help debugging the generated IR. - Updating all the places that rely on g...
-
Morten Borup Petersen authored
Fixes #68884.
-
Simon Tatham authored
If clang/test/Driver/cl-offload.cu is run on Unix in a directory whose absolute pathname starts with `/w`, such as the `/workspace` used by at least some Jenkins CI setups, then the file name on the clang command line is misinterpreted as some kind of MSVC warning-control option, and ignored by the catch-all `_SLASH_w` option in Options.td. Other clang-cl tests take care to put a `--` before the input file name, to force clang to treat it as a filename even if it starts with a / and accidentally looks like a cl option. Do the same here.
-
jeanPerier authored
OpenACC/OpenMP atomic lowering needs a finer control over expression lowering. This patch allows mapping evaluate::Expr<T> to mlir::Value so that any subsequent expression lowering will use these values when an operand is a mapped Expr<T>. This is an alternative to https://github.com/llvm/llvm-project/pull/69866 From which I took the test and some of the logic to extract the non-atomic sub-expression. --------- Co-authored-by:
Nimish Mishra <neelam.nimish@gmail.com>
-
Craig Topper authored
This updates our G_SEXTLOAD support to the same level as G_ZEXTLOAD. Still missing some legalizer rules for both though.
-
Craig Topper authored
We weren't legalizing the shift amount to i64.
-
Kazu Hirata authored
C++20 comes with std::erase to erase a value from std::vector. This patch renames llvm::erase_value to llvm::erase for consistency with C++20. We could make llvm::erase more similar to std::erase by having it return the number of elements removed, but I'm not doing that for now because nobody seems to care about that in our code base. Since there are only 50 occurrences of erase_value in our code base, this patch replaces all of them with llvm::erase and deprecates llvm::erase_value.
-
harishch4 authored
…test This fixes failures from a recent merge. [Flang][OpenMP] Port OpenMP single tests to hlfir flow (https://github.com/llvm/llvm-project/pull/69877)
-
Ingo Müller authored
`PyOperations` are Python-level handles to `Operation *` instances. When the latter are modified by C++, the former need to be invalidated. #69746 implements such invalidation mechanism by setting all `PyReferences` to `invalid`. However, that is not enough: they also need to be removed from the `liveOperations` map since other parts of the code (such as `PyOperation::createDetached`) assume that that map only contains valid refs. This is required to actually solve the issue in #69730.
-
Mikhail Gudim authored
Basic way to recursively analyze `select` in `isKnownNonEqual`: `select %c, %t, %f` is non-equal to `%x` if `%t` is non-equal to `%x` and `%f` is non-equal to `%x`.
-
wanglei authored
First, expand all truncationg stores and extending loads. Second, expand everything for `fixedlen_vector_valuetypes`. Finally, we selectively turn on ones that can be effectively codegen'd. Simultaneously, this patch adds floating-point vector types to load/store patterns. Additional test cases will be included in the IR instruction test patchs.
-
harishch4 authored
Co-authored-by:Harish Chambeti <hchambet@amd.com>
-
Walter Erquinigo authored
We've been using the backtick as our escape character, however that leads to a weird experience on VS Code, because on most hosts, as soon as you type the backtick on VS Code, the IDE will introduce another backtick. As changing the default escape character might be out of question because other plugins might rely on it, we can instead introduce an option to change this variable upon lldb-vscode initialization. FWIW, my users will be using : instead ot the backtick.
-
Kazu Hirata authored
-
Matthias Braun authored
BlockFrequencyInfo calculates block frequencies as Scaled64 numbers but as a last step converts them to unsigned 64bit integers (`BlockFrequency`). This improves the factors picked for this conversion so that: * Avoid big numbers close to UINT64_MAX to avoid users overflowing/saturating when adding multiply frequencies together or when multiplying with integers. This leaves the topmost 10 bits unused to allow for some room. * Spread the difference between hottest/coldest block as much as possible to increase precision. * If the hot/cold spread cannot be represented loose precision at the lower end, but keep the frequencies at the upper end for hot blocks differentiable.
-
Wang Pengcheng authored
I think the TODO is stale now.
-
Maksim Levental authored
-
Ruiling, Song authored
Some passes has limitation that only support simple terminators: branch/unreachable/return. Right now, they ask the pass manager to add LowerSwitch pass to eliminate `switch`. Let's manage such kind of pass dependency by ourselves. Also add the assertion in the related passes.
-
Alex Richardson authored
This commit was supposed to only change the generic implementation. Should fix the build bot errors.
-
Alexander Richardson authored
Use of long double can be error-prone since it could be one of 80-bit extended precision float, IEEE 128-bit float, or IBM 128-bit float. Instead use an explicit xf_float typedef for the remaining cases where long double is being used in the implementation. This patch does not touch the PPC specializations which still use long double.
-
michaelrj-google authored
Some float128 systems (specifically the ones used for aarch64 buildbots) don't respect signs for long double NaNs. This patch disables the printf test that was failing due to this.
-
Matthias Springer authored
`tensor.insert_slice` and `tensor.parallel_insert_slice` can share the same implementation.
-
Valery Dmitriev authored
This is re-commit of #69392 and also fixes issue #69670 which was uncovered with the prior commit. For delayed gather emission it may be incorrect to use stab instruction as insertion point if it is a PHI operand. For that case insertion point is adjusted to be at the end of block, ensuring that prior dependecy vector code is emitted earlier.
-
Min-Yih Hsu authored
This patch also includes: - Remove legacy non_imm12 PatLeaf from RISCVInstrInfoZb.td - Implement a custom GlobalISel operand renderer for TrailingZeros SDNodeXForm
-
Craig Topper authored
This was previously passed by value. It used to be passed by non-const reference, but it was changed to value in D110610. I'm not sure why.
-
michaelrj-google authored
These bugs were found with the new printf long double fuzzing. The long double inf vs nan bug was introduced when we changed to get_explicit_exponent. The bitcast msan issue hadn't come up previously, but isn't a real bug, just a poisoning confusion.
-
Fazlay Rabbi authored
Reference: (1) OpenMP 5.2 Specification - Seciton 5.4.6 Differential revision: https://reviews.llvm.org/D159546
-
Alexey Bataev authored
-
Chris Carlon authored
The `--stdlib` flag can affect the system headers used by `clang` during compilation. By default, `clang` will use the platform-installed C++ standard headers, but with `--stdlib=libc++`, `clang` can use headers included in the distribution for its `libc++` implementation. Prior to this patch, if `compile_commands.json` specified `-stdlib=libc++` or an equivalent form and `--query-driver` took effect, `clangd` would ignore `stdlib` and index based on the platform's headers. When these mismatch, e.g. due to version differences, `clangd`'s completions and the actual compilation can differ. fixes clangd/clangd#1784 --------- Co-authored-by:Chris Carlon <cjc25@cjc25.com>
-
robozati authored
Raw string literals are a C++ feature first added in C++11. Fixes https://github.com/clangd/clangd/issues/1795.
-
Luke Lau authored
-
Kiran Chandramohan authored
First half of the tests switching to opaque pointers. Rest of the tests are omptarget-*.mlir and a specific test for typed pointers. Patch created as requested in https://github.com/llvm/llvm-project/pull/69772
-
Amara Emerson authored
Gives small code size improvements across the board at -Os CTMark. Much of the work is porting the existing heuristics in the DAGCombiner.
-
Leonard Chan authored
This reverts commit 37432c15. The tunings for the lsan allocator for Fuchsia on RISCV should be adjusted.
-
Guray Ozen authored
#69934 broke integration tests that rely on the kernel-bare-ptr-calling-convention and host-bare-ptr-calling-convention flags. This PR brings these flags. Also the kernel-index-bitwidth flag is removed, as kernel pointer size depends on the host. Separating host (64-bit) and kernel (32-bit) is not viable.
-
Peiming Liu authored
-
Aart Bik authored
also typo fix
-
Valery Dmitriev authored
Test exposes issue with delayed gather emission, which may lead to generating an instruction which does not dominate all users.
-
Craig Topper authored
If VT has less bits than SCC, using a ZeroExtendInReg isn't going to fix it. That's an AND instruction. We need to truncate the value instead. This should be ok because we already checked that the boolean contents is ZeroOrOne so the setcc can only produce 0 or 1. No test because I found this while trying to make i32 legal for RISC-V 64 which I'm not ready to upload yet. You can see in the coverage report that this line isn't tested today. https://lab.llvm.org/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp.html#L27270
-
maksfb authored
Some optimization passes may duplicate basic blocks and assign the same input offset to a number of different blocks in a function. This is done e.g. to correctly map debugging ranges for duplicated code. However, duplicate input offsets present a problem when we use AddressMap to generate new addresses for basic blocks. The output address is calculated based on the input offset and will be the same for blocks with identical offsets. The result is potentially incorrect debug info and BAT records. To address the issue, we have to eliminate the dependency on input offsets while generating output addresses for a basic block. Each block has a unique label, hence we extend AddressMap to include address lookup based on MCSymbol and use the new functionality to update block addresses.
-