- May 04, 2023
-
-
max authored
Differential Revision: https://reviews.llvm.org/D149690
-
Jon Chesterfield authored
Removes the redundant Ack/Data bit manipulation. Represents the inbox/outbox state with one bit instead of two. This will be useful if we change to a packed representation and otherwise cuts the runtime state space from 16 to 4. Further simplification is possible, this patch is intentionally minimal. - can_{send,recv}_data are now in == out - {client,server}::try_open can be factored into Process:try_open This implements the state machine of D148191, modulo differences in atomic ordering and fences. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D149788 -
Thomas Lively authored
The wasm64 versions of the v128.storeX_lane instructions was incorrectly defined as returning a v128 value, which resulted in spurious drop instructions being emitted and causing validation to fail. This was not caught earlier because wasm64 has been experimental and not well tested. Update the relevant test file to test both wasm32 and wasm64. Fixes #62443. Differential Revision: https://reviews.llvm.org/D149780
-
Valentin Clement authored
Reduction clause on loop or compute constructs is not currently lowered but no TODO message was issued. Add a proper TODO so the user is informed. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D149789
-
Krzysztof Drewniak authored
This changes the test in GlobalISel, which makes it match the test elsewhere. Differential Revision: https://reviews.llvm.org/D149795
-
Felipe de Azevedo Piovezan authored
We use a map of Argument->AllocaInst when mapping Arguments to the AllocaInst created for them. Said map is declared from "Value" and called a "DbgPtrCache". This commit: * replaces Value to the more specialized Argument class, to reflect the intent better (i.e. we are _always_ mapping Arguments). * replaces the name "DbgPtrCache" with the more explicit "ArgToAllocaMap", as it is not clear reading the code what a "DbgPtr" is. Differential Revision: https://reviews.llvm.org/D149748
-
Nikolas Klauser authored
Reviewed By: ldionne, Mordante, #libc Spies: grandinj, libcxx-commits, arphaman Differential Revision: https://reviews.llvm.org/D148478
-
Jon Chesterfield authored
Prevent operation reordering with fence instead of a comment. The mailboxes are in shared memory and the locks structure in device memory. If the mailboxes are read and then the lock taken, the lock says nothing about the current or future state of those mail boxes. The relaxed atomic fetch_or can be reordered before the relaxed atomic loads of unrelated variables unless there is a fence preventing this. Patches both Client::try_open and Server::try_open, one of which is missing an optimisation and the other is missing the comment, but which otherwise could be Process::try_open followed by buffer->opcode = opcode in Client. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D149790
-
Slava Zakharin authored
Required after D148767 for flang+debug+slibs build. Reviewed By: chapuni, clementval Differential Revision: https://reviews.llvm.org/D149764
-
Krzysztof Drewniak authored
Add support for argument attributes on workgroup and private attributions for GPU functions. These arguments are outside the range of getNumArguments() and get printed separately, so the default mechanism for function argument attributes can't be used on them. Having done this, check for the `llvm.align` attribute on workgroup or private attributions in a `gpu.func` and pass it through to the relevant allocation op (creating a global or alloca). This allows people creating kernels that use multiple workgroup buffers to set an alignment. (This could, in the future, be a GPU dialect `alignment` attribute, but I've taken the simpler route of using the LLVM version instead for simplicity and because I don't know how this might impact backends like Vulkan) Reviewed By: nirvedhmeshram Differential Revision: https://reviews.llvm.org/D148965
-
Nikolas Klauser authored
Reviewed By: ldionne, #libc Spies: libcxx-commits, miyuki Differential Revision: https://reviews.llvm.org/D149599
-
Shubham Sandeep Rastogi authored
A DBG_VALUE or DBG_VALUE_LIST must always return a non-null DILocalVariable, the ARMLoadStoreOptimizer code that move’s DBG_VALUE and DBG_VALUE_LIST instructions if their corresponding loads have been moved, currently just continues if it finds a DBG_VALUE or DBG_VALUE_LIST with a null DILocalVariable, change that to an assert. Differential revision: https://reviews.llvm.org/D149762
-
Krzysztof Drewniak authored
Not all AMDGPU targets support all atomic operations. For example, there are not atomic floating-point adds on the gfx10 series. Add a pass to emulate these operations using a compare-and-swap loop, by analogy to the generic atomicrmw rewrite in MemrefToLLVM. This pass is named generally, as in the future we may have a memref-to-amdgpu that translates constructs like atomicrmw fmax (which doesn't generally exist in LLVM) to the relevant intrinsics, which may themselves require emulation. Since the AMDGPU dialect now has a pass that operates on it, the dialect's directory structure is reorganized to match other similarly complex dialects. The pass should be run before amdgpu-to-rocdl if desired. This commit also adds f64 support to atomic_fmax. Depends on D148722 Reviewed By: nirvedhmeshram Differential Revision: https://reviews.llvm.org/D148724
-
Krzysztof Drewniak authored
This commit adds the buffer cmpswap intrinsic to the ROCDL dialect and its corresponding AMDGPU dialect wrappers. Reviewed By: nirvedhmeshram Differential Revision: https://reviews.llvm.org/D148722
-
Teresa Johnson authored
This reverts commit bf6ff4fd. There is a bot failure where we are getting the correct remarks output but in a different order. I'll need to investigate to see where we are having nondeterministic behavior.
-
Alexander Shaposhnikov authored
This diff switches the approach to comparison of constraint expressions to the new one based on template args substitution. It continues the effort to fix our handling of out-of-line definitions of constrained templates. This is a recommit of e3b1083e. Differential revision: https://reviews.llvm.org/D146178
-
Florian Hahn authored
-
Ben Langmuir authored
This ensures we get the correct FileCharacteristic during scanning. In a yet-to-be-upstreamed branch this fixes observable failures, but it's also good to handle this on principle: the FileCharacteristic is a property of the file that is observable in the scanner, so there is nothing preventing us from depending on it. rdar://108627403 Differential Revision: https://reviews.llvm.org/D149777
-
Teresa Johnson authored
Applies cloning decisions to the IR, cloning functions and updating calls. For Regular LTO, the IR is updated directly during function assignment, whereas for ThinLTO it is recorded in the summary index (a subsequent patch will apply to the IR via the index during the ThinLTO backend. The function assignment and cloning proceeds greedily, and we create new clones as needed when we find an incompatible assignment of function clones to callsite clones (i.e. when different callers need to invoke different combinations of callsite clones). Depends on D140949. Differential Revision: https://reviews.llvm.org/D141077
-
ManuelJBrito authored
Simplifying poison mask elements yields poison values. Differential Revision: https://reviews.llvm.org/D149544
-
Arthur Eubanks authored
This is a cheap pass so there's no need to limit to -O3. This removes some differences between various pipelines. Code size regressions should be addressed with https://reviews.llvm.org/D149768. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D148269
-
Volodymyr Sapsai authored
In code we use `#include "llvm/Lib/Header.h"` which is located in "llvm/include/llvm/Lib/Header.h", so we use "llvm/include/" as a header search path. We should put modulemaps in the same directory and shouldn't rely on clang to search in immediate subdirectories. rdar://106677321 Differential Revision: https://reviews.llvm.org/D148776
-
Aaron Ballman authored
Yet another amendment to 9bb28a18, this addresses issues found in: https://lab.llvm.org/buildbot/#/builders/188/builds/29204
-
Vasileios Porpodas authored
This includes a couple of changes: 1. Moves the code that changes the root node out of the `TryToReduce` lambda and out of the traversal loop. 2. Since that code moved, there isn't much left in `TryToReduce` so the code was inlined. 3. The phi node variable `P` was also being used as a flag that turns on/off the exploration of operands as new seeds. This patch uses a new variable `TryOperandsAsNewSeeds` for this. 4. Simplifies the code executed when vectorization fails. The logic of the code should be identical to the original, but I may be missing something not caught by tests. Differential Revision: https://reviews.llvm.org/D149627
-
Aaron Ballman authored
-
Krzysztof Drewniak authored
Re-land D145441 with data layout upgrade code fixed to not break OpenMP. This reverts commit 3f2fbe92. Differential Revision: https://reviews.llvm.org/D149776
-
Alexey Bataev authored
Added basic implementation of ShuffleCostBuilder class in ShuffleCostEstimator and generalized BaseShuffleAnalysis::createShuffle function to support emission of Value */InstructionCost for the vectorization/cost estimation. Differential Revision: https://reviews.llvm.org/D149171
-
Aaron Ballman authored
This addresses the issue found in: https://lab.llvm.org/buildbot/#/builders/245/builds/7882 This time, the issue was that not every platform has the same alignment values, so those were removed from the test case.
-
Philip Reames authored
If the value count is > 1, we use a splat and thus only materialize the constant once, not once per element.
-
Aaron Ballman authored
This addresses the issue found by: https://lab.llvm.org/buildbot/#/builders/197/builds/4783 https://lab.llvm.org/buildbot/#/builders/188/builds/29201
-
Ben Langmuir authored
We are relying on deleting the working directory to trigger a later error in getcwd, but some platforms (e.g. Solaris) disallow deleting the working directory of the process. Skip the test in that case. Differential Revision: https://reviews.llvm.org/D149760
-
Ben Langmuir authored
We have no use for debug info for the scanner modules, and writing raw ast files speeds up scanning ~15% in some cases. Note that the compile commands produced by the scanner will still build the obj format (if requested), and the scanner can *read* obj format pcms, e.g. from a PCH. rdar://108807592 Differential Revision: https://reviews.llvm.org/D149693
-
Nick Desaulniers authored
No call sites interpreted this value meaningfully. Simplify this interface. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D149707
-
Florian Hahn authored
Factor out utility to simplify D147964 as sugested.
-
Aaron Ballman authored
We filed some CD ballot comments which WG14 considered during the ballot comment resolution meetings in Jan and Feb 2023, and this updates our implementation based on the decisions reached. Those decisions were (paraphrased for brevity): US 9-034 (REJECTED) allow (void *)nullptr to be a null pointer constant US 10-035 (ACCEPTED) accept the following code, as in C++: void func(nullptr_t); func(0); US 22-058 (REJECTED) accept the following code, as in C++: nullptr_t val; (void)(1 ? val : 0); (void)(1 ? nullptr : 0); US 23-062 (REJECTED) reject the following code, as in C++: nullptr_t val; bool b1 = val; bool b2 = nullptr; US 24-061 (ACCEPTED) accept the following code, as in C++: nullptr_t val; val = 0; US 21-068 (ACCEPTED) accept the following code, as in C++: (nullptr_t)nullptr; GB-071 (ACCEPTED) accept the following code, as in C++: nullptr_t val; (void)(val == nullptr); This patch updates the implementation as appropriate, but is primarily focused around US 10-035, US 24-061, and US 23-062 in terms of functional changes. Differential Revision: https://reviews.llvm.org/D148800
-
Kinuko Yasuda authored
Keeping this false could end up with extra iterations on a lot of loops that aren't real ones (e.g. they could be a do-while-false for macros), and makes the analyses very slow. This patch changes the default for CFG::BuildOptions.PruneTriviallyFalseEdges to true to avoid it. Reviewed By: ymandel, xazax.hun, gribozavr2 Differential Revision: https://reviews.llvm.org/D149640
-
Arthur Eubanks authored
Argument promotion mostly works on functions with more than one caller (otherwise the function would be inlined or is dead), so there's a good chance that performing this increases code size since we introduce loads at every call site. If any caller is marked minsize, bail. We could compare the number of loads/stores removed from the function with the number of loads introduced in callers, but that's TODO. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D149768
-
Matthew Voss authored
Internal testing showed that the change made in commit 62fcfc5a needed more test coverage. Specifically, the imported function shouldn't be externally visibile and the whole test needed to be run in regular LTO mode. Differential Revision: https://reviews.llvm.org/D148950
-
Michael Jones authored
Decimal long doubles are not commonly used, and aren't currently supported by the algorithm used for decimal float conversions. To avoid giving incorrect answers, this patch adds a temporary exception to print long doubles in hexadecimal even when decimal is requested. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D148179
-
Michael Jones authored
This patch adds the function "socket" from the header "sys/socket". It's a simple syscall wrapper, and I plan on adding the related functions in a followup patch. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149622
-