- Dec 30, 2021
-
-
Sanjay Patel authored
-
MaheshRavishankar authored
[mlir][MemRef] Deprecate unspecified trailing offset, size, and strides semantics of `OffsetSizeAndStrideOpInterface`. The semantics of the ops that implement the `OffsetSizeAndStrideOpInterface` is that if the number of offsets, sizes or strides are less than the rank of the source, then some default values are filled along the trailing dimensions (0 for offset, source dimension of sizes, and 1 for strides). This is confusing, especially with rank-reducing semantics. Immediate issue here is that the methods of `OffsetSizeAndStridesOpInterface` assumes that the number of values is same as the source rank. This cause out-of-bounds errors. So simplifying the specification of `OffsetSizeAndStridesOpInterface` to make it invalid to specify number of offsets/sizes/strides not equal to the source rank. Differential Revision: https://reviews.llvm.org/D115677
-
Krzysztof Parzyszek authored
There can only be one permute operations per packet, so this actually pessimizes the code (due to the extra "or").
-
Joshua Herrera authored
For vectors with repeating values, old codegen would rotate and insert every duplicate element. This patch replaces that behavior with a splat of the most common element, vinsert/vror only occur when needed.
-
William S. Moses authored
Expose the powi intrinsic to the LLVM dialect within MLIR Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D116364
-
Florian Hahn authored
The code path can only be reached when folding the tail, so turn the check into an assertion.
-
Craig Topper authored
-
Krzysztof Parzyszek authored
They are the same as for the other HVX vectors, but types need to be listed explicitly. Also, add a detailed codegen testcase. Co-authored-by:Abhikrant Sharma <quic_abhikran@quicinc.com>
-
Kazu Hirata authored
Identified with readability-const-return-type.
-
Kazu Hirata authored
Identified with modernize-use-nullptr.
-
Kazu Hirata authored
-
- Dec 29, 2021
-
-
Nuno Lopes authored
This enables more simplifications and gets us closer to removing undef. ping @alinas
-
Krzysztof Parzyszek authored
Co-authored-by:Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
-
Krzysztof Parzyszek authored
-
Nuno Lopes authored
ping @alinas
-
Mariya Podchishchaeva authored
Adds diagnosing on attempt to use zero length arrays, pointers, refs, arrays of them and structs/classes containing all of it. In case a struct/class with zero length array is used this emits a set of notes pointing out how zero length array got into used struct, like this: ``` struct ContainsArr { int A[0]; // note: field of illegal type declared here }; struct Wrapper { ContainsArr F; // note: within field of type ContainsArr declared here // ... } // Device code Wrapper W; W.use(); // error: zero-length arrays are not permitted ``` Total deep check of each used declaration may result in double diagnosing at the same location. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D114080 -
Sam McCall authored
-
Sam McCall authored
This reverts commit 6d09aaec. The test uses ulimit and ran into problems on some bots. Run on linux only. There's nothing platform-specific about the code we're testing, so this should be enough to ensure correctness.
-
Sjoerd Meijer authored
-
Pavel Labath authored
The MonitorCallback function was assuming that the "exited" argument is set whenever a thread exits, but the caller was only setting that flag for the main thread. This patch deletes the argument altogether, and lets MonitorCallback compute what it needs itself. This is almost NFC, since previously we would end up in the "GetSignalInfo failed for unknown reasons" branch, which was doing the same thing -- forgetting about the thread.
-
PoYao Chang authored
Remove the Mangled::operator! and Mangled::operator void* where the comments in header and implementation files disagree and replace them with operator bool. This fix PR52702 as https://reviews.llvm.org/D106837 used the buggy Mangled::operator! in Symbol::SynthesizeNameIfNeeded. For example, consider the symbol "puts" in a hello world C program: // Inside Symbol::SynthesizeNameIfNeeded (lldb) p m_mangled (lldb_private::Mangled) $0 = (m_mangled = None, m_demangled = "puts") (lldb) p !m_mangled (bool) $1 = true # should be false!! This leads to Symbol::SynthesizeNameIfNeeded overwriting m_demangled part of Mangled (in this case "puts"). In conclusion, this patch turns callq 0x401030 ; symbol stub for: ___lldb_unnamed_symbol36 back into callq 0x401030 ; symbol stub for: puts . Differential Revision: https://reviews.llvm.org/D116217
-
Pavel Labath authored
Now that we are caching the dwarf index as well, we will always have more than one cache file (when not using accelerator tables). I have adjusted the test to check for the presence of one _symtab_ index.
-
Pavel Labath authored
Multithreaded applications using fork(2) need to be extra careful about what they do in the fork child. Without any special precautions (which only really work if you can fully control all threads) they can only safely call async-signal-safe functions. This is because the forked child will contain snapshot of the parents memory at a random moment in the execution of all of the non-forking threads (this is where the similarity with signals comes in). For example, the other threads could have been holding locks that can now never be released in the child process and any attempt to obtain them would block. This is what sometimes happen when using tcmalloc -- our fork child ends up hanging in the memory allocation routine. It is also what happened with our logging code, which is why we added a pthread_atfork hackaround. This patch implements a proper fix to the problem, by which is to make the child code async-signal-safe. The ProcessLaunchInfo structure is transformed into a simpler ForkLaunchInfo representation, one which can be read without allocating memory and invoking complex library functions. Strictly speaking this implementation is not async-signal-safe, as it still invokes library functions outside of the posix-blessed set of entry points. Strictly adhering to the spec would mean reimplementing a lot of the functionality in pure C, so instead I rely on the fact that any reasonable implementation of some functions (e.g., basic_string::c_str()) will not start allocating memory or doing other unsafe things. The new child code does not call into our logging infrastructure, which enables us to remove the pthread_atfork call from there. Differential Revision: https://reviews.llvm.org/D116165
-
Chuanqi Xu authored
The root cause for the crash is the incorrect use of `cast`. The actual type and cast-to type is different. This patch fixes the crash by converting the `cast` to `dyn_cast`.
-
Kazu Hirata authored
Identified with llvm-header-guard.
-
Kazu Hirata authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
This reverts commit 73ece231 and reapplies 7bfcdbcb with mlir changes. Also reverts commit 423ba129 and includes the unit test changes of 16da2140.
-
Mehdi Amini authored
This reverts commit 16da2140. Revert unit-test API update after previous revert of the API change.
-
Mehdi Amini authored
This reverts commit 7bfcdbcb. Broke MLIR build
-
Kazu Hirata authored
This patch fixes: mlir/include/mlir/Tools/PDLL/AST/Types.h:54:3: error: definition of implicit copy assignment operator for 'Type' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy]
-
Johannes Doerfert authored
AAPointerInfo, and thereby other places, can look already through internal global and stack memory. This patch enables them to look through heap memory returned by functions with a `noalias` return. In the future we can look through `noalias` arguments as well but that will require AAIsDead to learn that such memory can be inspected by the caller later on. We also need teach AAPointerInfo about dominance to actually deal with memory that might not be `null` or `undef` initialized. D106397 is a first step in that direction already. Reviewed By: kuter Differential Revision: https://reviews.llvm.org/D109170
-
Johannes Doerfert authored
Similar to loads, we want to be aggressive when it comes to store simplification. Not everything in LLVM handles dead stores well when address space casts are involved, we can simply ask the Attributor to do it for us though. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D109998
-
Johannes Doerfert authored
-
Johannes Doerfert authored
-
Johannes Doerfert authored
One of the unused ident_t fields now holds the size of the string (=const char *) field so we have an easier time dealing with those in the future. Differential Revision: https://reviews.llvm.org/D113126
-
Johannes Doerfert authored
While we skipped uses in stores if we can find all copies of the value when the memory is loaded, we did not correlate the use in the store with the use in the load. So far this lead to less precise results in the offset calculations which prevented deductions. With the new EquivalentUseCB callback argument the user of checkForAllUses can be informed of the correlation and act on it appropriately. Differential Revision: https://reviews.llvm.org/D109662
-
Johannes Doerfert authored
-
Johannes Doerfert authored
Issue #52875 reported non-determinism, this is the first step to avoid it. We iterate over MallocCalls so we should keep the order stable.
-
Johannes Doerfert authored
-