- Jan 03, 2023
-
-
Mehdi Amini authored
-
Haojian Wu authored
-
Campbell Suter authored
GC strategies are registered using a system of global constructors: any object can include a GCRegistry::Add stataic variable to register a strategy, and that will generate a static constructor which registers this strategy into a global list. This allows shared libraries to easily register their own strategies, but poses a problem related to linking: the default GC strategies (defined and registered in their own file) must obviously be included in LLVM binaries. The previous solution was to define an empty functon in BuiltinGCs.cpp, and call it from LinkAllCodegenComponents.h - this is the solution used for many other codegen components. This header is then included into the llc and lli main source files, ensuring everything gets linked into those binaries. This isn't great for GCStrategy, which we'd like [1] to use in other binaries, notably opt for the RS4GC [2] pass. Instead of doing something specific to opt (for example, adding a call in LinkAllIR), this patch links to the registry function from getGCStrategy, in the assumption that anything that might look up a GC strategy probably also expects the default strategies to exist. [1] https://reviews.llvm.org/D140458 [2] RewriteStatepointsForGC Differential Revision: https://reviews.llvm.org/D140504
-
Johannes Reifferscheid authored
There's currently no way to get accurate cube roots in the math dialect. powf(x, 1/3.0) is too inaccurate in some cases. Reviewed By: akuegel Differential Revision: https://reviews.llvm.org/D140842
-
Chuanqi Xu authored
[C++20] [Modules] Emit full specialization of variable template as available externally in importers Closes https://github.com/llvm/llvm-project/issues/59780. In this issue report, when we use full specialization of variable templates in modules, we will meet the multiple definition errors. The root cause of the problem is that when we see the full specialization of the variable template in the importers, we will find if it is already defined in the external sources and we failed to find such definitions from external sources. So we generate the definition in the current TU. We failed to find the definition in the external sources because we restricted to not write it during writing. However, we don't know why we restricted it and it doesn't make a lot sense to do such restriction. Then no test fails after we remove such limitations. So let's remove it now and add it back later if we found it is necessary then we can add the corresponding test that time. Note that the code is only applied to named modules and PCHWithObjectFiles. So it won't affect the normal clang modules and header units.
-
LLVM GN Syncbot authored
-
wangpc authored
So that there is no cyclic dependency if we want to use it in tablegen. Reviewed By: fpetrogalli Differential Revision: https://reviews.llvm.org/D140529
-
Chuanqi Xu authored
Closes https://github.com/llvm/llvm-project/issues/54457. This removes a FIXME we found previously. But we didn't remove the FIXME that time due to the lack of the corresponding test. And now we found the corresponding test so we can remove it.
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
jacquesguan authored
-
jacquesguan authored
This patch uses vfirst.m to extract the first bit of mask. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D139512
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Owen Pan authored
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Owen Pan authored
-
eopXD authored
No functionality change of the RVV builtin and compiler intrinsics is intended in this patch. This patch gathers scattered comments for the segment load builtin/intrinsics and its variants (e.g. segment unit-stride load, segment strided load) into a single paragraph under riscv_vector.td. This patch also tries to reduce one level of the if-statements as the push_back are essentially the same actions but differs in index based on the the value of the policy attributes and whether the intrinsic is masked. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D140662
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Lang Hames authored
Renamed to emphasize intent: this method allows the module to be consumed by the callback (while protected by the context lock), but we don't want to imply that the Module could be taken out of the ThreadSafeModule (where it would no longer be protected by that lock).
-
Lang Hames authored
ThreadSafeModule::takingModuleDo passes ownership of the contained llvm::Module into the callback, allowing ThreadSafeModules to be used with consuming operations like Linker::link.
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Haojian Wu authored
-
Dmitri Gribenko authored
-
Krzysztof Drewniak authored
1. When converting from the GPU dialect to the ROCDL dialect, if the function that contains a gpu.thread_id or gpu.block_id op is annotated with gpu.known_{block,grid}_size, use that size to set a "range" attribute on the corresponding rocdl intrinsic so that the LLVM frontend can optimize based on that range information. 1b. When translating from the rocdl dialect to LLVM IR, use the "range" attribute, if present, to set !range metadata on the relevant function call. 2. Deprecate the old rocdl.max_flat_work_group_size attribute, which was used in a tensorflow backend. Instead, use rocdl.flat_work_group_size going forward to allow kernel generators to specify the minimum and maximum work group sizes a kernel may be launched with in one attribute, thus more closely matching the backend. 3. When translating from gpu.func to llvm.func within gpu-to-rocdl, copy the known_block_size attribute as rocdl.reqd_work_group_size to enable further translations to set the corresponding metadata on the LLVM IR function. Also, set the rocdl.flat_work_group_size attribute to ensure that the reqd_work_group_size metadata and the amdgpu-flat-work-group-size metadata are consistent. 3b. Extend the ROCDL to LLVM IR translation to set the !reqd_work_group_size metadata on LLVM functions Also update tests and add functions to the ROCDL dialect to ensure attribute names are used consistently. Depends on D139865 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D139866 -
Peter Rong authored
Signed-off-by:Peter Rong <PeterRong96@gmail.com>
-
Sanjay Patel authored
~sext(A) & Op1 --> A ? 0 : Op1 With no extra uses, this pattern is already reduced, but we would miss it in examples such as issue #59773. https://alive2.llvm.org/ce/z/WGLcSR
-
Sanjay Patel authored
-
Sanjay Patel authored
-
Roman Lebedev authored
https://alive2.llvm.org/ce/z/vPs-gZ This is a larger pattern than would seem necessary, with minimal being: * `and` https://alive2.llvm.org/ce/z/q9-MqK * `or` https://alive2.llvm.org/ce/z/AUUEMZ * `xor` https://alive2.llvm.org/ce/z/dm3Ume .. so for all others, we canonicalize away from math to `select`, but there we canonicalize in the opposite direction. Fixes https://github.com/llvm/llvm-project/issues/59791
-
-
Florian Hahn authored
Replace VPWidenCanonicalIVRecipe::classof implementation with general VP_CLASSOF_IMPL.
-
Florian Hahn authored
Replace VPWidenMemoryInstructionRecipe ::classof implementation with general VP_CLASSOF_IMPL.
-
Florian Hahn authored
Replace VPPredInstPHI::classof implementation with general VP_CLASSOF_IMPL.
-
Krzysztof Drewniak authored
This should fix the MSVC warning that caused the previous revert. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D140766
-
Nikita Popov authored
-
- Jan 02, 2023
-
-
Nikita Popov authored
Use a non-zero GEP index, so it does not get dropped during opaque pointer conversion.
-
Nikita Popov authored
-
Nikita Popov authored
-