- Jun 16, 2020
-
-
Alexey Bataev authored
Summary: Added codegen for scan directives in parallel for regions. Emits the code for the directive with inscan reductions. Original code: ``` #pragma omp for simd reduction(inscan, op : ...) for(...) { <input phase>; #pragma omp scan (in)exclusive(...) <scan phase> } ``` is transformed to something: ``` size num_iters = <num_iters>; <type> buffer[num_iters]; #pragma omp for simd for (i: 0..<num_iters>) { <input phase>; buffer[i] = red; } #pragma omp barrier for (int k = 0; k != ceil(log2(num_iters)); ++k) for (size cnt = last_iter; cnt >= pow(2, k); --k) buffer[i] op= buffer[i-pow(2,k)]; #pragma omp for simd for (0..<num_iters>) { red = InclusiveScan ? buffer[i] : buffer[i-1]; <scan phase>; } ``` Reviewers: jdoerfert Subscribers: yaxunl, guansong, sstefan1, cfe-commits, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D81658
-
Yuanfang Chen authored
This reverts commit 719c87ed. Checked in by accident. Sorry.
-
Yuanfang Chen authored
For PR46336.
-
Yuanfang Chen authored
-
Alexey Bataev authored
Summary: According to OpenMP, During execution of an iteration of a worksharing-loop or a loop nest within a worksharing-loop, simd, or worksharing-loop SIMD region, a thread must not execute more than one ordered region corresponding to an ordered construct without a depend clause. Need to report an error in this case. Reviewers: jdoerfert Subscribers: yaxunl, guansong, sstefan1, cfe-commits, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D81951
-
Christopher Tetreault authored
Reviewers: efriedma, fhahn, spatel, sdesmalen, kmclaughlin Reviewed By: efriedma Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81521
-
Matt Arsenault authored
This doesn't actually handled type idx 0, but was reporting Legalized on it. No test changes because nothing was trying to use this.
-
Ahsan Saghir authored
Summary: This patch adds command line option for enabling power10-vector support. Reviewers: hfinkel, nemanjai, lei, amyk, #powerpc Reviewed By: lei, amyk, #powerpc Subscribers: wuzish, kbarton, hiraditya, shchenz, cfe-commits, llvm-commits Tags: #llvm, #clang, #powerpc Differential Revision: https://reviews.llvm.org/D80758
-
Florian Hahn authored
Some tests were missing alignment info. Subsequent changes properly preserve the set alignment. Set it properly beforehand, to avoid unnecessary test changes.
-
Julian Lettner authored
Before this change we showed all result groups with a code that was not explicitly hard-coded set. This set missed the FLAKYPASS result code. Let's generalize the code to always show failures and the additionally requested result codes.
-
Tom Stellard authored
Summary: We're trying to use the --config options to pass distro specific options for Fedora via the CFLAGS variable. However, some projects end up using the CFLAGS variable multiple times in their command line, which leads to an error when --config is used. This patch resolves this issue by allowing more than one --config option on the command line as long as the file names are the same. Reviewers: sepavloff, hfinkel Reviewed By: sepavloff Subscribers: cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81424
-
Alex Zinenko authored
Recent work has introduced support for constructing loops via `::build` with callbacks that construct loop bodies using only the core OpBuilder. This is now supported on all loop types that Linalg lowers to. Refactor LoopNestBuilder in Linalg to rely on this functionality instead of using a custom EDSC-based approach to creating loop nests. The specialization targeting parallel loops is also simplified by factoring out the recursive call into a separate static function and considering only two alternatives: top-level loop is parallel or sequential. This removes the last remaining in-tree use of edsc::LoopBuilder, which is now deprecated and will be removed soon. Differential Revision: https://reviews.llvm.org/D81873
-
Alex Zinenko authored
Similarly to `scf::ForOp`, introduce additional `function_ref` arguments to `::build` functions of SCF `ParallelOp` and `ReduceOp`. The provided functions will be called to construct the body of the respective operations while constructing the operation itself. Exercise them in LoopUtils. Differential Revision: https://reviews.llvm.org/D81872
-
Matt Arsenault authored
-
Tim Shen authored
-
Matt Arsenault authored
The special case here is really G_UNMERGE_VALUES, not G_EXTRACT. The other opcodes can hardcode index 1 like G_EXTRACT.
-
Matt Arsenault authored
-
Tim Shen authored
-
Tim Shen authored
Summary: This patch adds --source flag to indicate the source file. Then it tries to find insert points in the source file and insert corresponding checks at those places. Example output from Tensorflow XLA: // ----- // CHECK-LABEL: func @main.3( // CHECK-SAME: %[[VAL_0:.*]]: memref<2x2xf32> {xla_lhlo.params = 0 : index}, // CHECK-SAME: %[[VAL_1:.*]]: memref<16xi8> {xla_lhlo.alloc = 0 : index, xla_lhlo.liveout = true}) { // CHECK: %[[VAL_2:.*]] = constant 0 : index // CHECK: %[[VAL_3:.*]] = constant 0 : index // CHECK: %[[VAL_4:.*]] = std.view %[[VAL_1]]{{\[}}%[[VAL_3]]][] : memref<16xi8> to memref<2x2xf32> // CHECK: "xla_lhlo.tanh"(%[[VAL_0]], %[[VAL_4]]) : (memref<2x2xf32>, memref<2x2xf32>) -> () // CHECK: return // CHECK: } func @main(%value0: tensor<2x2xf32>) -> tensor<2x2xf32> { %res = "xla_hlo.tanh"(%value0) : (tensor<2x2xf32>) -> tensor<2x2xf32> return %res : tensor<2x2xf32> } Differential Revision: https://reviews.llvm.org/D81903
-
Stanislav Mekhanoshin authored
UBSAN complains when tblgen performs SHL of a negative value. Differential Revision: https://reviews.llvm.org/D81952
-
Hiroshi Yamauchi authored
Summary: delete(void*, unsigned int, align_val_t) delete(void*, unsigned long, align_val_t) delete[](void*, unsigned int, align_val_t) delete[](void*, unsigned long, align_val_t) Differential Revision: https://reviews.llvm.org/D81853
-
David Tenty authored
Summary: we use the alias attribute, similar to what is done for ELF. Reviewers: ZarkoCA, jasonliu, hubert.reinterpretcast, sfertile Reviewed By: jasonliu Subscribers: dberris, aheejin, mstorsjo, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D81120
-
Jonas Devlieghere authored
Executing commands below will get you bombarded by a wall of Python command prompts (>>> ). $ echo 'foo' | ./bin/lldb -o script $ cat /tmp/script script print("foo") $ lldb --source /tmp/script The issue is that our custom input reader doesn't handle EOF. According to the Python documentation, file.readline always includes a trailing newline character unless the file ends with an incomplete line. An empty string signals EOF. This patch raises an EOFError when that happens. [1] https://docs.python.org/2/library/stdtypes.html#file.readline Differential revision: https://reviews.llvm.org/D81898
-
Sanjay Patel authored
Generalize scalarization (recently enhanced with D80885) to allow compares as well as binops. Similar to binops, we are avoiding scalarization of a loaded value because that could avoid a register transfer in codegen. This requires 1 extra predicate that I am aware of: we do not want to scalarize the condition value of a vector select. That might also invert a transform that we do in instcombine that prefers a vector condition operand for a vector select. I think this is the final step in solving PR37463: https://bugs.llvm.org/show_bug.cgi?id=37463 Differential Revision: https://reviews.llvm.org/D81661
-
Louis Dionne authored
The Standard documents the signature of std::advance as template <class Iter, class Distance> constexpr void advance(Iter& i, Distance n); Furthermore, it does not appear to put any restriction on what the type of Distance should be. While it is understood that it should usually be std::iterator_traits::difference_type, I couldn't find any wording that mandates that. Similarly, I couldn't find wording that forces the distance to be a signed type. This patch changes std::advance to accept any type in the second argument, which appears to be what the Standard mandates. We then coerce it to the iterator's difference type, but that's an implementation detail. Differential Revision: https://reviews.llvm.org/D81425
-
Yuanfang Chen authored
the range start is already set The range start could be set already in some invalid cases. Fixes PR46336.
-
Jessica Paquette authored
When selecting 32 b -> 64 b G_ZEXTs, we don't have to always emit the extend. If the instruction feeding into the G_ZEXT implicitly zero extends the high half of the register, we can just emit a SUBREG_TO_REG instead. Differential Revision: https://reviews.llvm.org/D81897
-
Jonas Devlieghere authored
The type test use this method to store the golden output. This currently fails if the reproducer directory hasn't yet been created.
-
Alexey Bataev authored
-
Sam McCall authored
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D81933
-
Kirstóf Umann authored
https://bugs.llvm.org/show_bug.cgi?id=46253 This is an obvious hack because realloc isn't any more affected than other functions modeled by MallocChecker (or any user of CallDescription really), but the nice solution will take some time to implement. Differential Revision: https://reviews.llvm.org/D81745
-
Fangrui Song authored
-
Leandro Vaz authored
Compiling assembly files when newlines are reduced to line markers within a `.macro` context will generate wrong information in `.debug_line` section. This patch fixes this issue by evaluating line markers within the macro scope but not when they are used and evaluated. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D80381
-
Matt Arsenault authored
This is currently different from the IR rules.
-
Matt Arsenault authored
-
Joachim Protze authored
Adds the callbacks for ordered with source/sink dependencies. The test for task dependencies changed, because callbach.h now actually prints the passed dependencies and the test also checks for the address. Reviewed by: hbae Differential Revision: https://reviews.llvm.org/D81807
-
Nicolas Vasilache authored
Summary: This revision replaces MatmulOp, now that DRR rules have been dropped. This revision also fixes minor parsing bugs and a plugs a few holes to get e2e paths working (e.g. library call emission). During the replacement the i32 version had to be dropped because only the EDSC operators +, *, etc support type inference. Deciding on a type-polymorphic behavior, and implementing it, is left for future work. Reviewers: aartbik Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, msifontes Tags: #mlir Differential Revision: https://reviews.llvm.org/D81935
-
Florian Hahn authored
Some tests were missing alignment info. Subsequent changes properly preserve the set alignment. Set it properly beforehand, to avoid unnecessary test changes. It also updates cases where an alignment of 16 was specified, instead of the vector element type alignment.
-
Kiran Chandramohan authored
gcc 9.1/9.2 has a bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90538) which leads to an incorrect error when expanding parameter packs multiple times in a lambda. Inlining this lambda to work around this issue. Reviewed By: rriddle, CarolineConcatto Differential Revision: https://reviews.llvm.org/D81828
-