- May 04, 2023
-
-
wren romano authored
This helps catch some otherwise hard to track down segfaults. N.B., even though `getSparseTensorType` is not touched in this patch, it also gains the new error checking (via `getRankedTensorType`). Depends On D149805 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D149806
-
wren romano authored
(This will be used in future patches, but is split off for easier reviewing) Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D149805
-
Bolshakov authored
Several issues have been discovered and (hopefully) fixed here: - Reference NTTPs should be mangled in the same manner as pointer ones. - Pointer fields of class type NTTPs should be treated in the same manner as reference ones. - Pointer-to-member fields of class type NTTPs should be treated differently compared to pointer-to-member NTTPs. Tests on pointer-to-member-function NTTP class fields added. - Correct mangling of pointers to anonymous union members. - A bug in mangling references to subobjects fixed. - Mangling array subscripts and base class members in references to subobjects. Reference NTTP mangling was done back in 2013 in e8fdc06e, and Microsoft might change mangling algorithm since then. But class type NTTPs are introduced only in C++20, and the test was written in b637148e. It is strange if the MS ABI had been realy changed, because Microsoft claims that they maintain ABI stability since VS 2015. I've tested both on v142 and v143 MSVC toolsets, and they show the same behavior on the test cases which are changed in this PR. But pointer-to-member-function NTTP class field mangling has been actually changed, because it was erroneous in v142, leading to name collisions. Moreover, pointer-to-member mangling with conversions across class hierarchy has been enabled. Differential Revision: https://reviews.llvm.org/D146386
-
Daniel Paoliello authored
The S_LPROC32_ID and S_GPROC32_ID CodeView Debug Symbols have a flags field which LLVM has had the values for (in the ProcSymFlags enum) but has never actually set. These flags are used by Microsoft-internal tooling that leverages debug information to do binary analysis. Modified LLVM to set the correct flags: - ProcSymFlags::HasOptimizedDebugInfo - always set, as this indicates that debug info is present for optimized builds (if debug info is not emitted for optimized builds, then LLVM won't emit a debug symbol at all). - ProcSymFlags::IsNoReturn and ProcSymFlags::IsNoInline - set if the function has the NoReturn or NoInline attributes respectively. - ProcSymFlags::HasFP - set if the function requires a frame pointer (per TargetFrameLowering::hasFP). Differential Revision: https://reviews.llvm.org/D148761
-
Michael Maitland authored
Parsing instruments and analysis regions causes us to see the same labels two times since we parse the same file twice under the same context. This change creates a seperate context for instrument parsing and another for analysis region parsing. I will post a follow up commit once I get some free cycles to parse analysis regions and instruments in one parsing pass under a single context. Differential Revision: https://reviews.llvm.org/D149781
-
Shao-Ce SUN authored
This patch was split from D122918 . Co-Author: @liaolucy @realqhc Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D149665
-
Uday Bondhugula authored
The dependencies were set up improperly likely due to past code locations. MathTransforms shouldn't depend on VectorUtils which add a whole bunch of additional dependencies; it instead depends on the SCF dialect. Differential Revision: https://reviews.llvm.org/D149797
-
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
-