- Dec 05, 2023
-
-
Mikhail Goncharov authored
-
Andrzej Warzyński authored
Updates patterns for flattening `vector.transfer_read` by relaxing the requirement that the "collapsed" indices are all zero. This enables collapsing cases like this one: ```mlir %2 = vector.transfer_read %arg4[%c0, %arg0, %arg1, %c0] ... : memref<1x43x4x6xi32>, vector<1x2x6xi32> ``` Previously only the following case would be consider for collapsing (all indices are 0): ```mlir %2 = vector.transfer_read %arg4[%c0, %c0, %c0, %c0] ... : memref<1x43x4x6xi32>, vector<1x2x6xi32> ``` Also adds some new comments and renames the `firstContiguousInnerDim` parameter as `firstDimToCollapse` (the latter better matches the actual meaning). Similar updates for `vector.transfer_write` will be implemented in a follow-up patch. -
Ramkumar Ramachandra authored
Follow up on a post-commit review of 9468de48 (TargetInstrInfo: make getOperandLatency return optional (NFC)) by Bjorn Pettersson to fix a couple of things that are not NFC: - std::optional<T>::operator<= returns true if the first operand is a std::nullopt and second operand is T. Fix a couple of places where we assumed it would return false. - In TargetSchedule, computeInstrCost could take another codepath, returning InstrLatency instead of DefaultDefLatency. Fix one instance not accounting for this behavior.
-
Phoebe Wang authored
-
Brad Smith authored
Also eliminate an unused variable while here.
-
Yonggang Luo authored
[clang] Fixes compile error that double colon operator cannot resolve macro with parentheses. (#68618) Error message: ``` In file included from ../src/amd/addrlib/src/core/addrobject.h:21: ../src/amd/addrlib/src/core/addrcommon.h:343:13: error: expected unqualified-id out = ::_tzcnt_u32(mask); ^ /usr/lib/llvm-15/lib/clang/15.0.6/include/bmiintrin.h:74:27: note: expanded from macro '_tzcnt_u32' #define _tzcnt_u32(a) (__tzcnt_u32((a))) ``` This is because both GCC/Clang doesn't support compiling the following code: ``` #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif int f(int a) { return ::(_tzcnt_u32)(a); } ``` This is because the return statement expects an expression or braced init list: http://eel.is/c++draft/stmt.jump#general-1 but we really only need to care about the expression form (there's no braces in sight). Grammatically, the leading :: will parse as a qualified-id because it matches the production for nested-name-specifier: http://eel.is/c++draft/expr.prim.id.qual#nt:qualified-id That needs to be followed by an unqualified-id (http://eel.is/c++draft/expr.prim.id.unqual#nt:unqualified-id), but the open paren does not match any of the grammar productions, so this is a syntax error. Closes: https://github.com/llvm/llvm-project/issues/64467 Signed-off-by:Yonggang Luo <luoyonggang@gmail.com>
-
Amy Wang authored
This PR creates the wrapper class AffineForOp and adds a testcase for it. A testcase for the AffineLoadOp is also added.
-
Craig Topper authored
The explicit 'align 4' caused the pointers to be underaligned on RV64.
-
Danila Malyutin authored
Specify their restrictions w.r.t. `align` attribute.
-
Vlad Serebrennikov authored
This patch continues the work started with ea5b1ef0. See that commit and its corresponding PR for details.
-
Brad Smith authored
-
Joshua Cao authored
There is support for intrinsics in Instruction::isCommunative, but there is no equivalent implementation for isAssociative. This patch builds support for associative intrinsics with TRE as an application. TRE can now have associative intrinsics as an accumulator. For example: ``` struct Node { Node *next; unsigned val; } unsigned maxval(struct Node *n) { if (!n) return 0; return std::max(n->val, maxval(n->next)); } ``` Can be transformed into: ``` unsigned maxval(struct Node *n) { struct Node *head = n; unsigned max = 0; // Identity of unsigned std::max while (true) { if (!head) return max; max = std::max(max, head->val); head = head->next; } return max; } ``` This example results in about 5x speedup in local runs. We conservatively only consider min/max and as associative for this patch to limit testing scope. There are probably other intrinsics that could be considered associative. There are a few consumers of isAssociative() that could be impacted. Testing has only required to Reassociate pass be updated. -
Joshua Cao authored
-
Brad Smith authored
This reverts commit 3223936d. Commited by accident while mixed in with another commit.
-
Brad Smith authored
-
Brad Smith authored
-
Philip Reames authored
This option enables an experimental lowering for unordered atomics I worked on a few years back. It never reached production quality, and hasn't been worked on in years. So let's rip it out. This wasn't a crazy idea, but I hit some stumbling block which prevented me from pushing it across the finish line. From the look of 027aa27d, that change description is probably a good summary. I don't remember the details any longer.
-
Matt Arsenault authored
It's allowed to rematerialize instructions with implicit-defs of the same register as the single explicit def. If this happened, it was only clearing the dead flags on the one main result.
-
Ruiling, Song authored
-
Ruiling Song authored
-
Matthias Springer authored
Fixes a bug in `SplitDeallocWhenNotAliasingAnyOther`. This pattern used to generate invalid IR (op dominance error). We never noticed this bug in existing test cases because other patterns and/or foldings were applied afterwards and those rewrites "fixed up" the IR again. (The bug is visible when running `mlir-opt -debug`.) Also add additional comments to the implementation and simplify the code a bit. Apart from the fixed dominance error, this change is NFC. Without this change, buffer deallocation tests will fail when running with #74270.
-
Lang Hames authored
HeaderAddr shouldn't be a member variable of MachOPlatformPlugin: there's only one plugin instance shared between all JITDylibs, so the shared HeaderAddr will be overwritten in an unpredictable and unsafe way. We haven't seen any issues due to this yet, but it triggered failures during testing of an upcoming llvm-jitlink patch (e.g. ORC-RT test Darwin/x86-64/jit-re-dlopen-trivial.S). This patch pre-fixes the issue in advance of the llvm-jitlink patch landing. This patch also removes some stale debugging output in MachOPlatform.
-
Mehdi Amini authored
This isn't yet a guide on how to do stacked PRs.
-
Kevin Frei authored
@nico pointed out that my usage of `std::shared_mutex` broke builds on older macOS devices. Switching to `llvm::sys::RWMutex` is the solution that they provided. Tracked in issue #74382 Co-authored-by:Kevin Frei <freik@meta.com>
-
Younan Zhang authored
We used to assume that the CXXRecordDecl passed to the 1st argument always had a definition. This is not true since a pointer to an incomplete type was not excluded. Fixes https://github.com/llvm/llvm-project/issues/63506
-
hev authored
This adds a per-global code model attribute, which can override the target's code model to access global variables. Suggested-by:
Arthur Eubanks <aeubanks@google.com> Link: https://discourse.llvm.org/t/how-to-best-implement-code-model-overriding-for-certain-values/71816 Link: https://discourse.llvm.org/t/rfc-add-per-global-code-model-attribute/74944
-
Matthias Springer authored
When two `complex.bitcast` ops are folded and the resulting bitcast is a non-complex -> non-complex bitcast, an `arith.bitcast` should be generated. Otherwise, the generated `complex.bitcast` op is invalid. Also remove a pattern that convertes non-complex -> non-complex `complex.bitcast` ops to `arith.bitcast`. Such `complex.bitcast` ops are invalid and should not appear in the input. Note: This bug can only be triggered by running with `-debug` (which will should intermediate IR that does not verify) or with `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS` (#74270).
-
Lu Weining authored
psABI v2.20 added R_LARCH_CALL36 and removed R_LARCH_DELETE / R_LARCH_CFA. R_LARCH_CALL36 was designed for function call on medium code model where the 2 instructions (pcaddu18i + jirl) must be adjacent.
-
Johannes Doerfert authored
We accessed the `Devices` container most of the time while holding the RTLsMtx, but not always. Sometimes we used the mutex for the size query, but then accessed Devices again unguarded. From now we properly encapsulate the container in a ProtectedObj which ensures exclusive accesses. We also hide the "isReady" part in the `getDevice` accessor and use an `llvm::Expected` to allow to return errors.
-
zhongyunde 00443407 authored
When all the large const offsets masked with the same value from bit-12 to bit-23. Fold add x8, x0, #2031, lsl #12 add x8, x8, #960 ldr x9, [x8, x8] ldr x8, [x8, #2056] into add x8, x0, #2031, lsl #12 ldr x9, [x8, #960] ldr x8, [x8, #3016]
-
zhongyunde 00443407 authored
-
Brad Smith authored
lldb/source/Host/netbsd/HostInfoNetBSD.cpp:48:8: warning: unused variable 'osrev_str' [-Wunused-variable] char osrev_str[12]; ^ 1 warning generated. -
michaelrj-google authored
The printf float to string conversion functions had some implicit integer conversion warnings on gcc. This patch adds explicit casts to these places.
-
Owen Pan authored
Re-implement ObjCPropertyAttributeOrder using std::set for sorting and removing duplicates. (We can't use llvm::SmallSet because it's unordered.)
-
stephenpeckham authored
This works around an AIX assembler and linker bug. If the -fno-integrated-as and -frecord-command-line options are used but there's no actual code in the source file, the assembler creates an object file with only an .info section. The AIX linker rejects such an object file.
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Vitaly Buka authored
-