- May 25, 2023
-
-
Marco Elver authored
Showing __interceptor_ as part of the function name in reports does not make sense and is distracting. Strip the interceptor function name before printing. Reviewed By: dvyukov, vitalybuka Differential Revision: https://reviews.llvm.org/D151343
-
Marco Elver authored
Rather than having every tool pass the right interceptor prefix, just move this logic into RenderFrame(). Note that currently there are a few cases where due to aliasing the intercepted function -> interceptor, the unwinder sees the intercepted function - however this is never guaranteed. In a later change this becomes more apparent, and other non-tsan sanitizer tests would fail as well. By making the default RenderFrame() strip interceptor prefixes, we don't rely on the linker aliasing preferences. Reviewed By: dvyukov, vitalybuka, MaskRay Differential Revision: https://reviews.llvm.org/D151319
-
Marco Elver authored
The Linux and *BSD interceptors are almost identical, except for *BSD, where the overridden intercepted function is not defined weak due to some incompliant linker behaviour. Since most of the interception machinery is shared between Linux and *BSD (see INTERCEPT_FUNCTION macro), it makes sense to unify interceptor definition and declarations as much as possible to ease future changes. NFC. Reviewed By: dvyukov, vitalybuka Differential Revision: https://reviews.llvm.org/D151318
-
Marco Elver authored
This introduces macros for asm sources to define trampolines, and aliases to trampolines. Because we currently do not yet have any real trampolines, this change is a NFC. Reviewed By: dvyukov, vitalybuka Differential Revision: https://reviews.llvm.org/D151317
-
Marco Elver authored
To make the interceptor implementation more flexible, allowing for 2 levels of indirection instead of just 1 in the current scheme (where the intercepted function aliases the interceptor implementation), introduce the notion of an interceptor "trampoline". A trampoline may be a real function (and not just an alias, where aliases of aliases do not work), which will simply forward to the interceptor implementation; the intercepted function will then alias the trampoline: func -[alias]-> trampoline -[call]-> interceptor Make the necessary changes to prepare for introducing real trampolines. This change does not yet introduce any real trampolines, and so trampoline == interceptor, and we currently still just have: func -[alias]-> interceptor NFC. Reviewed By: dvyukov, vitalybuka, MaskRay Differential Revision: https://reviews.llvm.org/D151316
-
Jean Perier authored
Generate temporary storage inside WHERE and FORALL using the temporary stack runtime. This covers all cases outside of LHS temporary, where the descriptor stack will have to be used. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D151251
-
Jean Perier authored
Generate temporary storage inline inside WHERE and FORALL when possible. A following patch will use the runtime to cover the generic cases. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D151247
-
Serguei Katkov authored
Reviewed By: anna Differential Revision: https://reviews.llvm.org/D151082
-
Cullen Rhodes authored
This patch adds a pass 'enable-arm-streaming' that enables the Armv9 Scalable Matrix Extension (SME) Streaming SVE (SSVE) mode [1] by adding either of the following attributes to 'func.func' ops: * arm_streaming (default) * arm_locally_streaming PATCH [2 / 2] in series for RFC: https://discourse.llvm.org/t/rfc-supporting-armv9-scalable-matrix-extension-sme-streaming-sve-ssve-mode-in-mlir/70678 [1] https://developer.arm.com/documentation/ddi0616/aa Reviewed By: awarzynski, dcaballe Differential Revision: https://reviews.llvm.org/D150934
-
Cullen Rhodes authored
This patch adds two optional attributes to 'llvm.func' op for the Armv9 Streaming SVE (SSVE) mode [1] that map 1-1 with LLVM function attributes [2]: * arm_streaming -> aarch64_pstate_sm_enabled * arm_locally_streaming -> aarch64_pstate_sm_body Streaming-mode is part of the interface (ABI) for functions with the first attribute and it's the responsibility of the caller to manage PSTATE.SM on entry/exit to functions with this attribute [3]. The LLVM backend will emit 'smstart sm' / 'smstop sm' [4] around calls to streaming functions. In locally streaming functions PSTATE.SM is kept internal and managed by the callee on entry/exit. The LLVM backend will emit 'smstart sm' / 'smstop sm' in the prologue / epilogue for functions with this attribute. The integration test for SSVE has been updated to no longer use the passthrough mechanism that's intended for prototyping. PATCH [1 / 2] in series for RFC: https://discourse.llvm.org/t/rfc-supporting-armv9-scalable-matrix-extension-sme-streaming-sve-ssve-mode-in-mlir/70678 [1] https://developer.arm.com/documentation/ddi0616/aa [2] https://llvm.org/docs/AArch64SME.html#introduction [3] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#671pstatesm-interfaces [4] https://developer.arm.com/documentation/ddi0602/2023-03/Base-Instructions/SMSTART--Enables-access-to-Streaming-SVE-mode-and-SME-architectural-state--an-alias-of-MSR--immediate-- Reviewed By: awarzynski, dcaballe, WanderAway Differential Revision: https://reviews.llvm.org/D150932
-
Tobias Hieta authored
-
Tobias Hieta authored
This is an ongoing series of commits that are reformatting our Python code. This catches the last of the python files to reformat. Since they where so few I bunched them together. Reformatting is done with `black`. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Reviewed By: jhenderson, #libc, Mordante, sivachandra Differential Revision: https://reviews.llvm.org/D150784
-
Tobias Hieta authored
-
Tobias Hieta authored
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black`. If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. If you run into any problems, post to discourse about it and we will try to help. RFC Thread below: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Reviewed By: #libc, kwk, Mordante Differential Revision: https://reviews.llvm.org/D150763
-
Nikita Popov authored
This reverts commit b6655137. This has exposed a pre-existing miscompile, reported in https://reviews.llvm.org/D150769#4370467.
-
Douglas Yung authored
This reverts commit ee6b08e9. One of the added tests warn-unsafe-buffer-usage-multi-decl-warnings.cpp does not seem to be deterministic, and seems to be especially problematic on Windows. Failures of this one test on llvm-clang-x86_64-sie-win: - https://lab.llvm.org/buildbot/#/builders/216/builds/21758 - https://lab.llvm.org/buildbot/#/builders/216/builds/21761 - https://lab.llvm.org/buildbot/#/builders/216/builds/21762 - https://lab.llvm.org/buildbot/#/builders/216/builds/21765 - https://lab.llvm.org/buildbot/#/builders/216/builds/21770 - https://lab.llvm.org/buildbot/#/builders/216/builds/21771 - https://lab.llvm.org/buildbot/#/builders/216/builds/21773 - https://lab.llvm.org/buildbot/#/builders/216/builds/21776 - https://lab.llvm.org/buildbot/#/builders/216/builds/21777 - https://lab.llvm.org/buildbot/#/builders/216/builds/21778 - https://lab.llvm.org/buildbot/#/builders/216/builds/21779 Other random bot failures: - https://lab.llvm.org/buildbot/#/builders/65/builds/9821 - https://lab.llvm.org/buildbot/#/builders/65/builds/9822 - https://lab.llvm.org/buildbot/#/builders/65/builds/9824 - https://lab.llvm.org/buildbot/#/builders/119/builds/13440 - https://lab.llvm.org/buildbot/#/builders/119/builds/13442 - https://lab.llvm.org/buildbot/#/builders/119/builds/13444 - https://lab.llvm.org/buildbot/#/builders/119/builds/13445 - https://lab.llvm.org/buildbot/#/builders/60/builds/12156 - https://lab.llvm.org/buildbot/#/builders/60/builds/12157 - https://lab.llvm.org/buildbot/#/builders/60/builds/12160
-
Alexandros Lamprineas authored
To do so we have to tweak the cost model such that specialization does not trigger excessively. Differential Revision: https://reviews.llvm.org/D150649
-
Martin Braenne authored
This patch changes the way `Environment::ReturnLoc` is set: Whereas previously it was set by the caller, it is now set by the callee (obviously, as we otherwise would not be able to return references). The patch also introduces `Environment::ReturnVal`, which is used for non-reference-type return values. This allows these to be handled with the correct value category semantics; see also https://discourse.llvm.org/t/70086, which describes the ongoing migration to strict value category semantics. Depends On D150776 Reviewed By: ymandel, xazax.hun Differential Revision: https://reviews.llvm.org/D151194
-
Luke Lau authored
Even though we only need to write to the bottom NumElts - Rotation elements for the vslidedown.vi, we can save an extra vsetivli toggle if we just keep the wide VL. (I may be missing something here: is there a reason why we want to explicitly keep the vslidedown narrow?) Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D151390
-
sgokhale authored
This is an attempt to reland D42600 and enabling this optimisation by default. This also resolves the issue pointed out in the context of PGO build. Differential Revision: https://reviews.llvm.org/D42600
-
Simon Tatham authored
Function pointers are checked by loading a prefix structure from just before the function's entry point. However, on Arm, the function pointer is not always exactly equal to the address of the entry point, because Thumb function pointers have the low bit set to tell the BX instruction to enter them in Thumb state. So the generated code loads from an odd address and suffers an alignment fault. Fixed by clearing the low bit of the function pointer before subtracting 8. Differential Revision: https://reviews.llvm.org/D151308
-
Nikita Popov authored
Implement precise nuw/nsw support in the KnownBits implementation, replacing the rather crude handling in ValueTracking. Differential Revision: https://reviews.llvm.org/D151208
-
John Demme authored
`MemRefMemorySlot.cpp` had two unused includes without a cmake dependency on the dialects they were in. Led to build failures.
-
Nikita Popov authored
This exposed an issue in SCEVExpander/LCSSA, which has been fixed in D150681. ----- As far as I understand, the IsAvailableOnEntry() function basically implements the same functionality as the properlyDominates() block disposition. The primary difference (apart from a weaker implementation) seems to be in this comment at the top: // Checks if the SCEV S is available at BB. S is considered available at BB // if S can be materialized at BB without introducing a fault. However, I don't really understand why there would be such a requirement. It's my understanding that SCEV explicitly does not care about trapping udiv instructions itself, and it's the job of SCEVExpander's isSafeToExpand() to make sure these don't get expanded if they may trap. Differential Revision: https://reviews.llvm.org/D149344 -
Kadir Cetinkaya authored
We can get stale source locations from preamble, make sure we don't access those locations without checking first. Fixes https://github.com/clangd/clangd/issues/1636. Differential Revision: https://reviews.llvm.org/D151321
-
Nikita Popov authored
SCEVExpander keeps track of all instructions it inserted. However, it currently misses some phi nodes created during LCSSA construction. Fix this by collecting these into another argument. This also removes the IRBuilder argument, which was added for essentially the same purpose, but only handles the root LCSSA nodes, not those inserted by SSAUpdater. This was reported as a regression on D149344, but the reduced test case also reproduces without it. Differential Revision: https://reviews.llvm.org/D150681
-
Mehdi Amini authored
The bytecode reader didn't handle properly the case where resource names conflicted and were renamed, leading to orphan handles in the IR as well as overwriting the exiting resources. Differential Revision: https://reviews.llvm.org/D151408
-
Mehdi Amini authored
This just simplifies user code. Differential Revision: https://reviews.llvm.org/D151407
-
Mehdi Amini authored
At the moment we accept (in tests) unregistered dialects and in particular: "new_processor_id_and_range"() where there is no `.` separator. We probably will remove support for this from the parser, but for now we're adding compatibility support in the reader. Differential Revision: https://reviews.llvm.org/D151386
-
Matthias Springer authored
There are `clone` overloads that take a shape as a parameter. These overloads are guaranteed to return a ranked shaped type. `TensorType::clone`/`BaseMemRefType::clone` used to always return a `TensorType`/`BaseMemRefType`. The variants that take a shape parameter now return a `RankedTensorType`/`MemRefType`. Better static type information can make extra casts at the call site obsolete. E.g.: ``` {TensorType/RankedTensorType} t; t.clone({1, 2}) // now returns RankedTensorType instead of TensorType ``` Also improve documentation for `clone`. Differential Revision: https://reviews.llvm.org/D150865 -
wangpc authored
The decoding parts are reduplicative, we add a macro to simplify the code. Reviewed By: craig.topper, kito-cheng Differential Revision: https://reviews.llvm.org/D151309
-
Hristo Hristov authored
Removed `inline` specifier for consistency as discussed in D148416 previously. Reviewed By: #libc, Mordante Differential Revision: https://reviews.llvm.org/D151248
-
Martin Braenne authored
This is the most common use case, so it makes sense to have a specific overload for it. Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D151183
-
Matthias Springer authored
Encapsulate all worklist-related functionality in a separate `Worklist` class. This makes the remaining code more readable and allows for custom worklist implementations (e.g., a randomized worklist for fuzzing pattern application: D142447). Differential Revision: https://reviews.llvm.org/D151345
-
Petr Hosek authored
This option was introduced in GNU ld in https://sourceware.org/legacy-ml/binutils/2015-06/msg00086.html and is often used in embedded development. This change implements this option in LLD matching the GNU ld output verbatim. Differential Revision: https://reviews.llvm.org/D150644
-
Matthias Springer authored
Incorrect API usage was detected by `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS`. Differential Revision: https://reviews.llvm.org/D151302
-
eopXD authored
This commit updates all intrinsics under `clang/test/CodeGen/RISCV/rvv-intrinsics-autogenerated` because the new script of `update_llc_test_checks.py` is generating many new lines differently. This NFC commit updates the test cases in a whole batch. Signed-off by: eop Chen <eop.chen@sifive.com>
-
Siva Chandra Reddy authored
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D151354
-
Siva Chandra Reddy authored
We want to do this so that build system like ninja don't end up running the hermetic and unit tests in parallel. Running in parallel can cause problems for tests which read/write disk files as the hermetic and unit tests can end up stepping on each other. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D151291
-
Shao-Ce SUN authored
This patch was split from D122918 . Co-Author: @StephenFan @liaolucy @realqhc Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D149743
-