- Sep 26, 2023
-
-
Philip Reames authored
If we have a build_vector of identical binops, we'd prefer to have a single vector binop in most cases. We do need to make sure that the two build_vectors aren't more difficult to materialize than the original build_vector. To start with, let's restrict ourselves to the case where one build_vector is a fully constant vector. Note that we don't need to worry about speculation safety here. We are not speculating any of the lanes, and thus none of the typical - e.g. div-by-zero - concerns apply. I'll highlight that the constant build_vector heuristic is just one we could chose here. We just need some way to be reasonable sure the cost of the two build_vectors isn't going to completely outweigh the savings from the binop formation. I'm open to alternate heuristics here - both more restrictive and more permissive. As noted in comments, we can extend this in a number of ways. I decided to start small as a) that helps keep things understandable in review and b) it covers my actual motivating case.
-
Nikita Popov authored
Print an error instead of crashing. Fixes https://github.com/llvm/llvm-project/issues/67388.
-
Joseph Huber authored
Summary: This patch adds the necessary entrypoints to handle the `fseek`, `fflush`, and `ftell` functions. These are all very straightfoward, we simply make RPC calls to the associated function on the other end. Implementing it this way allows us to more or less borrow the state of the stream from the server as we intentionally maintain no internal state on the GPU device. However, this does not implement the `errno` functinality so that must be ignored.
-
Daniel Chen authored
PowerPC Vector type intrinsics currently crashes with `-flang-experimental-hlfir` is specified. This patch is to fix the HLFIR path for PowerPC Vector type intrinsics. The patch: 1. Added the `flang-experimental-hlfir` option to all PowerPC vector intrinsic testing. 2. Removed the FIR/MLIR testing to reduce the maintenance cost. 3. Fixed a few verification IR for some non-functional changes in LLVM IR in HLFIR path.
-
David Green authored
The transform will still not trigger as takeInexpensiveLog2 will bail out for any scalable vector, but this guards against a scalable typesize error.
-
Nathan Gauër authored
This commit adds 2 new instructions in the selector: - OpAccessChain - OpInBoundsAccessChain. The choice between the two relies on the `inbounds` marker. Those instruction are not used for OpenCL, to maintain the same behavior as previously. They are only added when building for logical SPIR-V, as it doesn't support the pointer equivalent. Because logical SPIR-V doesn't support pointer cast either, the assign_ptr_type intrinsic need to be generated so OpAccessChain gets lowered with the correct pointer type, instead of i8*. Fixes #66107 --------- Signed-off-by:Nathan Gauër <brioche@google.com>
-
Alexander Richardson authored
This is useful when trying to run multiple tests with different arguments to the executor script. This is needed in my case since I do not know the correct ssh connection arguments when building libc++. The testing script I have spawns multiple QEMU instances that listen on a given port on localhost and runs lit with the --num-shards/--run-shard argument. In order to connect each shard to the right QEMU instances I need to customize the arguments passed to ssh.py (--extra-ssh-args and --extra-scp-args) but can't do this at configure time since the target port is only known when running the tests but not when calling CMake. This change allows me to pass `executor=ssh.py <args>` to lit once I know the right hostname/port for running the tests. This also deprecates the `LIB{CXX,CXXABI,UNWIND}_EXECUTOR` CMake variable as the same can be achieved by adding `executor=...` to the `LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS` variable. -
Alex Richardson authored
While it worked for me locally, it appears to be failing on the FreeBSD 13 buildbot. This reverts commit ab789623.
-
Ivan Kosarev authored
We would currently crash on it trying to use t16 instructions instead of fake16 ones.
-
martin-luecke authored
This exposes the Transform dialect types `AnyParamType` and `ParamType` via the Python bindings.
-
Guray Ozen authored
#65951 improved mbarrier supports. This PR adapts that usage in the integration test.
-
Ivan Kosarev authored
Differential Revision: https://reviews.llvm.org/D156985
-
agozillon authored
Since the changes to -### to correctly return error codes in D156363, some additions of the not lit keyword and perhaps some changes to how fopenmp-targets is handled; the test omp-driver-offload.f90 has become a little susceptible to what appears to be sporadic failures. This was because if certain environment variables are set for AMD devices some of the commands succeed happily and the not check causes the test to fail. Whereas, if they were not set the tests would fail and the not test would succeed, allowing the test to pass provided you were not targeting AMD hardware while running the test. When the environment variables for AMD hardware are set the compiler could find the correct offload architecture to compile for, allowing the command to succeed. However, when not set it'd fail as it can't detect the offload architecture. The solution to this is to specify an AMD architecture via --offload-arch so it always passes, the architecture doesn't really matter, I've chosen to select gfx90a.
-
esmeyi authored
For example: ``` %298:g8rc = RLDICL %297:g8rc, 0, 48 %299:gprc = COPY killed %298.sub_32:g8rc dead %498:gprc = ANDI_rec killed %299:gprc, 1, implicit-def dead $cr0, implicit-def $cr0gt ```
-
Jingu Kang authored
It is a re-commit from reverted commit 3454cf67. Following discussion on https://reviews.llvm.org/D154205, make MachineLICM pass handle subloops with only visiting outermost loop's blocks once. Differential Revision: https://reviews.llvm.org/D154205
-
spupyrev authored
We are brining a new algorithm for function layout (reordering) based on the call graph (extracted from a profile data). The algorithm is an improvement of top of a known heuristic, C^3. It tries to co-locate hot and frequently executed together functions in the resulting ordering. Unlike C^3, it explores a larger search space and have an objective closely tied to the performance of instruction and i-TLB caches. Hence, the name CDS = Cache-Directed Sort. The algorithm can be used at the linking or post-linking (e.g., BOLT) stage. Refer to https://reviews.llvm.org/D152834 for the actual implementation of the reordering algorithm. This diff adds a linker option to replace the existing C^3 heuristic with CDS. The new behavior can be turned on by passing "--use-cache-directed-sort". (the plan is to make it default in a next diff) **Perf-impact** clang-10 binary (built with LTO+AutoFDO/CSSPGO): wins on top of C^3 in [0.3%..0.8%] rocksDB-8 binary (built with LTO+CSSPGO): wins on top of C^3 in [0.8%..1.5%] Note that function layout affects the perf the most on older machines (with smaller instruction/iTLB caches) and when huge pages are not enabled. The impact on newer processors with huge pages enabled is likely neutral/minor. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D152840
-
Louis Dionne authored
This reduces the number of instantiations and also avoid blowing up past the fold-expression limit of Clang. This is NOT a general statement that we should strive to stay within Clang's (sometimes way too small) limits, however in this case the change will reduce the number of template instantiations while at the same time doing that, which is good. Differential Revision: https://reviews.llvm.org/D132509
-
Momchil Velikov authored
Don't increase/decrease immediate offsets in folded instructions beyond the limits of `LDP`.
-
Sam McCall authored
After 330fa7d2 we were seeing nondeterministic failures of llvm/test/CodeGen/ARM/thumb-big-stack.ll, with different code being generated in different runs. Switching sort -> stable_sort fixes this. It looks like the old algorithm picked the first best option, and using stable_sort restores that behavior.
-
Nikita Popov authored
-
Clement Courbet authored
This was ported over from phabricator. Review https://reviews.llvm.org/D153131.
-
Ingo Müller authored
This commit reapplies #66987, which got original contained a memory leak and got reverted by 78c8ab58. The leak is now fixed. Original description: This PR extends the error message of the tracking listener when replacement ops cannot be found. That may happen if the applied patterns replace an op by an op of a different kind or by block arguments. However, this only matters if there are alive handles to the replaced op. The new error message mentions that explicitly and reports the alive handles.
-
Mirko Brkusanin authored
-
Guray Ozen authored
MLIR has begun supporting many features of Nvidia's sm_90 architecture, and new tests have been added for it. Although the tests worked well, there were redundancies in the pipeline. This PR cleans up unnecessary passes.
-
Hans Wennborg authored
See discussion on https://github.com/llvm/llvm-project/pull/67084
-
agozillon authored
[Flang][Driver][OpenMP][Test] Modify one omp-driver-offload.f90 command to not incorrectly expect a single output (#67335) The test command which tests offloading to multiple device architectures expects multiple outputs, however, the test as written with the -o expects a single output result. This change modifies it to not expect a single output, which allows the command to succeed and allow the removal of the not prefix.
-
Nikita Popov authored
Some folds using m_NUW, m_NSW style matchers were missed, make sure they respect UseInstrInfo. This is part of #53218, but not a complete fix for the issue.
-
Nikita Popov authored
-
Nikita Popov authored
-
Yingwei Zheng authored
This patch canonicalizes `icmp eq/ne (A ^ Cst), B` to `icmp eq/ne (A ^ B), Cst` since the latter form exposes more optimizations. Proof: https://alive2.llvm.org/ce/z/9DbhGc Fixes #65968.
-
Phoebe Wang authored
-
Ivan Kosarev authored
Differential Revision: https://reviews.llvm.org/D156105
-
Muhammad Omair Javaid authored
This reverts commit fc86d031. This change breaks LLVM buildbot clang-aarch64-sve-vls-2stage https://lab.llvm.org/buildbot/#/builders/176/builds/5474 I am going to revert this patch as the bot has been failing for more than a day without a fix.
-
Martin Erhart authored
-
libenc authored
Fix the issue that only the server series Tremont processors (Snow Ridge & Elkhart Lake) can be detected as Tremont, while the client series (Jasper Lake & Lakefield) will be guessed as Goldmont. Noted that Lakefield is missing some features compare to other Tremont processors, but those features are also missing on `FeatureTremont`, which shouldn't be a problem. Those features are `waitpkg`, `movdiri` and `movdir64b`.
-
https://reviews.llvm.org/D159073esmeyi authored
The patch failed in test-suite due to a liveness error after rebasing on https://reviews.llvm.org/D133103, and now it's fixed. ``` [PowerPC][Peephole] Combine rldicl/rldicr and andi/andis after isel. Summary: rldicl/rldicr can be eliminated if it's used to clear thehigh-order or low-order n bits and all bits cleared will be ANDed with 0 byandi/andis. Or they can be folded to `andi 0` if all bits to AND are alreadyzero in the input. Reviewed By: qiucf, shchenz Differential Revision: https://reviews.llvm.org/D159073 ```
-
David Green authored
-
Mehdi Amini authored
[MLIR] Introduce new C bindings to differentiate between discardable and inherent attributes (#66332) This is part of the transition toward properly splitting the two groups. This only introduces new C APIs, the Python bindings are unaffected. No API is removed.
-
Mehdi Amini authored
Fixing the typo actually made it so that there were two entries for mlir:affine...
-