- Feb 23, 2021
-
-
David Green authored
As a followup to D95291, getOperandsScalarizationOverhead was still using a VF as a vector factor if the arguments were scalar, and would assert on certain matrix intrinsics with differently sized vector arguments. This patch removes the VF arg, instead passing the Types through directly. This should allow it to more accurately compute the cost without having to guess at which operands will be vectorized, something difficult with more complex intrinsics. This adjusts one SVE test as it is now calling the wrong intrinsic vs veccall. Without invalid InstructCosts the cost of the scalarized intrinsic is too low. This should get fixed when the cost of scalarization is accounted for with scalable types. Differential Revision: https://reviews.llvm.org/D96287
-
David Green authored
getIntrinsicInstrCost takes a IntrinsicCostAttributes holding various parameters of the intrinsic being costed. It can either be called with a scalar intrinsic (RetTy==Scalar, VF==1), with a vector instruction (RetTy==Vector, VF==1) or from the vectorizer with a scalar type and vector width (RetTy==Scalar, VF>1). A RetTy==Vector, VF>1 is considered an error. Both of the vector modes are expected to be treated the same, but because this is confusing many backends end up getting it wrong. Instead of trying work with those two values separately this removes the VF parameter, widening the RetTy/ArgTys by VF used called from the vectorizer. This keeps things simpler, but does require some other modifications to keep things consistent. Most backends look like this will be an improvement (or were not using getIntrinsicInstrCost). AMDGPU needed the most changes to keep the code from c230965c working. ARM removed the fix in dfac521d, webassembly happens to get a fixup for an SLP cost issue and both X86 and AArch64 seem to now be using better costs from the vectorizer. Differential Revision: https://reviews.llvm.org/D95291
-
Nathan James authored
-
Timm Bäder authored
GNU-style attribute in enum bodies are allowed (and used by several tests), and this call to ProhibitAttributes() was dead code. Differential Revision: https://reviews.llvm.org/D97271
-
Florian Schmaus authored
The run-clang-tidy.py helper script is supposed to be used by the user, hence it should be placed in the user's PATH. Some distributions, like Gentoo [1], won't have it in PATH unless it is installed in bin/. Furthermore, installed scripts in PATH usually do not carry a filename extension, since there is no need to know that this is a Python script. For example Debian and Ubuntu already install this script as 'run-clang-tidy' [2] and hence build systems like Meson also look for this name first [3]. Hence we install run-clang-tidy.py as run-clang-tidy, as suggested by Sylvestre Ledru [4]. 1: https://bugs.gentoo.org/753380 2: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/60aefb14171ab5c3867a0081844b507fc9f6e015/debian/clang-tidy-X.Y.links.in#L2 3: https://github.com/mesonbuild/meson/blob/b6dc4d5e5c6e838de0b52e62d982ba2547eb366d/mesonbuild/scripts/clangtidy.py#L44 4: https://reviews.llvm.org/D90972#2380640 Reviewed By: sylvestre.ledru, JonasToth Differential Revision: https://reviews.llvm.org/D90972
-
Matteo Favaro authored
The **IsGuaranteedLoopInvariant** function is making sure to check if the incoming pointer is guaranteed to be loop invariant, therefore I think the case where the pointer is defined in the entry block of a function automatically guarantees the pointer to be loop invariant, as the entry block of a function cannot have predecessors or be part of a loop. I implemented this small patch and tested it using **ninja check-llvm-unit** and **ninja check-llvm**. I added a contained test file that shows the problem and used **opt -O3 -debug** on it to make sure the case is not currently handled (in fact the debug log is showing that the DSE pass is bailing out when testing if the killer store is able to clobber the dead store). Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D96979
-
Hsiangkai Wang authored
vle1.v/vse1.v should be unmasked instructions. The vm encoding is 1 for unmasked instructions. Differential Revision: https://reviews.llvm.org/D97237
-
Anastasia Stulova authored
After updating the user interface in D96515, update the docs reflecting the new approach. Tags: #clang Differential Revision: https://reviews.llvm.org/D96616
-
Nicolas Vasilache authored
This transformation was only used for quick experimentation and is not general enough. Retire it. Differential Revision: https://reviews.llvm.org/D97266
-
Simon Pilgrim authored
-
Nicolas Vasilache authored
-
Raphael Isemann authored
Those functions aren't called anywhere. For debugging purposes we usually have Dump() methods (which already exist in some semi-functional form in ValueObject).
-
Alexey Lapshin authored
If resulting size of the output stream is already known, then the space for stream data could be preliminary allocated in some cases. f.e. raw_string_ostream could preallocate the space for the target string(it allows to avoid reallocations during writing into the stream). Differential Revision: https://reviews.llvm.org/D91693
-
Raphael Isemann authored
* Remove commented out code. * Doxygenify comments that serve as documentation. * Use the LLVM comment style where possible.
-
David Green authored
-
Andy Wingo authored
This reverts commit 861dbe1a. It broke emscripten -- see https://reviews.llvm.org/D90948#2578843.
-
Fraser Cormack authored
This patch extends the support for RVV INSERT_SUBVECTOR to cover those which don't align to a vector register boundary. Like the support for EXTRACT_SUBVECTOR in D96959, it accomplishes this by extracting the nearest register-sized subvector (a subregister operation), then sliding the vector down with VSLIDEDOWN, inserting the subvector to the first position, and sliding the vector back up again afterwards. Unlike subvector extraction, for vectors that occupy less than a full vector register we must preserve the untouched elements. We do this by lowering to an LMUL=1 INSERT_SUBVECTOR using the above method and lowering that to a VSLIDEUP with a zero offset. This uses a tail-undisturbed policy and so has the effect of "sliding in" the subvector elements while preserving the surrounding ones. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D96972
-
Frederik Gossen authored
-
Sven van Haastregt authored
Move any remaining preprocessor defines from `opencl-c.h` to `opencl-c-base.h`, such that they are shared with `-fdeclare-opencl-builtins` too. In particular, move: - the `as_type` and `as_typen` definitions, and - the `kernel_exec` and `__kernel_exec` definitions. Also clang-format the changes. Differential Revision: https://reviews.llvm.org/D96948
-
Raphael Isemann authored
[lldb][NFC] Give CompilerType's IsArrayType/IsVectorType/IsBlockPointerType out-parameters default values We already do this for most functions that have out-parameters, so let's do the same here and avoid all the `nullptr, nullptr, nullptr` in every call.
-
Martin Liska authored
/home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_value.cpp:77:25: runtime error: left shift of 0x0000000000000000fffffffffffffffb by 96 places cannot be represented in type '__int128' #0 0x7ffff754edfe in __ubsan::Value::getSIntValue() const /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_value.cpp:77 #1 0x7ffff7548719 in __ubsan::Value::isNegative() const /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_value.h:190 #2 0x7ffff7542a34 in handleShiftOutOfBoundsImpl /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_handlers.cpp:338 #3 0x7ffff75431b7 in __ubsan_handle_shift_out_of_bounds /home/marxin/Programming/gcc2/libsanitizer/ubsan/ubsan_handlers.cpp:370 #4 0x40067f in main (/home/marxin/Programming/testcases/a.out+0x40067f) #5 0x7ffff72c8b24 in __libc_start_main (/lib64/libc.so.6+0x27b24) #6 0x4005bd in _start (/home/marxin/Programming/testcases/a.out+0x4005bd) Differential Revision: https://reviews.llvm.org/D97263 -
Luís Marques authored
-
Raphael Isemann authored
ValueObject inherits from UserID which is just a bad idea: * The inheritance gives ValueObject some member functions that are at best misleading (such as `Clear()` which doesn't clear any value beside `id`). * It allows passing ValueObject to the overloaded operators for UserID (such as `==` or `<<` which won't actually compare or print anything in the ValueObject). * It exposes the `SetID` and `Clear` which both allow users to change the internal id value. Similar to D91699 which did the same for Process Reviewed By: #lldb, JDevlieghere Differential Revision: https://reviews.llvm.org/D97205
-
Liu, Chen3 authored
Adding support for intrinsics of TDPBSUD/TDPBUSD/TDPBUUD. Differential Revision: https://reviews.llvm.org/D97259
-
River Riddle authored
DebugCounters allow for selectively enabling the execution of a debug action based upon a "counter". This counter is comprised of two components that are used in the control of execution of an action, a "skip" value and a "count" value. The "skip" value is used to skip a certain number of initial executions of a debug action. The "count" value is used to prevent a debug action from executing after it has executed for a set number of times (not including any executions that have been skipped). For example, a counter for a debug action with `skip=47` and `count=2`, would skip the first 47 executions, then execute twice, and finally prevent any further executions. This is effectively the same as the DebugCounter infrastructure in LLVM, but using the DebugAction infrastructure in MLIR. We can't simply reuse the DebugCounter support already present in LLVM due to its heavy reliance on global constructors (which are not allowed in ML...
-
River Riddle authored
This revision adds the infrastructure for `Debug Actions`. This is a DEBUG only API that allows for external entities to control various aspects of compiler execution. This is conceptually similar to something like DebugCounters in LLVM, but at a lower level. This framework doesn't make any assumptions about how the higher level driver is controlling the execution, it merely provides a framework for connecting the two together. This means that on top of DebugCounter functionality, we could also provide more interesting drivers such as interactive execution. A high level overview of the workflow surrounding debug actions is shown below: * Compiler developer defines an `action` that is taken by the a pass, transformation, utility that they are developing. * Depending on the needs, the developer dispatches various queries, pertaining to this action, to an `action manager` that will provide an answer as to what behavior the action should do. * An external entity registers an `action handler` with the action manager, and provides the logic to resolve queries on actions. The exact definition of an `external entity` is left opaque, to allow for more interesting handlers. This framework was proposed here: https://llvm.discourse.group/t/rfc-debug-actions-in-mlir-debug-counters-for-the-modern-world Differential Revision: https://reviews.llvm.org/D84986 -
Kadir Cetinkaya authored
ASTContext were only passed to the StmtPrinter in some places, while it is always available in DeclPrinter. The context is used by StmtPrinter to better print statements in some cases, like printing constants as written. Differential Revision: https://reviews.llvm.org/D97043
-
Raphael Isemann authored
Just code cleanup for ValueObject constructors: * Use default member initializers where possible. * Doxygenify the comments for membersa nd constructors where needed. * Delete the default constructor which isn't defined. * Initialize the bitfields via a utility struct instead of doing this in the different constructors. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D97199
-
Craig Topper authored
-
Juneyoung Lee authored
-
Juneyoung Lee authored
-
Jean Perier authored
- Add a fatal error handler that can print a message with source location before aborting. - Update TODO macro to take an mlir location argument and to use the newly introduced fatal error handler. - Introduce TODO_NOLOC for the few places where no source location is easily accessible. Reviewed By: schweitz Differential Revision: https://reviews.llvm.org/D97190
-
Petr Hosek authored
Depending on the order in which lld and compiler-rt projects are processed by CMake, `TARGET lld` might evaluate to `TRUE` or `FALSE` even though `lld-available` lit stanza is always set because lld is being built. We check whether lld project is enabled instead which is used by other compiler-rt tests. The ideal solution here would be to use CMake generator expressions, but those cannot be used for dependencies yet, see: https://gitlab.kitware.com/cmake/cmake/-/issues/19467 Differential Revision: https://reviews.llvm.org/D97256
-
KareemErgawy-TomTom authored
This commit is the first baby step towards detensoring in linalg-on-tensors. Detensoring is the process through which a tensor value is convereted to one or potentially more primitive value(s). During this process, operations with such detensored operands are also converted to an equivalen form that works on primitives. The detensoring process is driven by linalg-on-tensor ops. In particular, a linalg-on-tensor op is checked to see whether *all* its operands can be detensored. If so, those operands are converted to thier primitive counterparts and the linalg op is replaced by an equivalent op that takes those new primitive values as operands. This works towards handling github/google/iree#1159. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D96271
-
Mark de Wever authored
Seems line was accidentally left in llvm-svn: 290924 86eebc5b Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D97211
-
Kamlesh Kumar authored
Fix PR46294 Differential Revision: https://reviews.llvm.org/D82014
-
Lang Hames authored
-
Anton Afanasyev authored
-
Mehdi Amini authored
This does not change the behavior directly: the tests only run when `-DMLIR_INCLUDE_INTEGRATION_TESTS=ON` is configured. However running `ninja check-mlir` will not run all the tests within a single lit invocation. The previous behavior would wait for all the integration tests to complete before starting to run the first regular test. The test results were also reported separately. This change is unifying all of this and allow concurrent execution of the integration tests with regular non-regression and unit-tests. Differential Revision: https://reviews.llvm.org/D97241
-
Siva Chandra Reddy authored
-