- Jan 05, 2024
-
-
Ellis Hoag authored
Change the format of IRPGO counter names to `[<filepath>;]<mangled-name>` which is computed by `GlobalValue::getGlobalIdentifier()` to fix #74565. In fe051934 (https://reviews.llvm.org/D156569) the format of IRPGO counter names was changed to be `[<filepath>;]<linkage-name>` where `<linkage-name>` is basically `F.getName()` with some prefix, e.g., `_` or `l_` on Mach-O (yes, it is confusing that `<linkage-name>` is computed with `Mangler().getNameWithPrefix()` while `<mangled-name>` is just `F.getName()`). We discovered in #74565 that this causes some missed import issues on some targets and #74008 is a partial fix. Since `<mangled-name>` may not match the `<linkage-name>` on some targets like Mach-O, we will need to post-process the output of `llvm-profdata order` before passing to the linker via `-order_file`. Profiles generated after fe051934 will become stale after this diff, but I think this is acceptable since that patch landed after the LLVM 18 cut which hasn't been released yet.
-
Adrian Prantl authored
There was a strange and seemingly unncessary empty string optimization in NonRelocatableStringPool that I had to remove in order to support empty strings in the line_str string table, without unconditionally forcing an empty string to be added to every debug_line_str table.
-
Mingming Liu authored
When merging instrFDO profiles with afdo profile as supplementary, instrFDO counters for static functions are stored with function's PGO name (with filename.cpp; prefix). - This pull request fixes the delimiter used when a PGO function name is 'normalized' for AFDO look-up.
-
Florian Hahn authored
This patch introduces a new ComputeReductionResult opcode to compute the final reduction result in the middle block. The code from fixReduction has been moved to ComputeReductionResult, after some earlier cleanup changes to model parts of fixReduction explicitly elsewhere as needed. The recipe may be broken down further in the future. Note that the phi nodes to merge the reduction result from the trip count check and the middle block, to be used as resume value for the scalar remainder loop are also generated based on ComputeReductionResult. Once we have a VPValue for the reduction result, this can also be modeled explicitly and moved out of the recipe.
-
ZijunZhaoCCK authored
nondiscard tests of ranges::contains() should be in ranges.nodiscard_extensions files rather than nodiscard_extensions files
-
Aart Bik authored
-
Valery Pykhtin authored
Address sanitizer checks for AMDGPU target in non-recovery mode aren't quite efficient at the moment which can be illustrated with a program: ``` instr_before; load ptr1; instr_in_the_middle; load ptr2; instr_after; ``` ASAN generates the following instrumentation: ``` instr_before; if (sanity_check_passed(ptr1)) load ptr1; instr_in_the_middle; if (sanity_check_passed(ptr2)) load ptr2; instr_after; else // ASAN report block 2 __asan_report(ptr2); // wave terminates unreachable; else // ASAN report block 1 __asan_report(ptr1); // wave terminates unreachable; ``` Each sanitizer check is treated as a non-uniform condition (and this is true because some lanes may pass the check and some don't). This results in the program above: basically normal program flow is continued in _then_ blocks. This way it allows lanes that pass all sanity checks to complete the program and then the wave terminates at the first reporting _else_ block. For each _else_ block it has to keep execmask and pointer value to report error consuming tons (megatons!) of registers which are live till the program end. This patch changes the behavior on a failing sanity check: instead of waiting when passing lanes reach program end report error and terminate as soon as any lane has violated the sanity check. Sanity check condition is treated uniform with this approach and the resulting program looks much like ordinary CPU code: ``` instr_before; if (any_lane_violated(sanity_check_passed(ptr1))) // ASAN report block 1 __asan_report(ptr1); // abort the program unreachable; load ptr1; instr_in_the_middle; if (any_lane_violated(sanity_check_passed(ptr2))) // ASAN report block 2 __asan_report(ptr2); // abort the program unreachable; load ptr2; instr_after; ``` However it has to use a trick to pass structurizer and some later passes: ASAN check is generated like in recovery mode but reporting function aborts, that is standard _unreachable_ instruction isn't used: ``` ... if (any_lane_violated(sanity_check_passed(ptr1))) // ASAN report block 1 __asan_report(ptr1); // abort the program // pretend we're going to continue the program load ptr1; ... ``` This may create some undesirable effects: 1. Register allocator generates a lot of code for save/restore registers for asan_report call. This may potentially bloat the code since we have a report block for every accessed pointer. 2. Loop invariant code in report blocks is hoisted into a loop preheader. I'm not sure but probably this can be solved using block frequency information, but most likely this isn't a problem at all. These problems are to be addressed later. ### Flattening address sanitizer check In order to simplify divergent CFG this patch also changes the instrumentation code from: ``` uint64_t address = ptr; sbyte *shadow_address = MemToShadow(address); sbyte shadow_value = *shadow_address; if (shadow_value) { sbyte last_accessed_byte = (address & 7) + kAccessSize - 1; if (last_accessed_byte >= shadow_value) { ReportError(address, kAccessSize, kIsWrite); abort(); } } ``` to ``` uint64_t address = ptr; sbyte *shadow_address = MemToShadow(address); sbyte shadow_value = *shadow_address; sbyte last_accessed_byte = (address & 7) + kAccessSize - 1; if (shadow_value && last_accessed_byte >= shadow_value) { ReportError(address, kAccessSize, kIsWrite); abort(); } ``` It saves one _if_ which really avoids very few instructions and their latency can be hidden by the load from shadow memory. -
Martin Storsjö authored
These options have been named /lldltocache: and /lldltocachepolicy: since they were added in 052e855e; the comment was wrong from the original commit.
-
madanial0 authored
[Flang] remove setting lowerbound for non existing dimension in shift runtime test case (NFC) (#76990) The shift2 array only has 1 dimension but the lower bound for a second dimension is being set causing a seg fault on AIX. Co-authored-by:Mark Danial <mark.danial@ibm.com>
-
Martin Storsjö authored
This was present since when the MinGW LLD frontend first was merged in 894dbbe8, where it most probably was a leftover from earlier evolution of the patch.
-
Ben Langmuir authored
This migrates the dylib manager lookup and related APIs to replace ExecutorAddress with ExecutorSymbolDef so that in the future we can model JITSymbolFlags for these symbols. The current change should be NFC as we are only setting the Exported symbol flag.
-
Michael Maitland authored
58f16406 was committed but had a broken test that I did not add the updated version to the commit. This patch fixes the test.
-
Schrodinger ZHU Yifan authored
* separate initialization routines into _start and do_start for all architectures. * lift do_start as a separate object library to avoid code duplication. * (addtionally) address the problem of building hermetic libc with -fstack-pointer-* The `crt1.o` is now a merged result of three components: ``` ___ |___ x86_64 | |_______ start.cpp.o <- _start (loads process initial stack and aligns stack pointer) | |_______ tls.cpp.o <- init_tls, cleanup_tls, set_thread_pointer (TLS related routines) |___ do_start.cpp.o <- do_start (sets up global variables and invokes the main function) ```
-
Piotr Zegar authored
Manually formating code via clang-format after previous commit merge.
-
Chris Cotter authored
emplace_back cannot construct an aggregate with arguments used to initialize the aggregate. Closes #62387 Test plan: Added test test from #62387 which contains code that should not be replaced by the check.
-
Maksim Levental authored
-
Michael Maitland authored
The pseudos for strided loads and stores use the SEW coming from the name. For example, vlse8 has SEW=8 and vlse16 has SEW=16. When llvm-mca tries to lookup (VLSE8_V, SEW=S, LMUL=L) in the inverse pseudo table, a result will only be found when S=8, where S was set from the previous vsetvli instruction. Instead, for a match to be found, we must lookup (VLSE8_V, SEW=8, LMUL=L') where L' is the EMUL which was calculated by scaling the LMUL and SEW from the previous vsetvli and the SEW=8.
-
Florian Hahn authored
Don't replace a scalarizing recipe with a VPWidenCastRecipe. This would introduce wide (vectorizing) recipes when interleaving only. Fixes https://github.com/llvm/llvm-project/issues/76986
-
Oleksandr "Alex" Zinenko authored
Update several tests under mlir/test/Dialect/Transform to use the "main" transform interpreter pass with named entry points rather than the test interpreter pass. This helped discover a logic error in the expensive checks mechanism that was exiting too early.
-
Petr Hosek authored
Only some targets may be building llvm-libc in which case the top-level LLVM_ENABLE_RUNTIMES variable won't contain libc. Rather, we can check LLVM_ENABLE_PROJECTS since libc is required to be included there for libc-hdrgen to be built (and when LLVM_ENABLE_RUNTIMES contains libc, we automatically include libc in LLVM_ENABLE_PROJECTS as well).
-
Krzysztof Drewniak authored
1. Adds tests for the existing interpretation of `or` as `add` in SeperateConstOffsetFromGEP. 2. Pre-commits a test for `or disjoint`.
-
Jonathan Thackray authored
Remove AArch64::AEK_FP16ML from Arm Cortex-A78C definition, as this is not supported, according to the Technical Reference Manual: https://developer.arm.com/documentation/102226/latest/ Also add AArch64::AEK_FLAGM (Flag Manipulation) to Arm Cortex-X1C and Arm Cortex-X2 as these were missing previously, but are supported, according to the Technical Reference Manuals: https://developer.arm.com/documentation/101968/latest/ https://developer.arm.com/documentation/101803/latest/ Fixes #62383
-
ChipsSpectre authored
Ensure we do not try to parse a nested-name-specifier when parsing an ill-formed file in C mode. Fixes #73559
-
Craig Topper authored
-
Tom Stellard authored
Using a container will allow us to have similar testing environments on both the GitHub hosted runners and the self-hosted runners.
-
Felipe de Azevedo Piovezan authored
This function has no mutable behavior
-
David Goldblatt authored
The definition of the pointer of the memory location being queried is always one such context. Even this conservative guess can be better than no guess at all in some cases. Fixes #64666 Co-authored-by:David Goldblatt <davidgoldblatt@meta.com>
-
Tom Stellard authored
There are a few test that check access permissions, so they need to be disabled when running the tests as root. The most common use case for running tests as root is inside of a container. GitHub Actions, for example, only supports running the root user inside of containers, so this change is necessary in order to run the tests inside of a container running in the GitHub Actions environment.
-
madanial0 authored
The test case is for x86_64 adding powerpc as unsupported. Co-authored-by:Mark Danial <mark.danial@ibm.com>
-
Alan Phipps authored
Part 3 of 3. This includes the MC/DC clang front-end components. Differential Revision: https://reviews.llvm.org/D138849
-
Valentin Clement authored
-
Adrian Prantl authored
-
Pete Steinfeld authored
[Flang] Revert "Allow Intrinsic simpification with min/maxloc dim and…scalar result (#76194)" This reverts commit 9b7cf5bf. See merge request #76194. This change was causing several failures in our internal tests. I'm reverting now and will work on creating a test that David Green can use to reproduce the problem.
-
Craig Topper authored
As far as I can tell if getIndexedAddressParts received an ISD::SUB, the constant would be negated. So `IsInc` should be set to true since the SUB was effectively converted to ADD. This means we should never use PRE_DEC/POST_DEC. No tests are affected because DAGCombine aggressively turns SUB with constant into ADD so no lit test has a SUB reach getIndexedAddressParts.
-
Zequan Wu authored
-
刘雨培 authored
Currently, due to the incomplete implementation of p0588r1, the instantiation of lambda expressions leads to the instantiation of the body. And `EvaluateConstraints` is false during the instantiation of the body, which causes crashes during the instantiation of the return type requirement: ```cpp template<typename T> concept doesnt_matter = true; template<class T> concept test = []{ return requires(T t) { { t } -> doesnt_matter; // crash }; }(); static_assert(test<int>); ``` Although a complete implementation of p0588r1 can solve these crashes, it will take some time. Therefore, this pull request aims to fix these crashes first. Fixes https://github.com/llvm/llvm-project/issues/63808 Fixes https://github.com/llvm/llvm-project/issues/64607 Fixes https://github.com/llvm/llvm-project/issues/64086 -
Adrian Prantl authored
-
Nishant Mittal authored
-
Andrzej Warzyński authored
-
Simon Pilgrim authored
We try to use X32 for gnux32 triples only.
-