- Mar 22, 2024
-
-
xumingjie.enna1 authored
-
Andrzej Warzyński authored
Updates `castAwayContractionLeadingOneDim` to inherit from `MaskableOpRewritePattern` so that this pattern can support masking. Builds on top of #83827
-
Guillaume Chatelet authored
This is a reland of #86147 but with a proper `base()` function. https://en.cppreference.com/w/cpp/iterator/reverse_iterator/operator_cmp
-
Christian Ulmann authored
This commit relaxes the assumption of type consistency for LLVM dialect load and store operations in SROA. Instead, there is now a check that loads and stores are in the bounds specified by the sub-slot they access. This commit additionally removes the corresponding patterns from the type consistency pass, as they are no longer necessary. Note: It will be necessary to extend Mem2Reg with the logic for differently sized accesses as well. This is non-the-less a strict upgrade for productive flows, as the type consistency pass can produce invalid IR for some odd cases.
-
Chen Zheng authored
Fix crashes in https://godbolt.org/z/6voEa1o6Y
-
Craig Topper authored
-
Pravin Jagtap authored
Presently the atomic optimizer supports only 32-bit operations. Plan is to extend the atomic optimizer for 64-bit operations for compute and graphics. This patch extends support for double type for `uniform values` only. Going forward, will extend the support for divergent values. Adding support for divergent values requires extending/legalizing readfirstlane, readlane, writelane, etc ops for 64-bit operations to avoid `bitcast` noise that we have currently. --------- Authored-by:Pravin Jagtap <Pravin.Jagtap@amd.com>
-
Craig Topper authored
[SelectionDAG][RISCV] Use TypeSize version of ComputeValueVTs in TargetLowering::LowerCallTo. (#86166) This is needed to support non-intrinsic functions returning tuple types which are represented as structs with scalable vector types in IR. I suspect this may have been broken since https://reviews.llvm.org/D158115
-
Kazu Hirata authored
This patch fixes: bolt/lib/Rewrite/LinuxKernelRewriter.cpp:1664:20: error: unused variable 'TargetAddress' [-Werror,-Wunused-variable] bolt/lib/Rewrite/LinuxKernelRewriter.cpp:1666:20: error: unused variable 'KeyAddress' [-Werror,-Wunused-variable]
-
Kazu Hirata authored
commit e66b670f Author: Nathan Lanza <nathanlanza@gmail.com> Date: Thu Mar 21 19:53:48 2024 -0400 triggers: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:478:16: error: enumeration value 'CIR' not handled in switch [-Werror,-Wswitch] This patch teaches lldb to handle clang::Language::CIR the same way as clang::Language::LLVM_IR.
-
paperchalice authored
Reland #86225, adjust the name space.
-
Aiden Grossman authored
Before this patch, llvm-exegesis would leave processes lingering that experienced signals like segmentation faults. They would up in a signal-delivery-stop state under the ptrace and never exit. This does not cause problems (or at least many) in llvm-exegesis as they are cleaned up after the main process exits, which usually happens quickly. However, in downstream use, when many blocks are being executed (many of which run into signals) within a single process, these processes stay around and can easily exhaust the process limit on some systems. This patch cleans them up by sending SIGKILL after information about the signal that was sent has been gathered.
-
paperchalice authored
Reverts llvm/llvm-project#86117
-
Freddy Ye authored
-
paperchalice authored
Move the pass registry to a separate file, prepare for porting dag-isel.
-
paperchalice authored
BPF and some machine function passes need it.
-
Jonas Paulsson authored
- The check is now actually done in both PEI and the MachineVerifier. - More .mir tests trivially updated with "adjustsStack: true" as needed.
-
Alexey Bataev authored
analysis. Need to support proper type conversion for function arguments to avoid compiler crash.
-
Nathan Lanza authored
Add the CIR language to the Language enum and the standard usages of it. commit-id:fd12b2c2 Reviewers: bcardosolopes, AaronBallman, erichkeane Reviewed By: AaronBallman, bcardosolopes Pull Request: https://github.com/llvm/llvm-project/pull/86072
-
Nathan Lanza authored
In preparation for the initial ClangIR upstreaming process, move clang behind MLIR in the list of external projects. Otherwise, cmake will attempt to build clang before MLIR. reland of https://github.com/llvm/llvm-project/pull/86050 Reviewers: Pull Request: https://github.com/llvm/llvm-project/pull/86210
-
Luke Lau authored
We can remove the restriction that the narrow type needs to be exactly EEW / 2 for scalable ISD::{ADD,SUB,MUL} nodes. This allows us to perform the combine even if we can't fully fold the extend into the widening op. VP intrinsics already do this, since they are lowered to _VL nodes which don't have this restriction. The "exactly EEW / 2" narrow type restriction prevented us from emitting V{S,Z}EXT_VL nodes with i1 element types which crash when we try to select them, since no other legal type is double the size of i1, see the test case added in this PR `i1_zext`. So to preserve this, this adds a check for i1 narrow types instead. -
Luke Lau authored
This is a reimplementation of the combine added in #83035 but as a lowering instead of a combine, so we don't regress the test case added in e59f120e by interfering with the strided load combine Previously the combine had to concatenate the split vectors with insert_subvector instead of concat_vectors to prevent an infinite combine loop. And the reasoning behind keeping it as a combine was because if we emitted the insert_subvector during lowering then we didn't fold away inserts of undef subvectors. However it turns out we can avoid this if we just do this in lowering and select a concat_vector directly, since we get the undef folding for free with `DAG.getNode(ISD::CONCAT_VECTOR, ...)` via foldCONCAT_VECTORS.
-
Cyndy Ishida authored
-
Cooper Partin authored
This reverts commit cde54df3 . Co-authored-by:
Cooper Partin <coopp@ntdev.microsoft.com>
-
Diego Caballero authored
It fixes a few rules that don't seem to be working and adding myself to a few paths where I've been contributing and can offer my review. Also minor sorting changes.
-
Alexander Richardson authored
Since this standalone build configuration uses the runtime libraries that are being built just now, we need to ensure that e.g. the TSan unit tests depend on the tsan runtime library. Also fix TSAN_DEPS being overridden to not include the tsan runtime (commit .....). This change fixes a build race seen in the CI checks for TsanRtlTest-x86_64-Test in https://github.com/llvm/llvm-project/pull/83088. Reviewed By: vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/83650
-
Slava Zakharin authored
A file unit is emulated via a temporary buffer that accumulates the output, which is printed out via std::printf at the end of the IO statement. This implementation will be used for the offload devices.
-
Roland McGrath authored
The isfinite, isnan, and isinf "functions" are specified by C99..C23 to be macros that act as type-generic functions. Defining them as their __builtin_* counterparts works fine for this. However, in C++ the identifiers need to be usable in different contexts, such as being declared inside a C++ namespace. So define inline constexpr template functions for them under `#ifdef __cplusplus`.
-
Alexander Richardson authored
When building optimized versions of the runtime libraries the compiler is generally able to elide these references, but when building them for maximum debug info (with -O0), these references remain which causes the test suite to fail for tests that do not pull in the C++ standard library. Reviewed By: vitalybuka Pull Request: https://github.com/llvm/llvm-project/pull/84613
-
Cyndy Ishida authored
This patch completes the classes of errors installapi can detect.
-
alx32 authored
Fixing gcc warning regarding creating non-null-terminated string: ``` ../../lld/MachO/ObjC.cpp:1226:10: warning: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 1226 | strncpy(strData, str, len); | ~~~~~~~^~~~~~~~~~~~~~~~~~~ ../../lld/MachO/ObjC.cpp: In member function 'void {anonymous}::ObjcCategoryMerger::emitAndLinkPointerList(lld::macho::Defined*, uint32_t, const {anonymous}::ObjcCategoryMerger::ClassExtensionInfo&, const {anonymous}::ObjcCategoryMerger::PointerListInfo&)': ../../lld/MachO/ObjC.cpp:1223:24: note: length computed here 1223 | uint32_t len = strlen(str); | ~~~~~~^~~~~ ``` This is not actually a bug, as `newSectionData` returns a zero-initialized memory region, so the null terminator will be there. -
alx32 authored
Before this change, after `InputSection` objects are created, they need to be added to the appropriate container for tracking. The logic for selecting the appropriate container lives in `Driver.cpp` / `gatherInputSections`, where the `InputSection` is added to the matching container depending on the input config and the type of `InputSection`. Also, multiple other locations also insert directly into `inputSections` array - assuming that that is the appropriate container for the `InputSection`'s they create. Currently this is the correct assumption, however an upcoming feature will change this. For an upcoming feature (relative method lists), we need to route `InputSection`'s either to `inputSections` array or to a synthetic section, depending on weather the relative method list optimization is enabled or not. We can achieve the above either by duplicating some of the logic or refactoring the routing and `InputSection`'s and reusing that. The refactoring & code sharing approach seems the correct way to go - as such this diff performs the refactoring while not introducing any functional changes. Later on we can just call `addInputSection` and not have to worry about routing logic. ---------
-
Arthur Eubanks authored
The code model doesn't affect the sub-compilation, so don't check it. Followup to #70740.
-
Cooper Partin authored
This change introduces a version 3 of the PSV data that includes support for the name of the entry function as an offset into StringTable data to a null-terminated utf-8 string. Additional tests were added to ensure that the new value was properly serialized/deserialized from object data. Fixes #80175 --------- Co-authored-by:Cooper Partin <coopp@ntdev.microsoft.com>
-
Amir Ayupov authored
Relax assumptions that YAML output is not supported in BAT mode. Set up basic infrastructure for emitting YAML for functions not covered by BAT, such as from `.bolt.org.text` section (code identical to input binary sans external refs), or non-rewritten functions in non-relocation mode (where the function stays in the same section but BAT mapping is not emitted). This diff only produces YAML profile for non-BAT functions (skipped, non-simple). YAML profile for BAT functions is added in follow-up diffs: - https://github.com/llvm/llvm-project/pull/76911 emits YAML profile with internal control flow information only (branch profile), - https://github.com/llvm/llvm-project/pull/76896 adds cross-function profile (calls profile). Test Plan: Added bolt/test/X86/bolt-address-translation-yaml.test Reviewers: ayermolo, dcci, maksfb, rafaelauler Reviewed By: rafaelauler Pull Request: https://github.com/llvm/llvm-project/pull/76910
-
Guillaume Chatelet authored
Follow up on #86140
-
Maksim Panchenko authored
Runtime code modification used by static keys is the most ubiquitous self-modifying feature of the Linux kernel. The idea is to to eliminate the condition check and associated conditional jump on a hot path if that condition (based on a boolean value of a static key) does not change often. Whenever they condition changes, the kernel runtime modifies all code paths associated with that key flipping the code between nop and (unconditional) jump.
-
Krzysztof Parzyszek authored
Remove `ClauseIterator2` and `clauses2` from ClauseProcessor. [Clause representation 5/6]
-
Kevin Frei authored
Finally getting back to Debuginfod tests: I've migrated the tests in my [earlier PR](https://github.com/llvm/llvm-project/pull/79181 ) from shell to API (at @JDevlieghere's suggestion) and addressed a couple issues that came about during testing. The tests first test the "normal" situation (no DebugInfoD involvement, just normal debug files sitting around), then the "no debug info" situation (to make sure the test is seeing failure properly), then it tests to validate that when Debuginfod returns the symbols, things work properly. This is duplicated for DWP/split-dwarf scenarios. --------- Co-authored-by:
Kevin Frei <freik@meta.com>
-
Florian Mayer authored
Also some drive by cleanup removing an unnnecessary argument and a redundant condition.
-