- Nov 16, 2022
-
-
Mahesh Ravishankar authored
[mlir] Remove `Transforms/SideEffectUtils.h` and move the methods into `Interface/SideEffectInterfaces.h`. The methods in `SideEffectUtils.h` (and their implementations in `SideEffectUtils.cpp`) seem to have similar intent to methods already existing in `SideEffectInterfaces.h`. Move the decleration (and implementation) from `SideEffectUtils.h` (and `SideEffectUtils.cpp`) into `SideEffectInterfaces.h` (and `SideEffectInterface.cpp`). Also drop the `SideEffectInterface::hasNoEffect` method in favor of `mlir::isMemoryEffectFree` which actually recurses into the operation instead of just relying on the `hasRecursiveMemoryEffectTrait` exclusively. Differential Revision: https://reviews.llvm.org/D137857
-
Shafik Yaghmour authored
Currently Sema::CheckForIntOverflow misses several case that other compilers diagnose for overflow in integral constant expressions. This includes the arguments of a CXXConstructExpr as well as the expressions used in an ArraySubscriptExpr, CXXNewExpr and CompoundLiteralExpr. This fixes https://github.com/llvm/llvm-project/issues/58944 Differential Revision: https://reviews.llvm.org/D137897
-
Kazu Hirata authored
This patch fixes: mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h:955:20: error: unused variable 'sz' [-Werror,-Wunused-variable] mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp:1460:2: error: extra ';' outside of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
-
bixia1 authored
Modify the integration test to check number_of_entries and use it to limit for outputing sparse tensor values. Reviewed By: aartbik, Peiming Differential Revision: https://reviews.llvm.org/D138046
-
Peiming Liu authored
Reviewed By: aartbik, bixia Differential Revision: https://reviews.llvm.org/D138053
-
Reed authored
NVIDIA, ARM, and Intel recently introduced two new FP8 formats, as described in the paper: https://arxiv.org/abs/2209.05433. The first of the two FP8 dtypes, E5M2, was added in https://reviews.llvm.org/D133823. This change adds the second of the two: E4M3. There is an RFC for adding the FP8 dtypes here: https://discourse.llvm.org/t/rfc-add-apfloat-and-mlir-type-support-for-fp8-e5m2/65279. I spoke with the RFC's author, Stella, and she gave me the go ahead to implement the E4M3 type. The name of the E4M3 type in APFloat is Float8E4M3FN, as discussed in the RFC. The "FN" means only Finite and NaN values are supported. Unlike E5M2, E4M3 has different behavior from IEEE types in regards to Inf and NaN values. There are no Inf values, and NaN is represented when the exponent and mantissa bits are all 1s. To represent these differences in APFloat, I added an enum field, fltNonfiniteBehavior, to the fltSemantics struct. The possible enum values are IEEE754 and NanOnly. Only Float8E4M3FN has the NanOnly behavior. After this change is submitted, I plan on adding the Float8E4M3FN type to MLIR, in the same way as E5M2 was added in https://reviews.llvm.org/D133823. Reviewed By: bkramer Differential Revision: https://reviews.llvm.org/D137760
-
Roy Sundahl authored
This test was unsupported in iOS when a more accurate test is that the architecture is x86_64. This "fix" is first in a series of updates intended to get asan arm64 tests fully functional. Reviewed By: thetruestblue, vitalybuka Differential Revision: https://reviews.llvm.org/D138001
-
Fangrui Song authored
This reverts commit e05ce03c. Caused asan use-after-poison to 4 DebugInfo/AMDGPU/ tests. Triggered in PEI::replaceFrameIndicesBackward called llvm::MachineInstr::getNumOperands
-
Tue Ly authored
Use add_with_carry builtin to improve the performance of addition and multiplication of UInt class. For 128-bit, it is as fast as using __uint128_t. Microbenchmark for addition: https://quick-bench.com/q/-5a6xM4T8rIXBhqMTtLE-DD2h8w Microbenchmark for multiplication: https://quick-bench.com/q/P2muLAzJ_W-VqWCuxEJ0CU0bLDg Microbenchmark for shift right: https://quick-bench.com/q/N-jkKXaVsGQ4AAv3k8VpsVkua5Y Microbenchmark for shift left: https://quick-bench.com/q/5-RzwF8UdslC-zuhNajXtXdzLRM Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D137871
-
Fangrui Song authored
-
Andrew Savonichev authored
Alignment of function arguments can be increased only if we can do this for all call sites. Therefore we do not increase it for external functions, and now we skip functions that have address taken, to avoid any issues with functions pointers. Differential Revision: https://reviews.llvm.org/D135708
-
Andrew Savonichev authored
When --nvptx-short-ptr is set, local pointers are stored as 32-bit on nvptx64 target. Before this patch, arguments for a function declaration were always emitted as b64 regardless of their address space, but they were set as b32 for the corresponding call instruction: .extern .func test ( .param .b64 test_param_0 ) [...] .param .b32 param0; st.param.b32 [param0+0], %r1; call.uni test, (param0); This is not supported: ptxas: Type of argument does not match formal parameter 'test_param_0' Now short pointers in a function declaration are emitted as b32 if --nvptx-short-ptr is set. Differential Revision: https://reviews.llvm.org/D135674 -
Andrew Savonichev authored
Global variables used to be printed as u64/b64 even when -nvptx-short-ptr is set. Differential Revision: https://reviews.llvm.org/D127668
-
Roman Lebedev authored
These are already covered by the more general tests i've added.
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Joseph Huber authored
When using `LLVM_ENABLE_RUNTIMES=libc` we need to perform a few extra steps to include LLVM utilities similar to if we were performing a standalone build. Libc depends on the tablegen utilities and the LLVM libraries when performing a full build. When using an `LLVM_ENABLE_PROJECTS=libc` build these are included as a part of the greater LLVM build, but here we need to perform it maunally. This patch should allow using `LLVM_LIBC_FULL_BUILD=ON` when building with runtimes. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D138040
-
Roman Lebedev authored
All of our insert/extract ops work on 128-bit lanes. For `Insert`, we need to extract affected 128-bit lane, unless it's being fully overwritten (FIXME: do we need to be careful about legalization-induced padding that we obviously don't demand?), perform insertions, and then insert the 128-bit lane back. But hold on. If we are operating on an 256-bit legal vector, and thus have two 128-bit subvectors, and are fully overwriting them both, we don't actually need to insert *both* subvectors, only the second one, into the implicitly-widened first one. Also, `Insert` wasn't actually querying the costs, but just assuming them to be `1`. `getShuffleCost(TTI::SK_ExtractSubvector)` notes: ``` // Note that in general, the insertion starting at the beginning of a vector // isn't free, because we need to preserve the rest of the wide vector. ``` ... so as far as i can tell, we didn't account for that. I was hoping this would allow vectorization at a higher VF at one case i looked at, but the subvector insertion cost is still dis-advising that. The change for `Extract` is NFC, and is for consistency only, i wanted to get rid of of that weird explicit discounting of insertion of 0'th element, since the general code should already deal with that. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D137913
-
Krzysztof Parzyszek authored
Used the wrong shuffle instruction... -_-
-
Fangrui Song authored
-
Mohammed Anany authored
This is a similar builder to the one for SCF::IfOp which allows users to pass region builders to it. Refer to the builders for IfOp. Reviewed By: tpopp Differential Revision: https://reviews.llvm.org/D137709
-
Guray Ozen authored
`DeviceMappingAttrInterface` is implemented as unifiying mechanism for thread mapping. A code generator could use any attribute that implements this interface to lower `scf.foreach_thread` to device specific code. It is allowed to choose its own mapping and interpretation. Currently, GPU transform dialect supports only `GPUThreadMapping` and `GPUBlockMapping`; however, other mappings should to be supported as well. This change addresses this issue. It decouples gpu transform dialect from the `GPUThreadMapping` and `GPUBlockMapping`. Now, they can work any other mapping. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D138020
-
Mikhail Goncharov authored
D137915 stopped setting this variables but NewGVN was still used and caused asan failure Differential Revision: https://reviews.llvm.org/D138034
-
Teresa Johnson authored
This restores 47459455, which was reverted in commit 452a14ef, along with fixes for a couple of bot failures.
-
Nico Weber authored
This reverts commit 226409c6. Breaks check-clang on mac, see comments on https://reviews.llvm.org/D136683
-
Louis Dionne authored
I am starting to granularize debug-mode checks so they can be controlled more individually. The goal is for vendors to eventually be able to select which categories of checks they want embedded in their configuration of the library with more granularity. Note that this patch is a bit weird on its own because it does not touch any of the containers that implement iterator bounds checking through the __dereferenceable check of the legacy debug mode. However, I added TODOs to string and vector to change that. Differential Revision: https://reviews.llvm.org/D138033
-
Paul Kirth authored
Instead of using the public, interposable symbol, we can use a private alias and avoid relocations and addends. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D137982
-
Michael Maitland authored
This reverts commit 5e82ee53.
-
Sanjay Patel authored
This solves the crashing from issue #58994. I don't know anything about VE, so I don't know if the output is as expected or even correct.
-
Sanjay Patel authored
Having identical text for these 2 conditions made it harder to find the root problem for issue #58994.
-
- Nov 15, 2022
-
-
Bradley Smith authored
This allow for better optimization later in the backend. This fixes the remaining missed optimizations in D137717. Depends on D137930 Differential Revision: https://reviews.llvm.org/D137947
-
Louis Dionne authored
Some platforms don't provide all C library headers. In practice, libc++ only requires a few C library headers to exist, and only a few functions on those headers. Missing functions that libc++ doesn't need for its own implementation are handled properly by the using_if_exists attribute, however a missing header is currently a hard error when we try to do #include_next. This patch should make libc++ more flexible on platforms that do not provide C headers that libc++ doesn't actually require for its own implementation. The only downside is that it may move some errors from the #include_next point to later in the compilation if we actually try to use something that isn't provided, which could be somewhat confusing. However, these errors should be caught by folks trying to port libc++ over to a new platform (when running the libc++ test suite), not by end users. Differential Revision: https://reviews.llvm.org/D136683
-
Nico Weber authored
Ports: * https://reviews.llvm.org/D84023 * https://reviews.llvm.org/rG4f5ccc72f6a6e (but see https://reviews.llvm.org/rG4901199f5b84b223) No intended behavior change.
-
Michael Maitland authored
On x86 and AArch, SIMD instructions encode all of the scheduling information in the instruction itself. For example, VADD.I16 q0, q1, q2 is a neon instruction that operates on 16-bit integer elements stored in 128-bit Q registers, which leads to eight 16-bit lanes in parallel. This kind of information impacts how the instruction takes to execute and what dependencies this may cause. On RISCV however, the data that impacts scheduling is encoded in CSR registers such as vtype or vl, in addition with the instruction itself. But MCA does not track or use the data in these registers. This patch fixes this problem by introducing Instruments into MCA. * Replace `CodeRegions` with `AnalysisRegions` * Add `Instrument` and `InstrumentManager` * Add `InstrumentRegions` * Add RISCV Instrument and `InstrumentManager` * Parse `Instruments` in driver * Use instruments to override schedule class * RISCV use lmul instrument to override schedule class * Fix unit tests to pass empty instruments * Add -ignore-im clopt to disable this change Differential Revision: https://reviews.llvm.org/D137440
-
Bradley Smith authored
This allow recognition of when a ptest was emitted as an any condition and allows for extra optimization to be done later. This addresses missing optimizations from D137716 and D137718, and partially D137717. Depends on D137716, D137717, D137718 Differential Revision: https://reviews.llvm.org/D137930
-
Nikita Popov authored
After D138014 we do not support using AST with IR that is being mutated. As such, we also no longer need to track unknown instructions using WeakVH. Replace with AssertingVH to make sure that they are not invalidated.
-
Nico Weber authored
Refer to _LIBCPP_ENABLE_DEBUG_MODE instead of the old _LIBCPP_DEBUG in a comment, and write that to __config_site correctly too. See 13ea1343 and the comments in https://crbug.com/1358646. Also change the default of libcxx_enable_debug_mode to false for now. Since we used to not write _LIBCPP_ENABLE_DEBUG_MODE, the previous default of true had no effect (except for compiling debug.cpp and legacy_debug_handler.cpp, which we now no longer build by default). So this (mostly) preserves previous behavior.
-
Teresa Johnson authored
This reverts commit 47459455. Revert while I try to fix a couple of non-Linux build failures.
-
Nikita Popov authored
This restricts usage of AliasSetTracker to IR that does not change. We used to use it during LICM where the underlying IR could change, but remaining uses all use AST as part of a separate analysis phase. This is split out from D137955, which makes use of the new guarantee to switch to BatchAA. Differential Revision: https://reviews.llvm.org/D138014
-
OCHyams authored
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir The SLP-Vectorizer can merge a set of scalar stores into a single vectorized store. Merge DIAssignID intrinsics from the scalar stores onto the new vectorized store. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D133320
-