- Aug 05, 2020
-
-
Joel E. Denny authored
-
Joel E. Denny authored
-
Joel E. Denny authored
Without this patch, the following example fails but shouldn't according to OpenMP TR8: ``` #pragma omp target enter data map(alloc:i) #pragma omp target data map(present, alloc: i) { #pragma omp target exit data map(delete:i) } // fails presence check here ``` OpenMP TR8 sec. 2.22.7.1 "map Clause", p. 321, L23-26 states: > If the map clause appears on a target, target data, target enter > data or target exit data construct with a present map-type-modifier > then on entry to the region if the corresponding list item does not > appear in the device data environment an error occurs and the > program terminates. There is no corresponding statement about the exit from a region. Thus, the `present` modifier should: 1. Check for presence upon entry into any region, including a `target exit data` region. This behavior is already implemented correctly. 2. Should not check for presence upon exit from any region, including a `target` or `target data` region. Without this patch, this behavior is not implemented correctly, breaking the above example. In the case of `target data`, this patch fixes the latter behavior by removing the `present` modifier from the map types Clang generates for the runtime call at the end of the region. In the case of `target`, we have not found a valid OpenMP program for which such a fix would matter. It appears that, if a program can guarantee that data is present at the beginning of a `target` region so that there's no error there, that data is also guaranteed to be present at the end. This patch adds a comment to the runtime to document this case. Reviewed By: grokos, RaviNarayanaswamy, ABataev Differential Revision: https://reviews.llvm.org/D84422 -
Denis Antrushin authored
Implement proper folding of statepoint meta operands (deopt and GC) when statepoint uses tied registers. For deopt operands it is just about properly preserving tiedness in new instruction. For tied GC operands folding is a little bit more tricky. We can fold tied GC operands only from InlineSpiller, because it knows how to properly reload tied def after it was turned into memory operand. Other users (e.g. peephole) cannot properly fold such operands as they do not know how (or when) to reload them from memory. We do this by un-tieing operand we want to fold in InlineSpiller and allowing to fold only untied operands in foldPatchpoint.
-
Bruno Ricci authored
-
Alex Zinenko authored
Introduce an initial version of C API for MLIR core IR components: Value, Type, Attribute, Operation, Region, Block, Location. These APIs allow for both inspection and creation of the IR in the generic form and intended for wrapping in high-level library- and language-specific constructs. At this point, there is no stability guarantee provided for the API. Reviewed By: stellaraccident, lattner Differential Revision: https://reviews.llvm.org/D83310 -
Roman Lebedev authored
This reverts commit ac70b37a which reverted commit 8aeb2fe1 because codegen tests got broken and i needed time to investigate. This shows some regressions in tests, but they are all around GEP's, so i'm not really sure how important those are. https://rise4fun.com/Alive/1Gn
-
Nico Weber authored
This reverts commit 0bbaacc8 and 2ad56119 which merged 10b1b4a2 (and follow-ups), since that change was reverted in 3ab01550.
-
Bruno Ricci authored
[clang][NFC] DeclPrinter: use NamedDecl::getDeclName instead of NamedDecl::printName to print the name of enumerations, namespaces and template parameters. NamedDecl::printName will print the pretty-printed name of the entity, which is not what we want here (we should print "enum { e };" instead of "enum (unnamed enum at input.cc:1:5) { e };"). For now only DecompositionDecl and MDGuidDecl have an overloaded printName so this does not result in any functional change, but this change is needed since I will be adding overloads to better handle unnamed entities in diagnostics. -
Bruno Ricci authored
sizeof(ConstantMatrixTypeBitfields) > 8 which increases the size of every type. This was not detected because no corresponding static_assert for its size was added. To prevent this from occuring again replace the various static_asserts for the size of each of the bit-field classes by a single static_assert for the size of Type. I have left ConstantMatrixType::MaxElementsPerDimension unchanged since the limit is exercised by multiple tests.
-
Bruno Ricci authored
`OS << ND->getDeclName();` is equivalent to `OS << ND->getNameAsString();` without the extra temporary string. This is not quite a NFC since two uses of `getNameAsString` in a diagnostic are replaced, which results in the named entity being quoted with additional "'"s (ie: 'var' instead of var).
-
Bruno Ricci authored
-
Bruno Ricci authored
-
Bruno Ricci authored
-
Bruno Ricci authored
-
Alex Zinenko authored
This dialect was introduced during the bring-up of the new LLVM dialect type system for testing purposes. The main LLVM dialect now uses the new type system and the test dialect is no longer necessary, so remove it. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D85224
-
Yaxun (Sam) Liu authored
nvcc supports accessing file-scope static device variables in host code by host APIs like cudaMemcpyToSymbol etc. CUDA/HIP let users access device variables in host code by shadow variables. In host compilation, clang emits a shadow variable for each device variable, and calls __*RegisterVariable to register it in init function. The address of the shadow variable and the device side mangled name of the device variable is passed to __*RegisterVariable. Runtime looks up the symbol by name in the device binary to find the address of the device variable. The problem with static device variables is that they have internal linkage, therefore their name may be changed by the linker if there are multiple symbols with the same name. Also they end up as local symbols in the elf file, whereas the runtime only looks up the global symbols. Another reason for making the static device variables external linkage is that they may be initialized externally by host code and their final value may be accessed by host code after kernel execution, therefore they actually have external linkage. Giving them internal linkage will cause incorrect optimizations on them. To support accessing static device var in host code for -fno-gpu-rdc mode, change the intnernal linkage to external linkage. The name does not need change since there is only one TU for -fno-gpu-rdc mode. Also the externalization is done only if the device static var is referenced by host code. Differential Revision: https://reviews.llvm.org/D80858
-
Sam Parker authored
As with other targets, set the throughput cost of control-flow instructions to free so that we don't miss out of vectorization opportunities. Differential Revision: https://reviews.llvm.org/D85283
-
Simon Pilgrim authored
-
Alex Zinenko authored
The syntax of the LLVM dialect types changed between the time the code was written and it was submitted, leading to a test failure. Update the syntax.
-
Xing GUO authored
This patch adds support for dumping DWARF sections to obj2yaml. The .debug_aranges section is used to illustrate the basic idea. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D85094
-
Alex Cameron authored
This addresses PR45189.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Already defined in CallingConvLower.h
-
Simon Pilgrim authored
Taken from internal fuzz test
-
Hans Wennborg authored
This quietly disabled use of zlib on Windows even when building with -DLLVM_ENABLE_ZLIB=FORCE_ON. > Rather than handling zlib handling manually, use find_package from CMake > to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB, > HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is > set to YES, which requires the distributor to explicitly select whether > zlib is enabled or not. This simplifies the CMake handling and usage in > the rest of the tooling. > > This is a reland of abb00753 with all followup changes and fixes that > should address issues that were reported in PR44780. > > Differential Revision: https://reviews.llvm.org/D79219 This reverts commit 10b1b4a2 and follow-ups 64d99cc6 and f9fec044.
-
Paul Walker authored
Since there are no ill effects when performing these operations with undefined elements, they are lowered to the already supported unpredicated scalable vector equivalents. Differential Revision: https://reviews.llvm.org/D85117
-
Simon Pilgrim authored
We currently don't do anything to fold any_extend vector loads as no target has such an instruction. Instead I've added support for folding to a zextload, SimplifyDemandedBits does a good job of adjusting the zext(truncate(()) stages as required later on. We still need the custom scalar extload handling instead of using the tryToFoldExtOfLoad helper as it has different legality tests - we can probably tweak that to reduce most of the code duplication. Fixes the regression I mentioned in rG99a971ca Differential Revision: https://reviews.llvm.org/D85129
-
Luboš Luňák authored
http://lab.llvm.org:8011/builders/lldb-aarch64-ubuntu/builds/7287/steps/test/logs/stdio fails, and the output suggests that gui 'finish' (='thread step-out') is broken on aarch64.
-
Arpith C. Jacob authored
Handle the case where the ViewOp takes in a memref that has an memory space. Reviewed By: ftynse, bondhugula, nicolasvasilache Differential Revision: https://reviews.llvm.org/D85048
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D85273
-
Georgii Rymar authored
Currently, we only test the `--stackmap` option here: https://github.com/llvm/llvm-project/blob/master/llvm/test/Object/stackmap-dump.test it uses a precompiled MachO binary currently and I've found no tests for this option for ELF. The implementation also has issues. For example, it might assert on a wrong version of the .llvm-stackmaps section. Or it might crash on an empty or truncated section. This patch introduces a new tools/llvm-readobj/ELF test file as well as implements a few basic checks to catch simple crashes/issues It also eliminates `unwrapOrError` calls in `printStackMap()`. Differential revision: https://reviews.llvm.org/D85208
-
Benjamin Kramer authored
This is used in the wild, don't break compatibility for no good reason. https://github.com/google/pprof/blob/master/internal/binutils/addr2liner_llvm.go
-
Jordan Rupprecht authored
This came up during the review for D67656. It's nice but also subtle, so documenting it as an idiom will make tests easier to understand. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D68061
-
Luboš Luňák authored
This reverts commit 21f142ce.
-
Luboš Luňák authored
-
Frederik Gossen authored
The extent tensor type is a `tensor<?xindex>` that is used in the shape dialect. To facilitate the use of this type when working with the shape dialect, we expose the helper function for its construction. Differential Revision: https://reviews.llvm.org/D85121
-
Pierre Gousseau authored
headers. NFC. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D84945
-
Tatyana Krasnukha authored
MSVC reports "switch statement contains 'default' but no 'case' labels". Suppress, as this was intended behavior.
-
Tatyana Krasnukha authored
PyUnicode_GetSize is deprecated since Python version 3.3.
-