- Feb 06, 2024
-
-
Cullen Rhodes authored
-
Sjoerd Meijer authored
Add opcodes for different store instructions to the target hook that can enable more STP pairs. This is split off from the patch that does the same for some load instructions (#79003). Patch co-authored by Cameron McInally.
-
AtariDreams authored
optimizeTan has been renamed to optimizeTrigInversionPairs as a result. Sadly, this is not mathematically true that all inverse pairs fold to x. For example, asin(sin(x)) does not fold to x if x is over 2pi.
-
paperchalice authored
A simple enough op pass so we can test standard instrumentations in future.
-
Nilanjana Basu authored
Removed target-triple in target-independent test case to fix failing test caused by https://github.com/llvm/llvm-project/pull/67725.
-
wangpc authored
-
michaelrj-google authored
Having libc_errno outside of the namespace causes versioning issues when trying to link the tests against LLVM-libc. Most of this patch is just moving libc_errno inside the namespace in tests. This isn't necessary in the function implementations since those are already inside the namespace.
-
Benjamin Maxwell authored
When unrolling the reduction dimension of something like a matmul for SME, you can end up with transposed reads of illegal types, like so: ```mlir %illegalRead = vector.transfer_read %memref[%a, %b] : memref<?x?xf32>, vector<[8]x4xf32> %legalType = vector.transpose %illegalRead, [1, 0] : vector<[8]x4xf32> to vector<4x[8]xf32> ``` Here the `vector<[8]x4xf32>` is an illegal type, there's no way to lower a scalable vector of fixed vectors. However, as the final type `vector<4x[8]xf32>` is legal, we can instead lift the transpose to memory (producing a strided memref), and eliminate all the illegal types. This is shown below. ```mlir %readSubview = memref.subview %memref[%a, %b] [%c8_vscale, %c4] [%c1, %c1] : memref<?x?xf32> to memref<?x?xf32> %transpose = memref.transpose %readSubview (d0, d1) -> (d1, d0) : memref<?x?xf32> to memref<?x?xf32> %legalType = vector.transfer_read %transpose[%c0, %c0] : memref<?x?xf32>, vector<4x[8]xf32> ``` -
Matt Arsenault authored
-
vigbalu authored
Adding extern "C" to all the entry point functions to make sure that these functions are not mangled.
-
j-jorge authored
Resolves #27008, #39735, #53013, #63619. Hello, this PR adds the MainIncludeChar option to clang-format, allowing to select which include syntax must be considered when searching for the main header: quotes (`#include "foo.hpp"`, the default), brackets (`#include <foo.hpp>`), or both. The lack of support for brackets has been reported many times, see the linked issues, so I am pretty sure there is a need for it :) A short note about why I did not implement a regex approach as discussed in #53013: while a regex would have allowed many extra ways to describe the main header, the bug descriptions listed above suggest a very simple need: support brackets for the main header. This PR answers this needs in a quite simple way, with a very simple style option. IMHO the feature space covered by the regex (again, for which there is no demand :)) can be implemented latter, in addition to the proposed option. The PR also includes tests for the option with and without grouped includes.
-
Anton Sidorenko authored
Under fast-math flags it's possible to convert `sqrt(exp(X)) `into `exp(X * 0.5)`. I suppose that this transformation is always profitable. This is similar to the optimization existing in GCC.
-
NAKAMURA Takumi authored
-
Aiden Grossman authored
This patch adds a script to automatically query the number of running jobs and print them to the terminal as this functionality isn't available through the Github UI (unless you are a Github administrator).
-
Marius Brehler authored
This adds the `emitc.declare_func` operation that allows to emit the declaration of an `emitc.func` at a specific location.
-
NAKAMURA Takumi authored
-
Joshua Cao authored
Following the discussion in https://discourse.llvm.org/t/symboltable-and-symbol-parent-child-relationship/75446 , we should enforce that a symbol's immediate parent is a symbol table. I changed some tests to pass the verification. In most cases, we can wrap the func with a module, change the func to another op with regions i.e. scf.if, or change the expected error message. --------- Co-authored-by:
Mehdi Amini <joker.eph@gmail.com>
-
Adrian Kuegel authored
-
Yeting Kuo authored
-
Enna1 authored
…DOW_SCALE As MEM_GRANULARITY represents the size of memory block mapped to a single shadow entry, and SHADOW_SCALE represents the scale of shadow mapping, so the single shadow entry size can be computed as (MEM_GRANULARITY >> SHADOW_SCALE). This patch replaces the hardcoded SHADOW_ENTRY_SIZE with (MEM_GRANULARITY >> SHADOW_SCALE).
-
Yuxuan Chen authored
-
Jason Eckhardt authored
This patch removes a couple of redundant buffer copies in emitTable for setting up calls to decodeULEB128. Instead, provide the Table.data buffer directly to the calls-- where decodeULEB128 does its own buffer overflow checking. Factor out 7 explicit loops to emit ULEB128 bytes into emitULEB128. Also factor out 4 copies of 24-bit numtoskip emission into emitNumToSkip. The functionality is already covered by existing unit tests and by virtue of most of the in-tree back-ends exercising the decoder emitter.
-
sstwcw authored
new ```C while (_Generic(x, // long: x)(x) > x) { } while (_Generic(x, // long: x)(x)) { } ``` old ```C while (_Generic(x, // long: x)(x) > x) { } while (_Generic(x, // long: x)(x)) { } ``` In the first case above, the second line previously aligned to the open parenthesis. The 4 spaces did not get added by the fallback line near the end of getNewLineColumn because there was already some indentaton. Now the spaces get added explicitly. In the second case above, without the fake parentheses, the second line did not respect the outer parentheses, because the LastSpace field did not get set without the fake parentheses. Now the indentation of the outer level is used instead. -
Arthur Eubanks authored
This matches the optimization pipeline's PassRegistry.def. I ran into a bug where CONSTRUCTOR wasn't always being used (in PassBuilder::registerMachineFunctionAnalyses()). Make DUMMY_* just accept a pass name, there's no point in having proper constructors if the generated dummy class has a templated constructor accepting arbitrary arguments. Remove unused getPassNameFromLegacyName() as it was using this but for no purpose. Remove DUMMY_MACHINE_FUNCTION_ANALYSIS, we can just add those as we port them. This for some reason exposed missing mock calls in existing unittests.
-
Han-Chung Wang authored
This is part of https://github.com/llvm/llvm-project/commit/66347e516e22f9159b86024071fb92f364ac4418 The regression in downstream projects is about transfer_read patterns, which needs more investigation. Add the support for transfer_write for now.
-
Artem Tyurin authored
Fixes https://github.com/llvm/llvm-project/issues/73285.
-
Oleksandr "Alex" Zinenko authored
-
Jie Fu authored
llvm-project/mlir/test/CAPI/sparse_tensor.c:50:43: error: format specifies type 'unsigned long long' but the argument has type 'MlirSparseTensorLevelType' (aka 'unsigned long') [-Werror,-Wformat] fprintf(stderr, "level_type: %llu\n", lvlTypes[l]); ~~~~ ^~~~~~~~~~~ %lu 1 error generated. -
Jason Molenda authored
debugserver on arm64 devices can manage both Byte Address Select watchpoints (1-8 bytes) and MASK watchpoints (8 bytes-2 gigabytes). This adds a SupportedWatchpointTypes key to the QSupported response from debugserver with a list of these, so lldb can take full advantage of them when creating larger regions with a single hardware watchpoint. Also add documentation for this, and two other lldb extensions, to the lldb-gdb-remote.txt documentation. Re-enable TestLargeWatchpoint.py on Darwin systems when testing with the in-tree built debugserver. I can remove the "in-tree built debugserver" in the future when this new key is handled by an Xcode debugserver.
-
Aiden Grossman authored
This patch adjusts the build process for building the toolchain for the CI container to perform more rigorous perf-training for PGO, particularly building the entirety of LLVM as that is what showed the best results while benchmarking. This patch also splits the job into two stages to avoid timeouts due to the large increase in buildtime. There are a couple other hacks added in here to make things work that we can do away with eventually once we're able to run jobs like this on more powerful self-hosted runners.
-
Jie Fu authored
llvm-project/mlir/test/CAPI/sparse_tensor.c:50:42: error: format specifies type 'unsigned long' but the argument has type 'MlirSparseTensorLevelType' (aka 'unsigned long long') [-Werror,-Wformat] 50 | fprintf(stderr, "level_type: %lu\n", lvlTypes[l]); | ~~~ ^~~~~~~~~~~ | %llu 1 error generated. -
Younan Zhang authored
[concepts] Extract function template pack arguments from the current instantiation if possible (#80594) Before the constraint substitution, we employ `getTemplateInstantiationArgs`, which in turn attempts to inspect `TemplateArgument`s from the function template. For parameter packs from their parent contexts, we used to extract the arguments from the specialization type, in which could result in non-canonical argument types e.g. `PackExpansionType`. This may break the contract that, during a tree transformation, in `TreeTransform::TryExpandParameterPacks`, the corresponding `TemplateArgument`s for an `UnexpandedParameterPack` are expected to be of `Pack` kinds if we're expanding template parameters. Fixes https://github.com/llvm/llvm-project/issues/72557.
-
jeffreytan81 authored
We have a Python script that needs to locate coredump path during debugging so that we can retrieve certain metadata files associated with it. Currently, there is no API for this. This patch adds a new `SBProcess::GetCoreFile()` to retrieve target dump file spec used for dump debugging. Note: this is different from the main executable module spec. To achieve this, the patch hoists m_core_file into PostMortemProcess for sharing. --------- Co-authored-by:jeffreytan81 <jeffreytan@fb.com>
-
Derek Schuff authored
Fixes #80533
-
Nilanjana Basu authored
A set of microbenchmarks (https://github.com/llvm/llvm-test-suite/pull/26) showed that loop interleaving can be beneficial for loops with low trip count as well. Loop interleaving count computation is updated accordingly in prior patches while this patch removes the loop trip count threshold for interleaving.
-
Enna1 authored
[Sanitizer][NFC] Replaces a few `InternalScopedString::AppendF` with `InternalScopedString::Append` (#80574)
-
Jinyang He authored
Refer to commit 6611d58f ("Relax R_RISCV_ALIGN"), we can relax R_LARCH_ALIGN by same way. Reuse `SymbolAnchor`, `RISCVRelaxAux` and `initSymbolAnchors` to simplify codes. As `riscvFinalizeRelax` is an arch-specific function, put it override on `TargetInfo::finalizeRelax`, so that LoongArch can override it, too. The flow of relax R_LARCH_ALIGN is almost consistent with RISCV. The difference is that LoongArch only has 4-bytes NOP and all executable insn is 4-bytes aligned. So LoongArch not need rewrite NOP sequence. Alignment maxBytesEmit parameter is supported in psABI v2.30.
-
Congcong Cai authored
When promoted value, it is meaningless to copy value from reg to another reg with the same type. This PR add additional check for this cases to reduce the code size. Fixes: #80053.
-
modiking authored
[LoopUnroll] Introduce PragmaUnrollFullMaxIterations as a hard cap on how many iterations we try to unroll (#78648) Fixes [PR77842](https://github.com/llvm/llvm-project/issues/77842 ) where UBSAN causes pragma full unroll to try and unroll INT_MAX times. This sets a cap to make sure we don't attempt this and crash the compiler. Testing: ninja check-all with new test --------- Co-authored-by:
Nikita Popov <github@npopov.com>
-
Florian Mayer authored
Reverts llvm/llvm-project#74515 Broke build: https://lab.llvm.org/buildbot/#/builders/75/builds/42512
-