- Apr 11, 2024
-
-
paperchalice authored
Unify the inheritance paths of IR and machine function.
-
Yingwei Zheng authored
This patch adds support for inferring trunc's nsw/nuw flags.
-
Johannes Reifferscheid authored
The current implementation fails for very small and very large values. For example, (0, -inf) should return inf, but it returns -inf. This ports the logic used in XLA. Tested with XLA's exhaustive_binary_test_f32_f64.
-
Simon Pilgrim authored
[VectorCombine] foldShuffleOfCastops - add initial shuffle(bitcast(x),bitcast(y)) -> bitcast(shuffle(x,y)) support Just handle cases where the bitcast src/dst element counts are the same (future patches will add shuffle mask scaling)
-
Simon Pilgrim authored
Only fold bitcast(shuffle(x,y)) -> shuffle(bitcast(x),bitcast(y)) if we won't actually increase the number of bitcasts (i.e. x or y is already bitcasted from the correct type).
-
Nathan Sidwell authored
Bolt's RepRet pass is x86-specific, no need to add it for non-x86 targets.
-
Nathan Sidwell authored
Fixes a couple more places where ".text" is presumed for the main code section name.
-
Adrian Kuegel authored
This time for real.
-
Adrian Kuegel authored
forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead.
-
Simon Pilgrim authored
As discussed on #87510 the intention is only to fold bitcast(shuffle(x,y)) -> shuffle(bitcast(x),bitcast(y)) if we won't actually increase the number of bitcasts (i.e. x or y is already bitcasted from the correct type).
-
nikitalita authored
There was a duplicate flags field mistakenly left in LabelSym. [LabelSym only has one flags field](https://github.com/microsoft/microsoft-pdb/blob/805655a28bd8198004be2ac27e6e0290121a5e89/include/cvinfo.h#L3806)
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Tom Eccles authored
Following up on a review comment: https://github.com/llvm/llvm-project/pull/84958#discussion_r1527627848 Reductions might be inlined inside of a loop so stack allocations are not safe. Normally flang allocates arrays on the stack. Allocatable arrays have a different type: fir.box<fir.heap<fir.array<...>>> instead of fir.box<fir.array<...>>. This patch will allocate all arrays on the heap. Reductions on allocatable arrays still aren't supported (but I will get to this soon).
-
Tom Eccles authored
I missed this before. For by-ref reductions, the private reduction variable is a pointer to the pointer to the variable. So an extra load is required to get the right value. See the "red.private.value.n" loads in the reduction combiner region for reference.
-
Andreas Jonson authored
Support the new range attribute to infer ConstantRanges in IPSCCP.
-
Thomas Preud'homme authored
llvm-mca does not have an include directory so this commit removes the spurious include_directories directive.
-
Poseydon42 authored
Proofs: https://alive2.llvm.org/ce/z/52droC This resolves #85313.
-
Florian Hahn authored
Update definitions on ::clone in recipe sub-types to use the sub-type as return type. This avoids typecasts down to the cloned type in some cases.
-
Simon Pilgrim authored
As discussed on #87510 the intention is to fold shuffle(bitcast(x),bitcast(y)) -> bitcast(shuffle(x,y)), but it must not interfere with existing bitcast(shuffle(bitcast(x),bitcast(y))) folds.
-
Freddy Ye authored
Relate gcc patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648789.html
-
Johannes Reifferscheid authored
This ports openxla/xla#10503 by @pearu. In addition to the filecheck test here, the accuracy was tested with XLA's complex_unary_op_test and its MLIR emitters. This is a fixed version of https://github.com/llvm/llvm-project/pull/88260. The previous version relied on implementation-specific behavior in the order of evaluation of maxAbsOfRealPlusOneAndImagMinusOne's operands.
-
NagyDonat authored
This commit updates several checkers to use call descriptions with the matching mode `CDM::CLibrary` instead of checking `Call.isGlobalCFunction()` after performing the match. This resolves several TODOs in various checkers. Note that both matching with `CDM::CLibrary` and calling `isGlobalCFunction` leads to `CheckerContext::isCLibraryFunction()` checks (so this change is close to being NFC), but if it is used via the matching mode then the checker can automatically recognize the builtin variants of the matched functions. I'll also make similar changes in GenericTaintChecker, but that checker has separate and inconsistent rules for handling the normal and the builtin variant of several functions (e.g. `memcpy` and `__builtin_memcpy`), so I'll put those changes into a separate commit.
-
Amir Ayupov authored
This fixes an issue where `PatchEntries` overwrites function body but keeps CFI untouched. Existing FDEs thus become invalid. This doesn't affect unwinding because patched functions are transparent from EH/unwinding perspective, but it breaks BOLT during disassembling those functions. Emit empty FDE for injected functions (emitted to the same address as .org functions) that take precedence over the original FDE. This adds eh_frame overhead, but restores the ability to disassemble .org functions. Note that the overhead is avoided in `-use-old-text` mode. Test Plan: updated bolt/test/X86/patch-entries.test Reviewers: rafaelauler, maksfb, dcci, ayermolo Reviewed By: maksfb, dcci Pull Request: https://github.com/llvm/llvm-project/pull/87967
-
Ramkumar Ramachandra authored
The function getImplicitAddend() is incomplete, as it is possible to cook up object files with other relocation addends. Although using llvm-mc or the clang integrated assembler does not produce such object files, a proprietary assembler known as armasm can: https://developer.arm.com/documentation/101754/0622/armasm-Legacy-Assembler-Reference armasm is in a frozen state, but it is still actively used in a lot of legacy codebases as the directives, macros and operators are very different from the clang integrated assembler. This makes porting a lot of legacy code from armasm syntax impractical for a lot of projects. Some internal testing of projects using open-source clang and lld fell over at link time when legacy armasm objects were included in the link. The goal of this patch is to enable people with legacy armasm objects to be able to use lld as the linker. Sadly armasm uses SHT_REL format relocations for AArch64 rather than SHT_RELA, which causes lld to reject the objects. As a frozen project we know the small number of relocations that the assembler officially supports and won't include (outside the equivalent of the .reloc directive which I think we can rule out of scope as that is not commonly used). The benefit to lld is that it will ease migration from a proprietary to an open-source toolchain. The drawback is the implementation of a small number of SHT_REL relocations. Although this patch doesn't aim to comprehensively cover all possible relocation addends, it does extend lld to work with the relocation addends that armasm produces, using the canonical aaelf64 document as a reference: https://github.com/ARM-software/abi-aa/blob/main/aaelf64/aaelf64.rst
-
Maciej Gabka authored
The size of ROB was incorrecty copied from the Neoverse N2, while it has actually higher value as descibed in https://community.arm.com/arm-community-blogs/b/infrastructure-solutions-blog/posts/arm-neoverse-v2-platform-best-in-class-cloud-and-ai-ml-performance
-
Michael Klemm authored
The default CMake scripts had a copy operation to copy a compiled `.mod` file to also be available with suffix `.f18.mod`. This seems no longer needed. Also updated ModFiles.md to point to `-module-suffix`. --------- Co-authored-by:Kiran Chandramohan <kiranchandramohan@gmail.com>
-
Chen Zheng authored
If the V2 of the vector_shuffle is undef, the two vector inputs are expected to be the same when do the VECINSERT transformation. For now the first operand of VECINSERT is set to undef which is not right. This patch fixes this bug.
-
Chen Zheng authored
-
Timm Bäder authored
This reverts commit b4adb421. The original commit increased local rebuild times a lot. See the discussion in https://github.com/llvm/llvm-project/issues/76707
-
David Green authored
This adds some costs for the shuffle instructions that should be lowered to zip1/zip2/uzp1/uzp2 instructions.
-
Haohai Wen authored
The temporary perf script files converted from perf data will occupy lots of space for large project. This patch removes them when llvm-profgen exits normally or receives signals.
-
Jie Fu authored
/llvm-project/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp:762:16: error: comparison of integers of different signs: 'int64_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare] rhsPos >= cstr.positionToValueDim.size()) ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /llvm-project/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp:761:16: error: comparison of integers of different signs: 'int64_t' (aka 'long') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare] if (lhsPos >= cstr.positionToValueDim.size() || ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated. -
Matthias Springer authored
This was likely a copy-and-paste typo.
-
Matthias Springer authored
This commit adds a new public API to `ValueBoundsOpInterface` to compare values/dims. Supported comparison operators are: LT, LE, EQ, GE, GT. The new `ValueBoundsOpInterface::compare` API replaces and generalizes `ValueBoundsOpInterface::areEqual`. Not only does it provide additional comparison operators, it also works in cases where the difference between the two values/dims is non-constant. The previous implementation of `areEqual` used to compute a constant bound of `val1 - val2` (check if it `== 0` or `!= 0`). Note: This commit refactors, generalizes and adds a public API for value/dim comparison. The comparison functionality itself was introduced in #85895 and is already in use for analyzing `scf.if`. In the long term, this improvement will allow for a more powerful analysis of subset ops. A future commit will update `areOverlappingSlices` to use the new comparison API. (`areEquivalentSlices` is already using the new API.) This will improve subset equivalence/disjointness checks with non-constant offsets/sizes/strides.
-
martinboehme authored
This relands #87320 and additionally removes the now-unused function `isOriginalRecordConstructor()`, which was causing buildbots to fail.
-
Fangrui Song authored
[ELF] relocateNonAlloc & ICF: replace random access iterators of relocations with input iterators. NFC Also replace one `this->file` with a local variable as some function calls are opaque to the compiler, causing unneeded reload.
-
Cyrill Leutwiler authored
Register spills (save/restore) in RISC-V embedded work differently because there are less registers and different stack alignment. [GCC equivalent ](https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/riscv/save-restore.S#L298C16-L336 ) Follow up from #76777. --------- Signed-off-by:
xermicus <cyrill@parity.io>
-
Kazu Hirata authored
This patch renames RawMemProfReader.{cpp,h} to MemProfReader.{cpp,h}, respectively. Also, it re-creates RawMemProfReader.h just to include MemProfReader.h for compatibility with out-of-tree users.
-