- Apr 13, 2022
-
-
Matt Arsenault authored
This code was pattern matching the ID computation expression as it appears in the library. This was a compare and select, but now that umin is canonical, we were no longer matching. Update to match the intrinsic instead.
-
Muhammad Omair Javaid authored
This reverts commit 64b6192e. This broke LLVM AArch64 buildbot clang-aarch64-sve-vls-2stage: https://lab.llvm.org/buildbot/#/builders/176/builds/1515 llvm-tblgen crashes after applying this patch.
-
Arthur Eubanks authored
-
Matt Arsenault authored
The condition in canEvictInterferenceBasedOnCost is slightly different from the assertion in evictInteference. canEvictInterferenceBasedOnCost uses a <= check for the cascade number for legality, but the assert was checking for <. For equal cascade numbers for an urgent eviction, canEvictInterferenceBasedOnCost could return success. The actual eviction would then hit this assert. Avoid ever returning true for equivalent cascade numbers. The resulting failed allocation seems a bit off to me. e.g. in illegal-eviction-assert.mir, I wuold assume %0 gets allocated starting at $vgpr0. That was its initial allocation choice, but was later evicted. In this example no evictions can help improve anything.
-
Stanislav Mekhanoshin authored
Similarly to 3 DWORD operations it is better for performance to split unlaligned operations as long a these are at least DWORD alignmened. Performance data: ``` Using platform: AMD Accelerated Parallel Processing Using device: gfx900:xnack- ds_write_b128 aligned by 16: 4.9 sec ds_write2_b64 aligned by 16: 5.1 sec ds_write2_b32 * 2 aligned by 16: 5.5 sec ds_write_b128 aligned by 1: 8.1 sec ds_write2_b64 aligned by 1: 8.7 sec ds_write2_b32 * 2 aligned by 1: 14.0 sec ds_write_b128 aligned by 2: 8.1 sec ds_write2_b64 aligned by 2: 8.7 sec ds_write2_b32 * 2 aligned by 2: 14.0 sec ds_write_b128 aligned by 4: 5.6 sec ds_write2_b64 aligned by 4: 8.7 sec ds_write2_b32 * 2 aligned by 4: 5.6 sec ds_write_b128 aligned by 8: 5.6 sec ds_write2_b64 aligned by 8: 5.1 sec ds_write2_b32 * 2 aligned by 8: 5.6 sec ds_read_b128 aligned by 16: 3.8 sec ds_read2_b64 aligned by 16: 3.8 sec ds_read2_b32 * 2 aligned by 16: 4.0 sec ds_read_b128 aligned by 1: 4.6 sec ds_read2_b64 aligned by 1: 8.1 sec ds_read2_b32 * 2 aligned by 1: 14.0 sec ds_read_b128 aligned by 2: 4.6 sec ds_read2_b64 aligned by 2: 8.1 sec ds_read2_b32 * 2 aligned by 2: 14.0 sec ds_read_b128 aligned by 4: 4.6 sec ds_read2_b64 aligned by 4: 8.1 sec ds_read2_b32 * 2 aligned by 4: 4.0 sec ds_read_b128 aligned by 8: 4.6 sec ds_read2_b64 aligned by 8: 3.8 sec ds_read2_b32 * 2 aligned by 8: 4.0 sec Using platform: AMD Accelerated Parallel Processing Using device: gfx1030 ds_write_b128 aligned by 16: 6.2 sec ds_write2_b64 aligned by 16: 7.1 sec ds_write2_b32 * 2 aligned by 16: 7.6 sec ds_write_b128 aligned by 1: 24.1 sec ds_write2_b64 aligned by 1: 25.2 sec ds_write2_b32 * 2 aligned by 1: 43.7 sec ds_write_b128 aligned by 2: 24.1 sec ds_write2_b64 aligned by 2: 25.1 sec ds_write2_b32 * 2 aligned by 2: 43.7 sec ds_write_b128 aligned by 4: 14.4 sec ds_write2_b64 aligned by 4: 25.1 sec ds_write2_b32 * 2 aligned by 4: 7.6 sec ds_write_b128 aligned by 8: 14.4 sec ds_write2_b64 aligned by 8: 7.1 sec ds_write2_b32 * 2 aligned by 8: 7.6 sec ds_read_b128 aligned by 16: 6.2 sec ds_read2_b64 aligned by 16: 6.3 sec ds_read2_b32 * 2 aligned by 16: 7.5 sec ds_read_b128 aligned by 1: 12.5 sec ds_read2_b64 aligned by 1: 24.0 sec ds_read2_b32 * 2 aligned by 1: 43.6 sec ds_read_b128 aligned by 2: 12.5 sec ds_read2_b64 aligned by 2: 24.0 sec ds_read2_b32 * 2 aligned by 2: 43.6 sec ds_read_b128 aligned by 4: 12.5 sec ds_read2_b64 aligned by 4: 24.0 sec ds_read2_b32 * 2 aligned by 4: 7.5 sec ds_read_b128 aligned by 8: 12.5 sec ds_read2_b64 aligned by 8: 6.3 sec ds_read2_b32 * 2 aligned by 8: 7.5 sec ``` Differential Revision: https://reviews.llvm.org/D123634
-
Lang Hames authored
-
Matt Arsenault authored
This is a replacement for the original fix attempted in c46aab01. This fixes "overlapping insert" assertion failures when trying to unwind an unsuccessful recoloring attempt. The problem would occur when there are multiple recoloring candidates which recursively required recoloring. If one recoloring candidate was successfully recolored at one level, and the next recoloring candidate was unsuccessful, we would not roll back the first candidates successful recoloring. The forgotten successful recoloring may have been assigned to something that conflicts with a register that needs to be restored in a parent recoloring attempt. See the testcase added in issue48473 for a more concrete example with explanation.
-
Lang Hames authored
-
owenca authored
Differential Revision: https://reviews.llvm.org/D123535
-
Yuanfang Chen authored
-
Arthur Eubanks authored
Mismatched call/callee function types is considered an indirect call. Fixes crash in https://reviews.llvm.org/D123300#3446023.
-
Lang Hames authored
-
Nikita Popov authored
We need to explicitly query the shadow here, because it is lazily initialized for byval arguments. Without opaque pointers this used to mostly work out, because there would be a bitcast to `i8*` present, and that would query, and copy in case of byval, the argument shadow. Reviewed By: vitalybuka, eugenis Differential Revision: https://reviews.llvm.org/D123602
-
Vitaly Buka authored
Invalid author. This reverts commit 163a9f45.
-
Yuanfang Chen authored
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation). The shards are executed by the test runner and the results are stored in the json format supported by the GoogleTest. Later in the test reporting stage, all test results in the json file are retrieved to continue the test results summary etc. On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s. On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s. Reviewed By: yln, rnk, abrachet Differential Revision: https://reviews.llvm.org/D122251
-
Vitaly Buka authored
We need to explicitly query the shadow here, because it is lazily initialized for byval arguments. Without opaque pointers this used to mostly work out, because there would be a bitcast to `i8*` present, and that would query, and copy in case of byval, the argument shadow. Reviewed By: vitalybuka, eugenis Differential Revision: https://reviews.llvm.org/D123602
-
Johannes Doerfert authored
This is a long standing problem that resurfaces once in a while [0]. There might actually be two problems because I'm not 100% sure if the issue underlying https://reviews.llvm.org/D115302 would be solved by this or not. Anyway. In 2008 we thought intrinsics do not read/write globals passed to them: https://github.com/llvm/llvm-project/commit/d4133ac31535ce5176f97e9fc81825af8a808760 This is not correct given that intrinsics can synchronize threads and cause effects to effectively become visible. NOTE: I did not yet modify any tests but only tried out the reproducer of https://github.com/llvm/llvm-project/issues/54851. Fixes: https://github.com/llvm/llvm-project/issues/54851 [0] https://discourse.llvm.org/t/bug-gvn-memdep-bug-in-the-presence-of-intrinsics/59402 Differential Revision: https://reviews.llvm.org/D123531
-
Johannes Doerfert authored
Differential Revision: https://reviews.llvm.org/D123522
-
Johannes Doerfert authored
Differential Revision: https://reviews.llvm.org/D123445
-
Matt Arsenault authored
For stores to constant address space, this will now consistently hit a selection error instead of hitting unreachable in an asserts build. I'm not sure what we should really do here. We could either just codegen as if it were global, delete the instruction, or declare the IR invalid (we really should have a target IR verifier to enforce it).
-
owenca authored
Differential Revision: https://reviews.llvm.org/D123535
-
Matt Arsenault authored
-
Matt Arsenault authored
These have no net effect on the legalize rules.
-
Matt Arsenault authored
This was making several invalid assumptions about the incoming select. First, it was assuming the incoming condition was either s1 or already sign extended, not accounting for different boolean high bits behavior between scalar and vector conditions. We only had a vector boolean due to the intermediate step vector select, which is now avoided. Second, it was assuming it can use the result vector type as a boolean mask. These types don't have anything to do with other, and only makes sense in the context of the expansion to bit operations. Since these logically are part of the same lowering, do the complete expansion in a single step. The added select_v4s1_s1 test does fail to legalize, since it seems AArch64's vector legalization support is pretty incomplete.
-
Matt Arsenault authored
This will be tested in a future patch
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Craig Topper authored
This moves the encoding handling out of the assembly parser. Reviewed By: khchen, frasercrmck Differential Revision: https://reviews.llvm.org/D123553
-
Quinn Pham authored
This patch changes `EmitPPCBuiltinExpr` in `CGBuiltin.cpp` to remove the loop at the beginning of the function that emits the arguments and to delay emitting the arguments until inside the switch statement. These changes will put `EmitPPCBuiltinExpr` in line with the strategy of the target independent function `EmitBuiltinExpr`. Also, this patch ensures that arguments are only emitted once. Tests that included builtins affected by these changes have been modified to match expected behaviour. Reviewed By: #powerpc, nemanjai, amyk Differential Revision: https://reviews.llvm.org/D121637
-
Fangrui Song authored
-
Fangrui Song authored
It (introduced by 556d713c) appears to be related to the removed dragonegg project. In addition, the feature was a bit misnamed and may lur users to unnecessarily use it.
-
Walter Erquinigo authored
Something ugly I did was to report the trace buffer size to the DecodedThread, which is later used as part of the `dump info` command. Instead of doing that, we can just directly ask the trace for the raw buffer and print its size. I thought about not asking for the entire trace but instead just for its size, but in this case, as our traces as not extremely big, I prefer to ask for the entire trace, ensuring it could be fetched, and then print its size. Differential Revision: https://reviews.llvm.org/D123358
-
Walter Erquinigo authored
I'm adding two new classes that can be used to measure the duration of long tasks as process and thread level, e.g. decoding, fetching data from lldb-server, etc. In this first patch, I'm using it to measure the time it takes to decode each thread, which is printed out with the `dump info` command. In a later patch I'll start adding process-level tasks and I might move these classes to the upper Trace level, instead of having them in the intel-pt plugin. I might need to do that anyway in the future when we have to measure HTR. For now, I want to keep the impact of this change minimal. With it, I was able to generate the following info of a very big trace: ``` (lldb) thread trace dump info Trace technology: intel-pt thread #1: tid = 616081 Total number of instructions: 9729366 Memory usage: Raw trace size: 1024 KiB Total approximate memory usage (excluding raw trace): 123517.34 KiB Average memory usage per instruction (excluding raw trace): 13.00 bytes Timing: Decoding instructions: 1.62s Errors: Number of TSC decoding errors: 0 ``` As seen above, it took 1.62 seconds to decode 9.7M instructions. This is great news, as we don't need to do any optimization work in this area. Differential Revision: https://reviews.llvm.org/D123357 -
Fangrui Song authored
https://reviews.llvm.org/D123562#3446485 reported that the test failed on arm-linux-android.
-
Daniel Grumberg authored
Anonymous enums without a typedef should have a "(anonymous)" identifier. Differential Revision: https://reviews.llvm.org/D123533
-
Changpeng Fang authored
Summary: Introduce a new function attribute, amdgpu-no-multigrid-sync-arg, which is default. We use implicitarg_ptr + offset to check whether the multigrid synchronization pointer is used. If yes, we remove this attribute and also remove amdgpu-no-implicitarg-ptr. We generate metadata for the hidden_multigrid_sync_arg only when the amdgpu-no-multigrid-sync-arg attribute is removed from the function. Reviewers: arsenm, sameerds, b-sumner and foad Differential Revision: https://reviews.llvm.org/D123548
-
Stanislav Mekhanoshin authored
-