- Oct 28, 2022
-
-
Kristof Beyls authored
-
Xing Xue authored
Summary: The existing implementation of the personality for legacy IBM xlclang++ compiler generated code passes the address of exception object in r14 for the landing pad to retrieve with a call to __xlc_exception_handle(). This clobbers the content of r14 in user code (and potentially, when running cleanup actions, the address of another exception object being passed). This patch changes to use the stack slot reserved for compilers to pass the address. It has been confirmed that xlclang++-generated code does not use this slot. Reviewed by: hubert.reinterpretcast, cebowleratibm
-
Jeff Niu authored
This patch adds a version of `parseSymbolName` and `parseOptionalSymbolName` to AsmParser that don't take an attribute name and attribute list. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D136696
-
Valentin Clement authored
In order to be passed as passed-object in the dynamic dispatch, the polymorphic pointer entity are emboxed. In this process, the dynamic type must be preserve and pass to fir.embox as the tdesc operand. This patch introduce a new ExtendedValue that allow to carry over the dynamic type when the value is unboxed. Depends on D136820 Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D136824
-
Valentin Clement authored
Lowering of allocate statement for polymoprhic pointers is a bit different than for allocatables. A call to `PointerNullifyDerived` runtime function is done instead of `AllocatableInitDerived`. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D136820
-
Lei Zhang authored
The UnifyAliasedResourcePass is actually only necessary for targeting Apple GPUs via MoltenVK, where we need to translate SPIR-V into MSL. The translation has limitations--no support of aliased resources. So introducing a control to disable this pass if targeting other platforms. Reviewed By: kuhar Differential Revision: https://reviews.llvm.org/D136869
-
Alexey Bataev authored
Should improve compile time for analysis and vectorization. Metric: SLP.NumVectorInstructions Program SLP.NumVectorInstructions test-suite :: External/SPEC/CINT2017speed/623.xalancbmk_s/623.xalancbmk_s.test 6380.00 6378.00 -0.0% test-suite :: External/SPEC/CINT2017rate/523.xalancbmk_r/523.xalancbmk_r.test 6380.00 6378.00 -0.0% test-suite :: External/SPEC/CINT2006/483.xalancbmk/483.xalancbmk.test 2023.00 2022.00 -0.0% test-suite :: External/SPEC/CINT2006/471.omnetpp/471.omnetpp.test 148.00 146.00 -1.4% Generated more vector instructions. Differential Revision: https://reviews.llvm.org/D127531
-
David Sherwood authored
-
David Sherwood authored
This patch adds the assembly/disassembly for the following instructions: pext (predicate) : Set predicate from predicate-as-counter ptrue (predicate-as-counter) : Initialise predicate-as-counter to all active This patch also introduces the predicate-as-counter registers pn8, etc. The reference can be found here: https://developer.arm.com/documentation/ddi0602/2022-09 Differential Revision: https://reviews.llvm.org/D136678
-
Aart Bik authored
This prepare a subsequent revision that will generalize the insertion code generation. Similar to the support lib, insertions become much easier to perform with some "cursor" bookkeeping. Note that we, in the long run, could perhaps avoid storing the "cursor" permanently and use some retricted-scope solution (alloca?) instead. However, that puts harder restrictions on insertion-chain operations, so for now we follow the more straightforward approach. Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D136800
-
Kevin Sala authored
This patch adds a new infrastructure for OpenMP target plugins. It also implements the CUDA and GenericELF64bit plugins under this new infrastructure. We place the sources in a separate directory named plugins-nextgen, and we build the new plugins as different plugin libraries. The original plugins, which remain untouched, will be used by default. However, the user can change this behavior at run-time through the boolean envar LIBOMPTARGET_NEXTGEN_PLUGINS. If enabled, the libomptarget will try to load the NextGen version of each plugin, falling back to the original if they are not present or valid. The idea of this new plugin infrastructure is to implement the common parts of target plugins in generic classes (defined in files inside plugins-next/common/PluginInterface folder), and then, each specific plugin defines its own specific classes inheriting from the common ones. In this way, most logic remains on the common interface while reducing the plugin-specific source code. It is also beneficial in the sense that now most code and behavior are the same across the different plugins. As an example, we define classes for a plugin, a device, a device image, a stream manager, etc. The plugin object (a single instance per plugin library) holds different device objects (i.e., one per available device), while these latter are the responsible for managing its own resources. Most code on this patch is based on the changes made by @jdoerfert (Johannes Doerfert) Reviewed By: jhuber6, jdoerfert Differential Revision: https://reviews.llvm.org/D134396
-
Bill Wendling authored
The -fstrict-flex-arrays=3 is the most restrictive type of flex arrays. No number, including 0, is allowed in the FAM. In the cases where a "0" is used, the resulting size is the same as if a zero-sized object were substituted. This is needed for proper _FORTIFY_SOURCE coverage in the Linux kernel, among other reasons. So while the only reason for specifying a zero-length array at the end of a structure is for specify a FAM, treating it as such will cause _FORTIFY_SOURCE not to work correctly; __builtin_object_size will report -1 instead of 0 for a destination buffer size to keep any kernel internals from using the deprecated members as fake FAMs. For example: struct broken { int foo; int fake_fam[0]; struct something oops; }; There have been bugs where the above struct was created because "oops" was added after "fake_fam" by someone not realizing. Under __FORTIFY_SOURCE, doing: memcpy(p->fake_fam, src, len); raises no warnings when __builtin_object_size(p->fake_fam, 1) returns -1 and may stomp on "oops." Omitting a warning when using the (invalid) zero-length array is how GCC treats -fstrict-flex-arrays=3. A warning in that situation is likely an irritant, because requesting this option level is explicitly requesting this behavior. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 Differential Revision: https://reviews.llvm.org/D134902 -
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D136866
-
Craig Topper authored
-
rkayaith authored
This adds a new function for creating pass managers that takes an argument for the anchor string. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D136404
-
Chris Bieneman authored
DXContainer files contain a part that has an MD5 of the generated shader. This adds support to the ObjectYAML tooling to expand the hash part data and hash iteself in preparation for adding hashing support to DirectX code generation. Reviewed By: python3kgae Differential Revision: https://reviews.llvm.org/D136632
-
Michael Jones authored
This adds the fgets function and its unit tests. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D136785
-
eopXD authored
The LSR may suggest less profitable transformation to the loop. This patch adds check to prevent LSR from generating worse code than what we already have. Since LSR affects nearly all targets, the patch is guarded by the option 'lsr-drop-solution' and default as disable for now. The next step should be extending an TTI interface to allow target(s) to enable this enhancememnt. Debug log is added to remind user of such choice to skip the LSR solution. Reviewed By: Meinersbur, #loopoptwg Differential Revision: https://reviews.llvm.org/D126043
-
rkayaith authored
Currently any errors during pipeline parsing are reported to stderr. This adds a new pipeline parsing function to the C api that reports errors through a callback, and updates the python bindings to use it. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D136402
-
Fangrui Song authored
readelf --section-details displays ch_type/ch_size/ch_addralign for a SHF_COMPRESSED section. Port the feature. There is a small difference that readelf doesn't display `[<corrupt>]` for an empty section while we do. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D136636
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D136852
-
-
Craig Topper authored
Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D136478
-
Dave Lee authored
-
- Oct 27, 2022
-
-
Kito Cheng authored
It splited into several zb* extensions, and `b` is dropped after 0.93, so it time to retired that as other non-ratified zb* extensions. Currntly clang can accept that with warning: $ clang -target riscv64-elf ~/hello.c -S -march=rv64gcb '+b' is not a recognized feature for this target (ignoring feature) '+b' is not a recognized feature for this target (ignoring feature) '+b' is not a recognized feature for this target (ignoring feature) Reviewed By: asb, luismarques Differential Revision: https://reviews.llvm.org/D136812
-
Dave Lee authored
-
Alexandros Lamprineas authored
When calculating the specialization bonus for a given function argument, we recursively traverse the chain of (certain) users, accumulating the instruction costs. Then we exponentially increase the bonus to account for loop nests. This is problematic for two reasons: (a) the users might not themselves be inside the loop nest, (b) if they are we are accounting for it multiple times. Instead we should be adjusting the bonus before traversing the user chain. This reduces the instruction count for CTMark (newPM-O3) when Function Specialization is enabled without actually reducing the amount of specializations performed (geomean: -0.001% non-LTO, -0.406% LTO). Differential Revision: https://reviews.llvm.org/D136692
-
Sanjay Patel authored
This is copying the code that was added for 'add' with D130075. (That patch removed a fallthrough in the cases, but we can probably still share at least some code again as a follow-up cleanup, but I didn't want to risk it here.) The reasoning is similar to the carry propagation for 'add': if we don't demand low bits of the subtraction and the subtrahend (aka RHS or operand 1) is known zero in those low bits, then there can't be any borrowing required from the higher bits of operand 0, so the low bits don't matter. Also, the no-wrap flags can be propagated (and I think that should be true for add too). Here's an attempt to prove that in Alive2: https://alive2.llvm.org/ce/z/xqh7Pa (can add nsw or nuw to src and tgt, and it should still pass) Differential Revision: https://reviews.llvm.org/D136788
-
Liming Liu authored
template-template parameters. Although it effects whether a template can be used as an argument for another template, the constraint seems not to be checked, nor other major implementations (GCC, MSVC, et al.) check it. Additionally, Part-A of the document seems to have been implemented. So mark P0857R0 as completed. Differential Revision: https://reviews.llvm.org/D134128
-
gonglingqin authored
Differential Revision: https://reviews.llvm.org/D135948
-
John Brawn authored
Currently MachineCSE forbids PRE when the instruction reads a physical register. Relax this so that it's allowed when the value being read is the same as what would be read in the place the instruction would be hoisted to. This is being done in preparation for adding FPCR handling to the AArch64 backend, in order to prevent it to from worsening the generated code, but for targets that already have a similar register it should improve things. This patch affects code generation in several tests. The new code looks better except for in Thumb2/LowOverheadLoops/memcall.ll where we perform PRE but the LowOverheadLoops transformation then undoes it. Also in AMDGPU/selectcc-opt.ll the CHECK makes things look worse, but actually the function as a whole is better (as a MOV is PRE'd). Differential Revision: https://reviews.llvm.org/D136675
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Nico Weber authored
-
Michał Górny authored
This reverts commit 88d7508d. It's reported to break builds when symlinking other projects inside the `tools` directory.
-
Jakob Johnson authored
Update the Python tests (ie tests run via `lldb-dotest -p TestTrace`) to handle new error introduced in D136610. Test Plan: `lldb-dotest -p TestTrace` Differential Revision: https://reviews.llvm.org/D136801
-
Carlos Alberto Enciso authored
The fix for the unitest case introduced a dependency on the MC library causing a failure in: https://lab.llvm.org/buildbot/#/builders/121/builds/24567 clang-ppc64le-multistage/stage1 undefined reference to symbol 'llvm::TargetRegistry::lookupTarget' Added: - MC to the LLVM_LINK_COMPONENTS list. Reviewed By: jryans Differential Revision: https://reviews.llvm.org/D136837
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D136836
-
Momchil Velikov authored
[fixed test to work with reverse iteration] The `FunctionSpecialization` pass has support for specialising functions, which are called with literal arguments. This functionality is disabled by default and is enabled with the option `-function-specialization-for-literal-constant` . There are a few issues with the implementation, though: * even with the default, the pass will still specialise based on floating-point literals * even when it's enabled, the pass will specialise only for the `i1` type (or `i2` if all of the possible 4 values occur, or `i3` if all of the possible 8 values occur, etc) The reason for this is incorrect check of the lattice value of the function formal parameter. The lattice value is `overdefined` when the constant range of the possible arguments is the full set, and this is the reason for the specialisation to trigger. However, if the set of the possible arguments is not the full set, that must not prevent the specialisation. This patch changes the pass to NOT consider a formal parameter when specialising a function if the lattice value for that parameter is: * unknown or undef * a constant * a constant range with a single element on the basis that specialisation is pointless for those cases. Is also changes the criteria for picking up an actual argument to specialise if the argument is: * a LLVM IR constant * has `constant` lattice value has `constantrange` lattice value with a single element. Reviewed By: ChuanqiXu Differential Revision: https://reviews.llvm.org/D135893 Change-Id: Iea273423176082ec51339aa66a5fe9fea83557ee -
Michał Górny authored
Move `cmake_policy()` settings from `llvm/CMakeLists.txt` into a shared `cmake/modules/CMakePolicy.cmake`. Include it from all relevant projects that support standalone builds, in order to ensure that the policies are consistently set whether they are built in-tree or stand-alone. Differential Revision: https://reviews.llvm.org/D136572
-