- Jun 25, 2021
-
-
Alexander Yermolovich authored
Currently when .llvm.call-graph-profile is created by llvm it explicitly encodes the symbol indices. This section is basically a black box for post processing tools. For example, if we run strip -s on the object files the symbol table changes, but indices in that section do not. In non-visible behavior indices point to wrong symbols. The visible behavior indices point outside of Symbol table: "invalid symbol index". This patch changes the format by using R_*_NONE relocations to indicate the from/to symbols. The Frequency (Weight) will still be in the .llvm.call-graph-profile, but symbol information will be in relocation section. In LLD information from both sections is used to reconstruct call graph profile. Relocations themselves will never be applied. With this approach post processing tools that handle relocations correctly work for this section also. Tools can add/remove symbols and as long as they handle relocation sections with this approach informati...
-
William S. Moses authored
This commit moves the type translator from LLVM to MLIR to a public header for use by external projects or other code. Unlike a previous attempt (https://reviews.llvm.org/D104726), this patch moves the type conversion into separate files which remedies the linker error which was only caught by CI. Differential Revision: https://reviews.llvm.org/D104834
-
David Spickett authored
This adds memory tag reading using the new "qMemTags" packet and ptrace on AArch64 Linux. This new packet is following the one used by GDB. (https://sourceware.org/gdb/current/onlinedocs/gdb/General-Query-Packets.html) On AArch64 Linux we use ptrace's PEEKMTETAGS to read tags and we assume that lldb has already checked that the memory region actually has tagging enabled. We do not assume that lldb has expanded the requested range to granules and expand it again to be sure. (although lldb will be sending aligned ranges because it happens to need them client side anyway) Also we don't assume untagged addresses. So for AArch64 we'll remove the top byte before using them. (the top byte includes MTE and other non address data) To do the ptrace read NativeProcessLinux will ask the native register context for a memory tag manager based on the type in the packet. This also gives you the ptrace numbers you need. (it's called a register context but it also has non register data, so it saves adding another per platform sub class) The only supported platform for this is AArch64 Linux and the only supported tag type is MTE allocation tags. Anything else will error. Ptrace can return a partial result but for lldb-server we will be treating that as an error. To succeed we need to get all the tags we expect. (Note that the protocol leaves room for logical tags to be read via qMemTags but this is not going to be implemented for lldb at this time.) Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D95601
-
- Jun 24, 2021
-
-
Florian Hahn authored
-
Nico Weber authored
-
Nicolas Vasilache authored
scf::ForOp bufferization analysis proceeds just like for any other op (including FuncOp) at its boundaries; i.e. if: 1. The tensor operand is inplaceable. 2. The matching result has no subsequent read (i.e. all reads dominate the scf::ForOp). 3. In and does not create a RAW interference. then it can bufferize inplace. Still there are a few differences: 1. bbArgs for an scf::ForOp are always considered inplaceable when seen from ops inside the body. This is because a) either the matching tensor operand is not inplaceable and an alloc will be inserted (which makes bbArg itself inplaceable); or b) the tensor operand and bbArg are both already inplaceable. 2. Bufferization within the scf::ForOp body has implications to the outside world : the scf.yield terminator may well ping-pong values of the same type. This muddies the water for alias analysis and is not supported atm. Such cases result in a pass failure. Differential revision: https://reviews.llvm.org/D104490
-
Sjoerd Meijer authored
-
David Spickett authored
Use %zu to print size_t vars.
-
Saurabh Jha authored
-
David Spickett authored
This feature "memory-tagging+" indicates that lldb-server supports memory tagging packets. (added in a later patch) We check HWCAP2_MTE to decide whether to enable this feature for Linux. Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D97282
-
Nico Weber authored
Everything includes clang/Config/config.h by qualified "clang/Config/config.h" path, so there's no need for `-Igen/clang/include/clang/Config/clang/include`. No behavior change.
-
Tobias Gysi authored
Add an index_dim annotation to specify the shape to loop mapping of shape-only tensors. A shape-only tensor serves is not accessed withing the body of the operation but is required to span the iteration space of certain operations such as pooling. Differential Revision: https://reviews.llvm.org/D104767
-
David Spickett authored
This adds the MemoryTagManager class and a specialisation of that class for AArch64 MTE tags. It provides a generic interface for various tagging operations. Adding/removing tags, diffing tagged pointers, etc. Later patches will use this manager to handle memory tags in generic code in both lldb and lldb-server. Since it will be used in both, the base class header is in lldb/Target. (MemoryRegionInfo is another example of this pattern) Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D97281
-
Brendon Cahoon authored
Differential Revision: https://reviews.llvm.org/D104245
-
Florian Hahn authored
This patch handles sinking a replicate region after another replicate region. In that case, we can connect the sink region after the target region. This properly handles the case for which an assertion has been added in 337d7652. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34842. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D103514
-
Tobias Gysi authored
Extend the yaml code generation to support the index attributes that https://reviews.llvm.org/D104711 added to the OpDSL. Differential Revision: https://reviews.llvm.org/D104712
-
Stephen Tozer authored
This patch enables the salvaging of debug values that may be calculated from more than one SSA value, such as with binary operators that do not use a constant argument. The actual functionality for this behaviour is added in a previous commit (c7270567), but with the ability to actually emit the resulting debug values switched off. The reason for this is that the prior patch has been reverted several times due to issues discovered downstream, some time after the actual landing of the patch. The patch in question is rather large and touches several widely used header files, and all issues discovered are more related to the handling of variadic debug values as a whole rather than the details of the patch itself. Therefore, to minimize the build time impact and risk of conflicts involved in any potential future revert/reapply of that patch, this significantly smaller patch (that touches no header files) will instead be used as the capstone to enable variadic debug value salvaging. The review linked to this patch is mostly implemented by the previous commit, c7270567, but also contains the changes in this patch. Differential Revision: https://reviews.llvm.org/D91722
-
David Green authored
As a minor adjustment to the existing lowering of offset scatters, this extends any smaller-than-legal vectors into full vectors using a zext, so that the truncating scatters can be used. Due to the way MVE legalizes the vectors this should be cheap in most situations, and will prevent the vector from being scalarized. Differential Revision: https://reviews.llvm.org/D103704
-
Roman Lebedev authored
-
Jay Foad authored
Change --max-timeline-cycles=0 to mean no limit on the number of cycles. Use this in AMDGPU tests to show all instructions in the timeline view instead of having it arbitrarily truncated. Differential Revision: https://reviews.llvm.org/D104846
-
Florian Hahn authored
It looks like the fold introduced in 63f3383e can cause crashes if the type of the bitcasted value is not a valid vector element type, like x86_mmx. To resolve the crash, reject invalid vector element types. The way it is done in the patch is a bit clunky. Perhaps there's a better way to check? Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D104792
-
Florian Hahn authored
This patch generalizes MatchBinaryAddToConst to support matching (A + C1), (A + C2), instead of just matching (A + C1), A. The existing cases can be handled by treating non-add expressions A as A + 0. Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D104634
-
Rosie Sumpter authored
OR, XOR and AND entries are added to the cost table. An extra cost is added when vector splitting occurs. This is done to address the issue of a missed SLP vectorization opportunity due to unreasonably high costs being attributed to the vector Or reduction (see: https://bugs.llvm.org/show_bug.cgi?id=44593). Differential Revision: https://reviews.llvm.org/D104538
-
Nicolas Vasilache authored
This test shows how convert-linalg-to-std rewrites named linalg ops as library calls. This can be coupled with a C++ shim to connect to existing libraries such as https://gist.github.com/nicolasvasilache/691ef992404c49dc9b5d543c4aa6db38. Everything can then be linked together with mlir-cpu-runner and MLIR can call C++ (which can itself call MLIR if needed). This should evolve into specific rewrite patterns that can be applied on op instances independently rather than having to use a full conversion. Differential Revision: https://reviews.llvm.org/D104842
-
Muhammad Omair Javaid authored
sanitize-coverage-old-pm.c started failing on arm 32 bit where underlying architecture reported is armv8l fore 32bit arm. This patch XFAILS sanitize-coverage-old-pm.c on armv8l similar to armv7 and thumbv7.
-
Simon Pilgrim authored
select (cmpeq Cond0, Cond1), LHS, (select (cmpugt Cond0, Cond1), LHS, Y) --> (select (cmpuge Cond0, Cond1), LHS, Y) etc, We already perform this fold in DAGCombiner for MVT::i1 comparison results, but these can still appear after legalization (in x86 case with MVT::i8 results), where we need to be more careful about generating new comparison codes. Pulled out of D101074 to help address the remaining regressions. Differential Revision: https://reviews.llvm.org/D104707
-
Sander de Smalen authored
This also adds new interfaces for the fixed- and scalable case: * LLT::fixed_vector * LLT::scalable_vector The strategy for migrating to the new interfaces was as follows: * If the new LLT is a (modified) clone of another LLT, taking the same number of elements, then use LLT::vector(OtherTy.getElementCount()) or if the number of elements is halfed/doubled, it uses .divideCoefficientBy(2) or operator*. That is because there is no reason to specifically restrict the types to 'fixed_vector'. * If the algorithm works on the number of elements (as unsigned), then just use fixed_vector. This will need to be fixed up in the future when modifying the algorithm to also work for scalable vectors, and will need then need additional tests to confirm the behaviour works the same for scalable vectors. * If the test used the '/*Scalable=*/true` flag of LLT::vector, then this is replaced by LLT::scalable_vector. Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D104451
-
Roman Lebedev authored
Based ontop of D104598, which is a NFCI-ish refactoring. Here, a restriction, that only empty blocks can be merged, is lifted. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D104597
-
Roman Lebedev authored
It appears the change needed in D104597 is minimal and obvious, so let's not make them so verbose.
-
Tobias Gysi authored
Extend the OpDSL with index attributes. After tensors and scalars, index attributes are the third operand type. An index attribute represents a compile-time constant that is limited to index expressions. A use cases are the strides and dilations defined by convolution and pooling operations. The patch only updates the OpDSL. The C++ yaml codegen is updated by a followup patch. Differential Revision: https://reviews.llvm.org/D104711
-
Denys Petrov authored
Summary: It's not able to reproduce the issue (https://bugs.llvm.org/show_bug.cgi?id=46264) for the latest sources. Add a reported test case to try to catch the problem if occur es. Differential Revision: https://reviews.llvm.org/D104381 Prevent: https://bugs.llvm.org/show_bug.cgi?id=46264
-
Fraser Cormack authored
This patch optimizes the code generation of vector-type SELECTs (LLVM select instructions with scalar conditions) by custom-lowering to VSELECTs (LLVM select instructions with vector conditions) by splatting the condition to a vector. This avoids the default expansion path which would either introduce control flow or fully scalarize. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D104772
-
Abid Malik authored
This includes a basic implementation for the OpenMP target operation. Currently, the if, thread_limit, private, shared, device, and nowait clauses are included in this implementation. Co-authored-by:
Kiran Chandramohan <kiran.chandramohan@arm.com> Reviewed By: ftynse, kiranchandramohan Differential Revision: https://reviews.llvm.org/D102816
-
Florian Mayer authored
Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D104463
-
Stephen Tozer authored
Partial Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands" This is a partial reapply of the original commit and the followup commit that were previously reverted; this reapply also includes a small fix for a potential source of non-determinism, but also has a small change to turn off variadic debug value salvaging, to ensure that any future revert/reapply steps to disable and renable this feature do not risk causing conflicts. Differential Revision: https://reviews.llvm.org/D91722 This reverts commit 386b66b2.
-
Florian Hahn authored
-
Dmitry Vyukov authored
The comment says it was flaky in 2016, but it wasn't possible to debug it back then. Re-enable the test at least on linux/x86_64. It will either work, or at least we should see failure output from lit today. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104592
-
Dmitry Vyukov authored
Mmap interceptor is not atomic in the sense that it exposes unmapped shadow for a brief period of time. This breaks programs that mmap over another mmap and access the region concurrently. Don't unmap shadow in the mmap interceptor to fix this. Just mapping new shadow on top should be enough to zero it. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104593
-
Vitaly Buka authored
-
Vitaly Buka authored
-