- Apr 24, 2024
-
-
jeanPerier authored
-
Pierre van Houtryve authored
The vast majority of the following (very common) opcodes were always called with identical arguments: - `GIM_CheckType` for the root - `GIM_CheckRegBankForClass` for the root - `GIR_Copy` between the old and new root - `GIR_ConstrainSelectedInstOperands` on the new root - `GIR_BuildMI` to create the new root I added overloaded version of each opcode specialized for the root instructions. It always saves between 1 and 2 bytes per instance depending on the number of arguments specialized into the opcode. Some of these opcodes had between 5 and 15k occurences in the AArch64 GlobalISel Match Table. Additionally, the following opcodes are almost always used in the same sequence: - `GIR_EraseFromParent 0` + `GIR_Done` - `GIR_EraseRootFromParent_Done` has been created to do both. Saves 2 bytes per occurence. - `GIR_IsSafeToFold` was *always* called for each InsnID except 0. - Changed the opcode to take the number of instructions to check after `MI[0]` The savings from these are pretty neat. For `AArch64GenGlobalISel.inc`: - `AArch64InstructionSelector.cpp.o` goes down from 772kb to 704kb (-10% code size) - Self-reported MatchTable size goes from 420380 bytes to 352426 bytes (~ -17%) A smaller match table means a faster match table because we spend less time iterating and decoding. I don't have a solid measurement methodology for GlobalISel performance so I don't have precise numbers but I saw a few % of improvements in a simple testcase.
-
Lang Hames authored
This re-applies 6094b3b7, which was reverted in e7efd37c (and before that in 1effa19d) due to bot failures. The test failures were fixed by having SelfExecutorProcessControl use an InPlaceTaskDispatcher by default, rather than a DynamicThreadPoolTaskDispatcher. This shouldn't be necessary (and indicates a concurrency issue elsewhere), but InPlaceTaskDispatcher is a less surprising default, and better matches the existing behavior (compilation on current thread by default), so the change seems reasonable. I've filed https://github.com/llvm/llvm-project/issues/89870 to investigate the concurrency issue as a follow-up. Coding my way home: 6.25133S 127.94177W
-
Jie Fu authored
llvm-project/llvm/lib/IR/Verifier.cpp:4854:14: error: unused variable 'IsLeaf' [-Werror,-Wunused-variable] const auto IsLeaf = [](const Metadata *CurMD) { ^ 1 error generated. -
Pierre van Houtryve authored
Implements the core/target-agnostic components of Memory Model Relaxation Annotations. RFC: https://discourse.llvm.org/t/rfc-mmras-memory-model-relaxation-annotations/76361/5
-
Vlad Serebrennikov authored
Fixes #89374 Solution suggested by @cor3ntin
-
Pengcheng Wang authored
[RISCV] Use the store value's VT as the MemoryVT after combining riscv.masked.strided.store (#89874) According to `RISCVTargetLowering::getTgtMemIntrinsic`, the MemoryVT is the scalar element VT for strided store and the MemoryVT is the same as the store value's VT for unit-stride store. After combining `riscv.masked.strided.store` to `masked.store`, we just use the scalar element VT to construct `masked.store`, which is wrong. With wrong MemoryVT, the DAGCombiner will combine `trunc+masked.store` to truncated `masked.store` because `TLI.canCombineTruncStore` returns true. So, we should use the store value's VT as the MemoryVT. This fixes #89833.
-
Craig Topper authored
-
Heejin Ahn authored
This tidies up `wasm-target-features.c` cosmetically: - Sorts the feature tests alphabetically - Adds a space after colons
-
Heejin Ahn authored
We are currently using `PREFIX-DAG` and `PREFIX-NOT` within a single `PREFIX` test in a mixed way, but `-DAG` and `-NOT` do not work that way. For example: Result: ``` 1 2 3 ``` Test file: ```c // CHECK-DAG: 3 // CHECK-DAG: 1 // CHECK-NOT: 2 ``` This does not work. The last line `CHECK-NOT: 2` does not trigger any error, because we've already covered all three lines (1~3) while matching `CHECK-DAG: 3` and `CHECK-DAG: 1`, and FileCheck tries to check the line `CHECK-NOT: 2` _after_ the line `3`. Actually, we have ```c // BLEEDING-EDGE-NOT:#define __wasm_reference_types__ 1{{$}} ``` even though reference-types is enabled in 'bleeding-edge' config, and this has not triggered any error. This section (https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-dag-directive) explains the interactions between `CHECK-DAG` and `CHECK-NOT`s: > As a result, the surrounding `CHECK-DAG:` directives cannot be reordered, i.e. all occurrences matching `CHECK-DAG:` before `CHECK-NOT:` must not fall behind occurrences matching `CHECK-DAG:` after `CHECK-NOT:`. So in order to test the 'include' lists and 'not-include' lists, we have to run the tests twice with different prefixes. This splits `GENERIC` and `BLEEDING-EDGE` tests in two configs (`***-INCLUDE` and `***`) to test them correctly. This also adds some spaces after colons, sorts the feature lists, and adds `1{{$}}` to the `MVP` tests to make them consistent with `GENERIC` and `BLEEDING-EDGE` tests. -
Durgadoss R authored
This patch adds known ptxas versions up to 12.4, to have tests targeting them. Signed-off-by:Durgadoss R <durgadossr@nvidia.com>
-
Nikita Popov authored
-
Nikita Popov authored
These tests break when regenerated due to symbol conflicts.
-
Craig Topper authored
Zabha and Zacas are both documented as depending on Zaamo. I'm hesitant to make them imply Zaamo instead. So remove the implication and replace with a check that either A or Zaamo is enabled.
-
Owen Pan authored
Fixes #71939.
-
Craig Topper authored
There is no implies rule in RISCVISAInfo.cpp so this makes them consistent. Soon RISCVFeatures.td will be used to generate RISCVISAInfo.cpp so it won't be possible to mismatch.
-
Nikita Popov authored
We're replacing the select with the false value here, but it may be more poisonous if m_Not contains poison elements. Fix this by introducing a m_NotForbidPoison matcher and using it here. Fixes https://github.com/llvm/llvm-project/issues/89500.
-
Nikita Popov authored
Swapping the operands of a select is not valid if one hand is more poisonous that the other, because the negation zero contains poison elements. Fix this by adding an extra parameter to isKnownNegation() to forbid poison elements. I've implemented this using manual checks to avoid needing four variants for the NeedsNSW/AllowPoison combinations. Maybe there is a better way to do this... Fixes https://github.com/llvm/llvm-project/issues/89669.
-
Kai Luo authored
So that aligned with other targets.
-
Pranav Kant authored
-
Daniil Kovalev authored
After #89563, we do not use else after return in code corresponding to `R_AARCH64_AUTH_ABS64` reloc in `getRelocType`. This patch removes use of else after return in other places in `getRelocType`.
-
Fangrui Song authored
In ELF, relocatable files generated for x86-32 and some code models of x86-64 (medium, large) may reference the special symbol `_GLOBAL_OFFSET_TABLE_` that is not used in the IR. In an LTO link, if there is no regular relocatable file referencing the special symbol, the linker may not define the symbol and lead to a spurious "undefined symbol" error. Fix #61101: record that `_GLOBAL_OFFSET_TABLE_` is used in the IR symbol table. Note: The `PreservedSymbols` mechanism (https://reviews.llvm.org/D112595) that just sets `FB_used` is not applicable. The `getRuntimeLibcallSymbols` for extracting lazy runtime library symbols is for symbols that are "always" potentially used, but linkers don't have the code model information to make a precise decision. Pull Request: https://github.com/llvm/llvm-project/pull/89463
-
LLVM GN Syncbot authored
-
Jonas Devlieghere authored
Make SymbolFileCTF::ParseFunctions resilient against not being able to resolve the argument or return type of a function. ResolveTypeUID can fail for a variety of reasons so we should always check its result. The type that caused the crash was `_Bool` which we didn't recognize as a basic type. This commit also fixes the underlying issue and adds a test. rdar://126943722
-
Brandon Wu authored
It follows the interface defined here: https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/293
-
Congcong Cai authored
-
Vitaly Buka authored
Almost NFC, instrumentation is as correct as it was before. We need InstrumentationList grouped by origin instruction, so we used stable_sort. However these objects already grouped because we never interleave sequences of `insertShadowCheck` of different instrunction. Pointer sort has artifact that it was deppendent on allocator behavior, so we could inserted checks in a different order. There is no test, as I failed to reproduce this with `opt`. My guess is that for reproducer we need to increase fragmentation in the allocator.
-
Pranav Kant authored
-
LLVM GN Syncbot authored
-
Craig Topper authored
This introduces a new file, RISCVISAUtils.cpp and moves the rest of RISCVISAInfo to the TargetParser library. This will allow us to generate part of RISCVISAInfo.cpp using tablegen.
-
Pranav Kant authored
Revert "Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (#89036)" This reverts commit 74cab546.
-
Andrei Safronov authored
Implement base Calling Convention functionality. Implement stack load/store register operations. Implement call lowering.
-
David CARLIER authored
-
Nicolas van Kempen authored
Using `compare` is the next most common roundabout way to express `starts_with` before it was added to the standard. In this case, using `starts_with` is a readability improvement. Extend existing `modernize-use-starts-ends-with` to cover this case. ``` // The following will now be replaced by starts_with(). string.compare(0, strlen("prefix"), "prefix") == 0; string.compare(0, 6, "prefix") == 0; string.compare(0, prefix.length(), prefix) == 0; string.compare(0, prefix.size(), prefix) == 0; ``` -
Andy Kaylor authored
Sergey Malsov has left Intel. I would like to nominate Will Huhn to replace him as an Intel representative in the LLVM security group. Will is a security champion for the Intel compiler team. I believe he will be a valuable addition to the LLVM security group as a second representative from Intel. He has more security-specific expertise than me. I regularly consult with Will about topics the LLVM security group is considering, and it will be useful to have him more directly involved.
-
Roland McGrath authored
-
Matt Arsenault authored
-
Kazu Hirata authored
PortableMemInfoBlock::{serialize,deserialize} take Schema into account, allowing us to serialize/deserialize a subset of the fields. However, PortableMemInfoBlock::serializedSize does not. That is, it assumes that all fields are always serialized and deserialized. In other words, if we choose to serialize/deserialize a subset of the fields, serializedSize would claim more storage than we actually need. This patch fixes the problem by teaching serializedSize to take Schema into account. For now, this patch has no effect on the actual indexed MemProf profile because we serialize/deserialize all fields, but that might change in the future. Aside from check-llvm, I tested this patch by verifying that llvm-profdata generates bit-wise identical files for each version for a large raw MemProf file I have. -
Mark de Wever authored
Testing with the get_info() returning a local_info revealed some issues in the reverse lookup. This needed an additional quirk. Also the skipping when not in the current continuation optimization was wrong. It prevented merging two sys_info objects.
-