- Dec 18, 2020
-
-
Mehdi Amini authored
The forward declaration for SmallVector does not play well with clang-5. Differential Revision: https://reviews.llvm.org/D93498
-
MaheshRavishankar authored
This operation is used to materialize a tensor of a particular shape. The shape could be specified as a mix of static and dynamic values. The use of this operation is to be an `init` tensor for Linalg structured operation on tensors where the bounds of the computation depends on the shape of the output of the linalg operation. The result of this operation will be used as the `init` tensor of such Linalg operations. To note, 1) The values in the tensor materialized is not used. Any operation to which this is an init tensor is expected to overwrite the entire tensor. 2) The tensor is materialized only for the shape of the output and to make the loop bounds depend only on operands of the structured operation. Based on (1) and (2) it is assumed that these operations eventually go away since they are only used in `dim` operations that can be canonicalized to make this operation dead. Such canonicalization are added here too. Differential Revision: https://reviews.llvm.org/D93374
-
MaheshRavishankar authored
Fold a `tensor_cast` -> `dim` to take the `dim` of the original tensor. Differential Revision: https://reviews.llvm.org/D93492
-
Nikita Popov authored
This one would miscompile if read-clobber checks switched to using the EarlierAccess location, but the read cache was retained.
-
Tom Stellard authored
Add a special case for handling __builtin_mul_overflow with unsigned inputs and a signed output to avoid emitting the __muloti4 library call on x86_64. __muloti4 is not implemented in libgcc, so avoiding this call fixes compilation of some programs that call __builtin_mul_overflow with these arguments. For example, this fixes the build of cpio with clang, which includes code from gnulib that calls __builtin_mul_overflow with these argument types. Reviewed By: vsk Differential Revision: https://reviews.llvm.org/D84405
-
Sanjay Patel authored
-
Roman Lebedev authored
Pretty boring, removeUnwindEdge() already known how to update DomTree, so if we are to call it, we must first flush our own pending updates; otherwise, we just stop predecessors from branching to us, and for certain predecessors, stop their predecessors from branching to them also.
-
Roman Lebedev authored
... so just ensure that we pass DomTreeUpdater it into it. Fixes DomTree preservation for a number of tests, all of which are marked as such so that they do not regress.
-
Roman Lebedev authored
... so just ensure that we pass DomTreeUpdater it into it. Fixes DomTree preservation for a large number of tests, all of which are marked as such so that they do not regress.
-
Joachim Meyer authored
As noted in https://reviews.llvm.org/D86137#2460135 parsing of the clang-format parameter -Wno-error=unknown fails. This currently is done by having `-Wno-error=unknown` as an option. In this patch this is changed to make `-Wno-error=` parse an enum into a bit set. This way the parsing is fixed and also we can possibly add new options easily. Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D93459
-
Azat Khuzhin authored
gcc supports it only at the beginning: $ g++ -o /dev/null -c /tmp/test_extern.cpp $ cat /tmp/test_extern.cpp extern "C" __attribute__ ((__visibility__("default"))) int foo(); Otherwise: $ g++ -o /dev/null -c /tmp/test_extern.cpp /tmp/test_extern.cpp:1:52: error: expected unqualified-id before string constant 1 | __attribute__ ((__visibility__("default"))) extern "C" int foo(); | ^~~ $ cat /tmp/test_extern.cpp __attribute__ ((__visibility__("default"))) extern "C" int foo(); Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D93316 -
Nico Weber authored
No behavior change.
-
River Riddle authored
[mlir][IR][NFC] Move context/location parameters of builtin Type::get methods to the start of the parameter list This better matches the rest of the infrastructure, is much simpler, and makes it easier to move these types to being declaratively specified. Differential Revision: https://reviews.llvm.org/D93432
-
Bangtian Liu authored
This reverts commit d20e0c34.
-
Alex Zinenko authored
This document was not updated after the LLVM dialect type system had been reimplemented and was using an outdated syntax. Rewrite the part of the document that concerns type conversion and prepare the ground for splitting it into a document that explains how built-in types are converted and a separate document that explains how standard types and functions are converted, which will better correspond to the fact that built-in types do not belong to the standard dialect. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D93486
-
Nico Weber authored
cl.exe doesn't understand Zd (in either MSVC 2017 or 2019), so neiter should we. It used to do the same as `-gline-tables-only` which is exposed as clang-cl flag as well, so if you want this behavior, use `gline-tables-only`. That makes it clear that it's a clang-cl-only flag that won't work with cl.exe. Motivated by the discussion in D92958. Differential Revision: https://reviews.llvm.org/D93458
-
Nico Weber authored
For full-debug-info (is_debug=true / symbol_level=2 builds), this makes linking 15% slower, but gdb startup 1500% faster (for lld: link time 3.9s->4.4s, gdb load time >30s->2s). For link time, I ran bench.py -o {noindex,index}.txt \ sh -c 'rm out/gn/bin/lld && ninja -C out/gn lld' and then `ministat noindex.txt index.txt`: ``` x noindex.txt + index.txt N Min Max Median Avg Stddev x 5 3.784461 4.0200169 3.8452811 3.8754988 0.089902595 + 5 4.32496 4.6058481 4.3361208 4.4141198 0.12288267 Difference at 95.0% confidence 0.538621 +/- 0.15702 13.8981% +/- 4.05161% (Student's t, pooled s = 0.107663) ``` For gdb load time I loaded the crash in PR48392 with gdb -ex r --args ../out/gn/bin/ld64.lld.darwinnew @response.txt and just stopped the time until the crash got displayed with a stopwatch a few times. So the speedup there is less precise, but it's so pronounced that that's ok (loads ~instantly with the patch, takes a very long time without it). Only doing this for LLD because I haven't tried it with other linkers. Differential Revision: https://reviews.llvm.org/D92844 -
Johannes Doerfert authored
If a GPU function is externally reachable we give up trying to find the (unique) kernel it is called from. This can hinder optimizations. Emit a remark and explain mitigation strategies. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D93439
-
Nick Desaulniers authored
GNU documentaion for always_inline: https://gcc.gnu.org/onlinedocs/gcc/Inline.html GNU documentation for function attributes: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html Microsoft documentation for __force_inline: https://docs.microsoft.com/en-us/cpp/cpp/inline-functions-cpp Reviewed By: ojeda Differential Revision: https://reviews.llvm.org/D68410
-
Javier Setoain authored
Adds missing cmake command to generate documentation for ArmSVE Dialect. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D93465
-
Nico Weber authored
-
Nikita Popov authored
-
Arthur Eubanks authored
Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D93434
-
https://reviews.llvm.org/D93005Christian Sigg authored
Differential Revision: https://reviews.llvm.org/D93480
-
Tony authored
Differential Revision: https://reviews.llvm.org/D93440
-
Brian Gesiak authored
The LLVM IR 'switch' instruction allows control flow to be transferred to one of any number of branches depending on an integer control value, or a default value if the control does not match any branch values. This patch adds `llvm.switch` to the MLIR LLVMIR dialect, as well as translation routines for lowering it to LLVM IR. To store a variable number of operands for a variable number of branch destinations, the new op makes use of the `AttrSizedOperandSegments` trait. It stores its default branch operands as one segment, and all remaining case branches' operands as another. It also stores pairs of begin and end offset values to delineate the sub-range of each case branch's operands. There's probably a better way to implement this, since the offset computation complicates several parts of the op definition. This is the approach I settled on because in doing so I was able to delegate to the default op builder member functions. However, it may be preferable to instead specify `skipDefaultBuilders` in the op's ODS, or use a completely separate approach; feedback is welcome! Another contentious part of this patch may be the custom printer and parser functions for the op. Ideally I would have liked the MLIR to be printed in this way: ``` llvm.switch %0, ^bb1(%1 : !llvm.i32) [ 1: ^bb2, 2: ^bb3(%2, %3 : !llvm.i32, !llvm.i32) ] ``` The above would resemble how LLVM IR is formatted for the 'switch' instruction. But I found it difficult to print and parse something like this, whether I used the declarative assembly format or custom functions. I also was not sure a multi-line format would be welcome -- it seems like most MLIR ops do not use newlines. Again, I'd be happy to hear any feedback here as well, or on any other aspect of the patch. Differential Revision: https://reviews.llvm.org/D93005
-
Valentin Clement authored
Remove the OpenMP clause information from the OMPKinds.def file and use the information from the new OMP.td file. There is now a single source of truth for the directives and clauses. To avoid generate lots of specific small code from tablegen, the macros previously used in OMPKinds.def are generated almost as identical. This can be polished and possibly removed in a further patch. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D92955
-
Derek Schuff authored
Live symbols should only cause the files in which they are defined to become live. For now this is only tested in emscripten: we're continuing to work on reducing the test case further for an lld-style unit test. Differential Revision: https://reviews.llvm.org/D93472
-
Hansang Bae authored
-
Peter Collingbourne authored
canAllocate() does not take into account the header size so it does not return the right answer in borderline cases. There was already code handling this correctly in isTaggedAllocation() so split it out into a separate function and call it from the test. Furthermore the test was incorrect when MTE is enabled because MTE does not pattern fill primary allocations. Fix it. Differential Revision: https://reviews.llvm.org/D93437
-
Richard Uhler authored
Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D93466
-
Baptiste Saleil authored
On PPC, the vector pair instructions are independent from MMA. This patch renames the vector pair LLVM intrinsics and Clang builtins to replace the _mma_ prefix by _vsx_ in their names. We also move the vector pair type/intrinsic/builtin tests to their own files. Differential Revision: https://reviews.llvm.org/D91974
-
Kostya Kortchinsky authored
Initially we were avoiding the release of smaller size classes due to the fact that it was an expensive operation, particularly on 32-bit platforms. With a lot of batches, and given that there are a lot of blocks per page, this was a lengthy operation with little results. There has been some improvements since then to the 32-bit release, and we still have some criterias preventing us from wasting time (eg, 9x% free blocks in the class size, etc). Allowing to release blocks < 128 bytes helps in situations where a lot of small chunks would not have been reclaimed if not for a forced reclaiming. Additionally change some `CHECK` to `DCHECK` and rearrange a bit the code. I didn't experience any regressions in my benchmarks. Differential Revision: https://reviews.llvm.org/D93141
-
George authored
Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D93334
-
LLVM GN Syncbot authored
-
Andrew Litteken authored
Extracting the similar regions is the first step in the IROutliner. Using the IRSimilarityIdentifier, we collect the SimilarityGroups and sort them by how many instructions will be removed. Each IRSimilarityCandidate is used to define an OutlinableRegion. Each region is ordered by their occurrence in the Module and the regions that are not compatible with previously outlined regions are discarded. Each region is then extracted with the CodeExtractor into its own function. We test that correctly extract in: test/Transforms/IROutliner/extraction.ll test/Transforms/IROutliner/address-taken.ll test/Transforms/IROutliner/outlining-same-globals.ll test/Transforms/IROutliner/outlining-same-constants.ll test/Transforms/IROutliner/outlining-different-structure.ll Recommit of bf899e89 fixing memory leaks. Reviewers: paquette, jroelofs, yroux Differential Revision: https://reviews.llvm.org/D86975
-
Arthur Eubanks authored
is_debug by default makes symbol_level = 2 and !is_debug means by default symbol_level = 0. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D92958
-
Fangrui Song authored
Reviewed By: nickdesaulniers Differential Revision: https://reviews.llvm.org/D93422
-
Siva Chandra Reddy authored
-
Michał Górny authored
Use RegSetKind enum for register sets everything, rather than int. Always spell it as 'RegSetKind', without unnecessary 'enum'. Add missing switch case. While at it, use uint32_t for regnums consistently. Differential Revision: https://reviews.llvm.org/D93450
-