- Dec 20, 2022
-
-
Kadir Cetinkaya authored
Fixes https://github.com/llvm/llvm-project/issues/59541. Differential Revision: https://reviews.llvm.org/D140380
-
Piyou Chen authored
RVV intrinsic function has several policy variants. Include TU, TA, TAMU, TAMA, TUMU, TUMA, MU, MA, TUM, TAM Currently, the clang side enumerates these policies, but it's hard to add a new policy. This patch use structure to replace the origin policy enumeration, and enhance some policy transform logic. This is a clean-up job that will not affect the RVV intrinsic functionality and make sure riscv_vector_builtin_cg.inc is the same as the original one. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D139995
-
Qiu Chaofan authored
-
Nikita Popov authored
During scalar promotion, if there are additional potentially-aliasing loads outside the promoted set, we can still perform a load-only promotion. As the stores are retained, any potentially-aliasing loads will still read the correct value. This increases the number of load promotions in llvm-test-suite by a factor of two: | Old | New licm.NumPromotionCandidates | 4448 | 6038 licm.NumLoadPromoted | 479 | 1069 licm.NumLoadStorePromoted | 1459 | 1459 Unfortunately, this does have some impact on compile-time: http://llvm-compile-time-tracker.com/compare.php?from=57f7f0d6cf0706a88e1ecb74f3d3e8891cceabfa&to=72b811738148aab399966a0435f13b695da1c1c8&stat=instructions In part this is because we now have less early bailouts from promotion, but also due to second order effects (e.g. for one case I looked at we spend more time in SLP now). Differential Revision: https://reviews.llvm.org/D133192 -
Muhammad Omair Javaid authored
This patch fixes a typo in test/CodeGen/c-strings.c. Test was failing on AArch64/Windows.
-
Haojian Wu authored
-
Ramkumar Ramachandra authored
This is part of an effort to migrate from llvm::Optional to std::optional. 22426110 changed the way mlir-tblgen generates .inc files, emitting std::optional when an Optional attribute is specified in a .td file. It also changed several .td files hard-coding llvm::Optional to use std::optional. However, the patch excluded a few .td files in SPIRV and Bufferization hard-coding llvm::Optional. This patch fixes that defect, and after this patch, references to llvm::Optional in .cpp and .h files can be replaced mechanically. See also: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 Signed-off-by:
Ramkumar Ramachandra <r@artagnon.com> Differential Revision: https://reviews.llvm.org/D140329
-
Jean Perier authored
Hlfir.designate was made to support substrings but so far substrings were not yet lowered to it. Implement support for them. Differential Revision: https://reviews.llvm.org/D140310
-
Carl Ritson authored
Accelerate finding the base class for a physical register by building a statically mapping table from physical registers to base classes using TableGen. Replace uses of SIRegisterInfo::getPhysRegClass with TargetRegisterInfo::getPhysRegBaseClass in order to use the computed table. Reviewed By: arsenm, foad Differential Revision: https://reviews.llvm.org/D139422
-
Carl Ritson authored
Allow targets to define a mapping from registers to register classes such that each register has exactly one base class. As registers may be in multiple register classes the base class is determined by the container class with the lowest BaseClassOrder. Only register classes with BaseClassOrder set are considered when determining the base classes. By default BaseClassOrder is unset in RegisterClass so no code is generated unless a target explicit defines one or more base register classes. Reviewed By: arsenm, foad Differential Revision: https://reviews.llvm.org/D139616
-
Sameer Sahasrabuddhe authored
This fixes the buildbot failure on reverse iteration: https://lab.llvm.org/buildbot/#/builders/54/builds/3034
-
Craig Topper authored
It's much more common to use a register class rather than a type. Add an additional i64 cast to the patterns where needed to avoid increasing isel table size.
-
Craig Topper authored
Missed this in the review of D139394. Not a functional issue because select only makes it to isel with XVentanaCondOps.
-
Craig Topper authored
-
Craig Topper authored
Removes some extra andi instructions.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
With this patch we: - pick more sensible defaults for the number of teams, inspired by the old plugin, and configured via LIBOMPTARGET_AMDGPU_TEAMS_PER_CU. - check the input signal of a kernel launch late, after the queue lock was taken, to avoid a barrier packet more often. - copy the kernel arguments in one swoop into the appropriate memory. - manually specialize the callbacks to avoid potential indirect calls.
-
Luke Nicholson authored
21U is the default group size, which demonstrates ~15mb reduction in heap size for some highly fragmented heaps on Fuchsia, and a general 5mb savings when devices are under no load. Microbenchmarks show no performance regressions, but most of our benchmarks perform no significant mallocs. So we are choosing the default setting, and monitoring for potential performance issues. Reviewed By: Chia-hungDuan Differential Revision: https://reviews.llvm.org/D140311
-
Johannes Doerfert authored
This reverts commit 3b052558. This patch got reverted due to an unrelated memory leak that has been fixed.
-
Matt Arsenault authored
Stop trying to delete a select in one combine since it would be deleting the CSE'd instruction if that happened.
-
LLVM GN Syncbot authored
-
Sameer Sahasrabuddhe authored
Uniformity analysis is a generalization of divergence analysis to include irreducible control flow: 1. The proposed spec presents a notion of "maximal convergence" that captures the existing convention of converging threads at the headers of natual loops. 2. Maximal convergence is then extended to irreducible cycles. The identity of irreducible cycles is determined by the choices made in a depth-first traversal of the control flow graph. Uniformity analysis uses criteria that depend only on closed paths and not cycles, to determine maximal convergence. This makes it a conservative analysis that is independent of the effect of DFS on CycleInfo. 3. The analysis is implemented as a template that can be instantiated for both LLVM IR and Machine IR. Validation: - passes existing tests for divergence analysis - passes new tests with irreducible control flow - passes equivalent tests in MIR and GMIR Based on concepts originally outlined by Nicolai Haehnle <nicolai.haehnle@amd.com> With contributions from Ruiling Song <ruiling.song@amd.com> and Jay Foad <jay.foad@amd.com>. Support for GMIR and lit tests for GMIR/MIR added by Yashwant Singh <yashwant.singh@amd.com>. Differential Revision: https://reviews.llvm.org/D130746 -
Hanhan Wang authored
The pattern generalizes a tensor::UnPackOp into a sequence of tensor + Linalg ops, when the outer dims are all 1s. It uses the trick of rank-reduced tensor.extract_slice to get the tile; transpose the tile; extract sub tile for incomplete cases if needed; use tensor.insert_slice to insert it to the destination tensor. Reviewed By: tyb0807, chelini Differential Revision: https://reviews.llvm.org/D140254
-
Chen Zheng authored
-
Chen Zheng authored
If the candidate loop already has hardware loop related intrinsics, don't generate hardware loop on PPC. PPC does not support nested hardware loops.
-
Chen Zheng authored
-
Johannes Doerfert authored
-
Siva Chandra Reddy authored
One should be able to do a cross build of the libc now. For example, using clang on a x86_64 linux host, one can build for an aarch64 linux target by specifying -DLIBC_TARGET_TRIPLE=aarch64-linux-gnu. Follow up changes will add a baremetal config and also appropriate documentation about cross compiling the libc for CPU targets. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D140351
-
Ye Luo authored
Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D140352
-
LLVM GN Syncbot authored
-
Benjamin Kramer authored
This avoids the continuous API churn when upgrading things to use std::optional and makes trivial string replace upgrades possible. I tested this with GCC 7.5, the oldest supported GCC I had around. Differential Revision: https://reviews.llvm.org/D140332
-
Florian Mayer authored
-
Benjamin Kramer authored
The needed tweaks are mostly trivial, the one nasty bit is Clang's usage of OptionalStorage. To keep this working old Optional stays around as clang::CustomizableOptional, with the default Storage removed. Optional<File/DirectoryEntryRef> is replaced with a typedef. I tested this with GCC 7.5, the oldest supported GCC I had around. Differential Revision: https://reviews.llvm.org/D140332
-
Florian Mayer authored
as the bits are all distinct, these two operations have the same result, but the bitwise operation is more explicit about what's happening. Reviewed By: hctim Differential Revision: https://reviews.llvm.org/D140346
-
Philip Reames authored
We have a version of this transform in InstCombine, but surprisingly not in SDAG. Even more surprisingly, this benefits RISCV, but no other target. This was surprising enough I double checked my build configuration to make sure all targets were enabled; they appear to be. Differential Revision: https://reviews.llvm.org/D140324
-
Lang Hames authored
In some cases it's helpful to group trackers by JITDylib. E.g. Platform classes may want to track initializer symbols with a `JITDylib -> Tracker -> [ Symbol ]` map. This makes it easy to collect all symbols for the JITDylib, while still allowing efficient removal of a single tracker. Passing the JITDylib as an argument to ResourceManager::notifyRemovingResources and ResourceManager::notifyTransferringResources supports such use-cases.
-
Lang Hames authored
This method behaves the same as MaterializationResponsibility::withResourceKeyDo (which now forwards to the new method): It locks the session while providing access to the ResourceKey associated with the tracker. Adding this method to ResourceTracker allows resources to be allocated and tracked for a given MaterializationUnit prior to that MaterializationUnit being materialized. E.g. Platforms can now track and remove initializers and other symbols.
-
Johannes Doerfert authored
Differential Revision: https://reviews.llvm.org/D140335
-
Johannes Doerfert authored
Differential Revision: https://reviews.llvm.org/D140334
-