- Jun 23, 2021
-
-
Juneyoung Lee authored
This adds more poison folding optimizations to InstSimplify. Since all binary operators propagate poison, these are fine. Also, the precondition of `select cond, undef, x` -> `x` is relaxed to allow the case when `x` is undef. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D104661
-
David Spickett authored
Replacing existing uses with AppendError. SetError is also part of the SBI API. This remains but instead of calling the underlying SetError it will call AppendError. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D104768
-
Joe Ellis authored
With regards to overrunning, the langref (llvm/docs/LangRef.rst) specifies: (llvm.experimental.vector.insert) Elements ``idx`` through (``idx`` + num_elements(``subvec``) - 1) must be valid ``vec`` indices. If this condition cannot be determined statically but is false at runtime, then the result vector is undefined. (llvm.experimental.vector.extract) Elements ``idx`` through (``idx`` + num_elements(result_type) - 1) must be valid vector indices. If this condition cannot be determined statically but is false at runtime, then the result vector is undefined. For the non-mixed cases (e.g. inserting/extracting a scalable into/from another scalable, or inserting/extracting a fixed into/from another fixed), it is possible to statically check whether or not the above conditions are met. This was previously missing from the verifier, and if the conditions were found to be false, the result of the insertion/extraction would be replaced with an undef. With regards to invalid indices, the langref (llvm/docs/LangRef.rst) specifies: (llvm.experimental.vector.insert) ``idx`` represents the starting element number at which ``subvec`` will be inserted. ``idx`` must be a constant multiple of ``subvec``'s known minimum vector length. (llvm.experimental.vector.extract) The ``idx`` specifies the starting element number within ``vec`` from which a subvector is extracted. ``idx`` must be a constant multiple of the known-minimum vector length of the result type. Similarly, these conditions were not previously enforced in the verifier. In some circumstances, invalid indices were permitted silently, and in other circumstances, an undef was spawned where a verifier error would have been preferred. This commit adds verifier checks to enforce the constraints above. Differential Revision: https://reviews.llvm.org/D104468
-
Nikita Popov authored
Dropping the TODO here because it applies to all uses of this method.
-
Nikita Popov authored
Spin-off from D104740: I don't think this special handling is needed anymore. Calls in textual IR are annotated with addrspace(N) (which defaults to the program address space from data layout) and specifies the expected pointer address space of the callee. There is no need to special-case the program address space on top of that, as it already is the default expected address space, and we shouldn't allow use of the program address space if the call was explicitly annotated with some other address space. The IsCall parameter is retained because it will be used again soon. Differential Revision: https://reviews.llvm.org/D104752
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D104769
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D103684
-
Jay Foad authored
NFCI, although the test change shows that ConstantExpr::getAsInstruction is better than the old implementation of createReplacementInstr because it propagates things like the sdiv "exact" flag. Differential Revision: https://reviews.llvm.org/D104124
-
Tobias Gysi authored
Adapt the FillOp library call signature to the updated operand order introduced in https://reviews.llvm.org/D10412. The patch reverts the special treatment of FillOp in LinalgToStandard. Differential Revision: https://reviews.llvm.org/D104360
-
Florian Hahn authored
-
Florian Hahn authored
This adds handling for signed predicates, similar to how unsigned predicates are already handled. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D104732
-
Florian Hahn authored
-
Jay Foad authored
Don't use SCC iterators when we're only interested in reachability. Use df_begin/df_end inline to find reachable nodes. Differential Revision: https://reviews.llvm.org/D104704
-
Tobias Gysi authored
Change the build operand order from output, value to value, output. The patch makes the argument order consistent with the pretty printed order updated by https://reviews.llvm.org/D104356. Differential Revision: https://reviews.llvm.org/D104359
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D104316
-
Martin Storsjö authored
This particular linker invocation is only run to check that we accept options, but we don't inspect the generated command line. As all other commands in the file have their output piped to FileCheck, the lit test doesn't print any other output; therefore silence this one for consistency as well.
-
Fangrui Song authored
-
Martin Storsjö authored
This is consistent with how clang prints its internal commands with -### and -v. When linking with -verbose, we get log messages from the actual linking written to stderr. By printing the command to the same stream, we make sure they appear in a sensible chronological order. Differential Revision: https://reviews.llvm.org/D104527
-
Tobias Gysi authored
The patch changes the pretty printed FillOp operand order from output, value to value, output. The change is a follow up to https://reviews.llvm.org/D104121 that passes the fill value using a scalar input instead of the former capture semantics. Differential Revision: https://reviews.llvm.org/D104356
-
Vinayaka Bandishti authored
During slice computation of affine loop fusion, detect one id as the mod of another id w.r.t a constant in a more generic way. Restrictions on co-efficients of the ids is removed. Also, information from the previously calculated ids is used for simplification of affine expressions, e.g., If `id1` = `id2`, `id_n - divisor * id_q - id_r + id1 - id2 = 0`, is simplified to: `id_n - divisor * id_q - id_r = 0`. If `c` is a non-zero integer, `c*id_n - c*divisor * id_q - c*id_r = 0`, is simplified to: `id_n - divisor * id_q - id_r = 0`. Reviewed By: bondhugula, ayzhuang Differential Revision: https://reviews.llvm.org/D104614
-
Vinayaka Bandishti authored
Correct a documentation typo, and delete a duplicate test in `pdl-to-pdl-interp-rewriter.mlir`. Reviewed By: pr4tgpt, bondhugula, rriddle Differential Revision: https://reviews.llvm.org/D104688
-
Martin Storsjö authored
This reverts commit ea011ec5. This still causes some miscompiles, I'll follow up in the phabricator review with a sample of that issue (which is part of the sample of the previous issue).
-
Igor Kudrin authored
If an instruction has several operands and a PC-relative one is not the first of them, the generator may produce the code that does not pass the 'Address' parameter to the printout method. For example, for an Arm instruction 'LE LR, $imm', it reuses the same code as for other instructions where the second operand is not PC-relative: void ARMInstPrinter::printInstruction(...) { ... case 11: // BF16VDOTI_VDOTD, BF16VDOTI_VDOTQ, BF16VDOTS_VDOTD, ... printOperand(MI, 1, STI, O); O << ", "; printOperand(MI, 2, STI, O); break; ... The patch fixes that by considering 'PCRel' when comparing 'AsmWriterOperand' values. Differential Revision: https://reviews.llvm.org/D104698
-
Min-Yih Hsu authored
In https://reviews.llvm.org/rG2193347e72fa , a cpp file is accidentally included instead of its header file counterpart. This patch fixes this error.
-
Jim Lin authored
Add codegen testcases for lsl, lsr, asr, rol and ror instructions. Reviewed By: myhsu Differential Revision: https://reviews.llvm.org/D104685
-
Jim Lin authored
Refactor pat for and, or and xor operation and add missing tests for it Reviewed By: myhsu Differential Revision: https://reviews.llvm.org/D104626
-
Max Kazantsev authored
Follow-up on Roman's idea expressed in D103959. - If a Phi has undefined inputs from live blocks: - and no other inputs, assume it is undef itself; - and exactly one non-undef input, we can assume that all undefs are equal to this input. Differential Revision: https://reviews.llvm.org/D104618 Reviewed By: lebedev.ri, nikic
-
Max Kazantsev authored
We don't want to test possible unexpected impact of such branches. Replacing them with regular conditions. Idea by Nikita Popov.
-
Max Kazantsev authored
Zero factor leads to division by zero and failure of corresponding assert as shown in PR50765. We should filter out such factors. Differential Revision: https://reviews.llvm.org/D104702 Reviewed By: huihuiz, reames
-
Jack Xia authored
multiple_transpose -> multiply_transpose
-
River Riddle authored
GCC5 isn't able to implicitly capture `this` properly in an `auto` lambda.
-
River Riddle authored
This avoids generating otherwise unnecessary methods.
-
Joseph Huber authored
This introduces a CMake find module for detecting target offloading support in a compiler. The goal is to make it easier to incorporate target offloading into a cmake project. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D104710
-
River Riddle authored
Remove the duplicate unnecessary CHECK labels at the bottom of the file.
-
Nico Weber authored
It doesn't build there, see http://45.33.8.238/macm1/12180/step_4.txt
-
River Riddle authored
This revision refactors the usage of multithreaded utilities in MLIR to use a common thread pool within the MLIR context, in addition to a new utility that makes writing multi-threaded code in MLIR less error prone. Using a unified thread pool brings about several advantages: * Better thread usage and more control We currently use the static llvm threading utilities, which do not allow multiple levels of asynchronous scheduling (even if there are open threads). This is due to how the current TaskGroup structure works, which only allows one truly multithreaded instance at a time. By having our own ThreadPool we gain more control and flexibility over our job/thread scheduling, and in a followup can enable threading more parts of the compiler. * The static nature of TaskGroup causes issues in certain configurations Due to the static nature of TaskGroup, there have been quite a few problems related to destruction that have caused several downstream projects to disable threading. See D104207 for discussion on some related fallout. By having a ThreadPool scoped to the context, we don't have to worry about destruction and can ensure that any additional MLIR thread usage ends when the context is destroyed. Differential Revision: https://reviews.llvm.org/D104516
-
River Riddle authored
-
Christopher Di Bella authored
* `<type_traits>` depends on `std::forward`, so we replaced it with `static_cast<T&&>`. * `swap`'s return type is confusing, so it's been rearranged to improve readabilitiy.
-
Jon Roelofs authored
Differential revision: https://reviews.llvm.org/D104078
-