- Jul 20, 2020
-
-
Alok Kumar Sharma authored
Summary: This support is needed for the Fortran array variables with pointer/allocatable attribute. This support enables debugger to identify the status of variable whether that is currently allocated/associated. for pointer array (before allocation/association) without DW_AT_associated (gdb) pt ptr type = integer (140737345375288:140737354129776) (gdb) p ptr value requires 35017956 bytes, which is more than max-value-size with DW_AT_associated (gdb) pt ptr type = integer (:) (gdb) p ptr $1 = <not associated> for allocatable array (before allocation) without DW_AT_allocated (gdb) pt arr type = integer (140737345375288:140737354129776) (gdb) p arr value requires 35017956 bytes, which is more than max-value-size with DW_AT_allocated (gdb) pt arr type = integer, allocatable (:) (gdb) p arr $1 = <not allocated> Testing - unit test cases added - check-llvm - check-debuginfo Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D83544 -
Matt Arsenault authored
This allows tracking the in-memory type of a pointer argument to a function for ABI purposes. This is essentially a stripped down version of byval to remove some of the stack-copy implications in its definition. This includes the base IR changes, and some tests for places where it should be treated similarly to byval. Codegen support will be in a future patch. My original attempt at solving some of these problems was to repurpose byval with a different address space from the stack. However, it is technically permitted for the callee to introduce a write to the argument, although nothing does this in reality. There is also talk of removing and replacing the byval attribute, so a new attribute would need to take its place anyway. This is intended avoid some optimization issues with the current handling of aggregate arguments, as well as fixes inflexibilty in how frontends can specify the kernel ABI. The most honest representation of the amdgpu_kernel convention is to expose all kernel arguments as loads from constant memory. Today, these are raw, SSA Argument values and codegen is responsible for turning these into loads. Background: There currently isn't a satisfactory way to represent how arguments for the amdgpu_kernel calling convention are passed. In reality, arguments are passed in a single, flat, constant memory buffer implicitly passed to the function. It is also illegal to call this function in the IR, and this is only ever invoked by a driver of some kind. It does not make sense to have a stack passed parameter in this context as is implied by byval. It is never valid to write to the kernel arguments, as this would corrupt the inputs seen by other dispatches of the kernel. These argumets are also not in the same address space as the stack, so a copy is needed to an alloca. From a source C-like language, the kernel parameters are invisible. Semantically, a copy is always required from the constant argument memory to a mutable variable. The current clang calling convention lowering emits raw values, including aggregates into the function argument list, since using byval would not make sense. This has some unfortunate consequences for the optimizer. In the aggregate case, we end up with an aggregate store to alloca, which both SROA and instcombine turn into a store of each aggregate field. The optimizer never pieces this back together to see that this is really just a copy from constant memory, so we end up stuck with expensive stack usage. This also means the backend dictates the alignment of arguments, and arbitrarily picks the LLVM IR ABI type alignment. By allowing an explicit alignment, frontends can make better decisions. For example, there's real no advantage to an aligment higher than 4, so a frontend could choose to compact the argument layout. Similarly, there is a high penalty to using an alignment lower than 4, so a frontend could opt into more padding for small arguments. Another design consideration is when it is appropriate to expose the fact that these arguments are all really passed in adjacent memory. Currently we have a late IR optimization pass in codegen to rewrite the kernel argument values into explicit loads to enable vectorization. In most programs, unrelated argument loads can be merged together. However, exposing this property directly from the frontend has some disadvantages. We still need a way to track the original argument sizes and alignments to report to the driver. I find using some side-channel, metadata mechanism to track this unappealing. If the kernel arguments were exposed as a single buffer to begin with, alias analysis would be unaware that the padding bits betewen arguments are meaningless. Another family of problems is there are still some gaps in replacing all of the available parameter attributes with metadata equivalents once lowered to loads. The immediate plan is to start using this new attribute to handle all aggregate argumets for kernels. Long term, it makes sense to migrate all kernel arguments, including scalars, to be passed indirectly in the same manner. Additional context is in D79744.
-
Simon Pilgrim authored
Move the include down to files that actually depend on MCExpr definitions. Also exposes an implicit dependency on MCContext in AVRAsmBackend.h
-
Simon Pilgrim authored
This is defined in CodeGenTarget.h which we have to explicitly include already.
-
Simon Pilgrim authored
-
Petar Avramovic authored
Legalize using narrowScalar as s16->s32 G_FPEXT followed by s32->s64 G_FPEXT. Differential Revision: https://reviews.llvm.org/D84030
-
Matt Arsenault authored
-
Matt Arsenault authored
This handling didn't make any sense for vectors.
-
Matt Arsenault authored
This was missing an operand from BFE and not erasing the original instruction.
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Pavel Labath authored
The function was fairly complicated and didn't support new bigger integer sizes. Use llvm function for loading an APInt from memory to write a unified implementation for all sizes.
-
Pavel Labath authored
The sed line in the rules was adding the .d file as a target to the dependency rules -- to ensure the file gets rebuild when the sources change. The same thing can be achieved more elegantly with some -M flags.
-
Benjamin Kramer authored
-
Haojian Wu authored
some examples are working already. Differential Revision: https://reviews.llvm.org/D84146
-
Haojian Wu authored
Differential Revision: https://reviews.llvm.org/D84145
-
Haojian Wu authored
-
Benjamin Kramer authored
-
Haojian Wu authored
Adjust an existing diagnostic test, which is an improvement of secondary diagnostic. Differential Revision: https://reviews.llvm.org/D81163
-
Pavel Labath authored
Now that the main test results are reported through lit, and we only have one formatter class, this code is unnecessarily baroque.
-
Sam McCall authored
This prevents selection of empty preprocessor entities (like #define directives, or text in disabled sections) creating a selection in the parent element. Summary: Based on D83508 by Aleksandr Platonov. Reviewers: ArcsinX, kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D84012
-
Sam McCall authored
Summary: This allows efficiently accessing all expansions (without iterating over each token and searching), and also identifying tokens within a range that are affected by the preprocessor (which is how clangd will use it). Subscribers: ilya-biryukov, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D84009
-
Simon Pilgrim authored
Move necessary include down to SubtargetFeatureInfo.cpp.
-
Muhammad Omair Javaid authored
This reverts commit 7e017de0.
-
Frederik Gossen authored
Fold `shape.shape_eq`. Differential Revision: https://reviews.llvm.org/D82533
-
Nicolas Vasilache authored
This revision improves and makes better use of OpInterfaces for the Vector dialect. Differential Revision: https://reviews.llvm.org/D84053
-
Muhammad Omair Javaid authored
Summary: This patch adds support for AArch64 SVE register infos description and core file register access. AArch64 SVE is a an optional extension of Arm v8.3-a architecture. It has introduced 32 new vector registers Z, 16 predicate P registers and FFR predicate register. These registers have fixed names but can dynamically be configured to different size based on underlying OS configuration. This patch adds register info struct that describes SVE register infos and also provides RegisterContextPOSIXCore_arm64 routines to access SVE registers. This patch also introduces a mechanism to configure SVE register sizes and offsets at startup before exchanging register information across gdb-remote. TestLinuxCore.py has been updated to include testing of SVE core files. Reviewers: labath, clayborg, jankratochvil, jasonmolenda, rengolin Reviewed By: labath Subscribers: tschuett, kristof.beyls, danielkiss, lldb-commits Differential Revision: https://reviews.llvm.org/D77047
-
Alex Zinenko authored
Linkage support is already present in the LLVM dialect, and is being translated for globals other than functions. Translation support has been missing for functions because their conversion goes through a different code path than other globals. Differential Revision: https://reviews.llvm.org/D84149
-
Paul Walker authored
Differential Revision: https://reviews.llvm.org/D84034
-
Joachim Protze authored
-
Haojian Wu authored
Differential Revision: https://reviews.llvm.org/D81090
-
Paul Walker authored
No real action is taken for a value of scalable but it provides a route to disable an earlier specification and is effectively its default value when omitted. Patch also removes an "unused variable" warning. Differential Revision: https://reviews.llvm.org/D84021
-
George Mitenkov authored
This patch adds documentation for SPIR-V to LLVM conversion. It describes the approaches taken and what is currently supported by this conversion framework. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D83322
-
James Henderson authored
The test wasn't updated due to being an unusual target not included in my test run.
-
Florian Hahn authored
This patch adds a new variant of the matrix lowering pass that only does a minimal lowering and only depends on TTI. The main purpose of this pass is to have a pass with minimal dependencies to run as part of the backend pipeline. At the moment, the only difference to the regular lowering pass is that it does not support remarks. But in subsequent patches add support for tiling to the lowering pass which will require more analysis, which we do not want to run in the backend, as the lowering should happen in the middle-end in practice and running it in the backend is mostly for convenience when running llc. Reviewers: anemet, Gerolf, efriedma, hfinkel Reviewed By: anemet Differential Revision: https://reviews.llvm.org/D76867
-
Hans Wennborg authored
-
Muhammad Omair Javaid authored
Summary: SVE elf note data requires SVE PT macros for reading writing data. Same macros are used by Linux ptrace SVE register access. This patch makes necessary changes to lldb/source/Plugins/Process/Linux/LinuxPTraceDefines_arm64sve.h in order to make them sysroot independent. Reviewers: labath, rengolin Reviewed By: labath Subscribers: tschuett, lldb-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D83541
-
Muhammad Omair Javaid authored
Summary: This patch removes dependence of RegisterContextPOSIX_arm64 on register number enums defined in lldb-arm64-register-enums.h. RegisterContextPOSIX_arm64 makes use of helper functions to access register numbers defined in RegisterInfos_arm64.h via RegisterInfosPOSIX_arm64. Reviewers: labath Reviewed By: labath Subscribers: emaste, kristof.beyls, arphaman, danielkiss, lldb-commits Differential Revision: https://reviews.llvm.org/D83753
-
Balázs Kéri authored
Summary: Report resource leaks with non-fatal error. Report every resource leak. Stream state is cleaned up at `checkDeadSymbols`. Reviewers: Szelethus, baloghadamsoftware, NoQ Reviewed By: Szelethus Subscribers: rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82845
-
Elvina Yakubova authored
This patch changes llvm-readelf (and llvm-readobj for consistency) behavior to print an error when executed with no input files. Reading from stdin can be achieved via a '-' for the input object. Fixes https://bugs.llvm.org/show_bug.cgi?id=46400 Differential Revision: https://reviews.llvm.org/D83704 Reviewed by: jhenderson, MaskRay, sbc, jyknight
-