[MISched] Enable store sequencing by default (#235948)
Enables the store-sequencing DAG construction algorithm by default on
all targets and updates tests accordingly. The following is a list of
tests which I updated by hand, alongside the resolution I made in each
case:
- `AArch64/aarch64-stp-cluster.ll`, added an extra `store` to act as
sequencing store;
- `AArch64/arm64-misched-memdep-bug.ll`, updated `CHECK` lines;
- `AArch64/dag-maps-huge-region.ll`, disabled store-sequencing (this
test will be dropped);
- `AArch64/misched-bundle.mir`, updated `CHECK` lines;
- `AArch64/tailcall_misched_graph.ll`, updated `CHECK` lines;
- `AMDGPU/ds-combine-with-dependence.ll`, swapped reordered `CHECK`
lines;
- `AMDGPU/schedule-relaxed-occupancy.ll`, updated `CHECK` lines;
- `AMDGPU/swp-amdgpu-pipeline-loop-carried-mem.mir`, disabled store
sequencing (the test is correct with store sequencing enabled, but a
loop carried edge is subsumed by a new intra-iteration barrier edge, so
[16 lines not shown]
[RelLookupTableConverter] Add support for phi/select uses (#245614)
This adds support for converting lookup tables that are used through phi
or select nodes, which can for example be introduced though SimplifyCFG
common code sinking.
The use walk now looks through phi and select instructions. For these it
requires that all phi/select operands can be converted to relative
tables, and converts all of them at once.
To support this, the replacement logic now rewrites the uses while still
referring to the original table, and then replaces the tables with RAUW.
This avoids the need to track or recreate the phi/select nodes.
There's still a small limitation here in that the "all operands must be
convertible" check effectively precludes nested phis/selects, as it's
not recursive.
clang size-data drops by 1.73%.
Fixes https://github.com/llvm/llvm-project/issues/243901.
py-vermin: added version 1.9.2
Concurrently detect the minimum Python versions needed to run code.
Additionally, since the code is vanilla Python, and it doesn't have any
external dependencies, it can be run with v3+ but still includes detection of
v2.x functionality.
[mlir][affine] Implement PromotableRegionOpInterface for AffineIfOp (#225388)
Follow-up to #221123 to use the structured mem2reg pass on affine if
operations.
[Inliner] Remove unused functions with trivial comdat eagerly (#245935)
Inlining was dropping functions that become unused as a result of
inlining eagerly, as this impacts the single-call bonus. However, this
is not done for functions in comdats, as this requires all functions in
the comdat to be dead.
This adds a special case for trivial comdats, where the function is the
only member. This has become more relevant after the introduction of
module-local hints in https://github.com/llvm/llvm-project/pull/228074,
as linkonce_odr functions (which will typically have a comdat) can now
be subject to the single-call bonus.
This gives a 1.2% compile-time improvement on tramp3d-v4. This is
because we end up inlining a call earlier and do less redundant
simplification. In other cases, it could probably also regress
compile-time by enabling more inlining overall.
[SystemZ] Fix aliasing bug with vec_scatter/gather_element (#245724)
The implementation of vec_scatter_element and vec_gather_element in
vecintrin.h could in some cases violate aliasing rules.
Fix by using __builtin_memcpy rather than pointer cast.
Fixes: https://github.com/llvm/llvm-project/issues/244085
[clang] Allow fixed-point to bool enumeration conversions (#245853)
Fixes #245850.
Since #244494, `Type::getScalarTypeKind()` returns `STK_Bool` for an
enumeration
with a fixed bool underlying type, so converting a fixed-point value to
such an
enumeration selects `CK_FixedPointToBoolean`. `VisitCastExpr()` still
asserts
that the destination of that cast kind is `bool`, which crashes an
assertions
build:
```c
enum E : bool { F, T };
enum E to_enum(_Accum x) { return (enum E)x; } /* clang -std=c23 -ffixed-point */
```
[4 lines not shown]
AArch64: Fold SVE deinterleaving zero extensions into transposes (#241199)
Transform deinterleave-and-zero-extend patterns into TRN1/2 operations
using a zero vector, and add code-gen tests.
[AI disclosure] I used AI to explore and understand the codebase,
understand the problem scope, find existing relevant functions and
examples, but the implementation is written entirely by myself.
devel/patchelf: Fix a runtime issue on SunOS (again)
Turned out my previous fix was incomplete, as there were more sections that
needed to update. This time it *should* be working.
[LICM] Use EarliestEscapeAnalysis when checking for in-loop clobbers (#236520)
LICM's clobber check treated an object captured anywhere in the function
as possibly aliased by pointers loaded or returned in the loop. With
EarliestEscapeAnalysis only captures before the pointer is obtained
count.
Objects captured only after the loop or on an unwind path no longer
block hoisting.
EarliestEscapeAnalysis is already used by MemDep, MemCpyOpt and DSE.
[AArch64][NFC] Add [de]interleave6 tests (#245247)
interleave6 and deinterleave6 already have support for custom lowering
using st3/ld3 and uzp/zip, but was missing test coverage for a sequence
where values are interleaved and stored, or loaded and deinterleaved.
Assisted-by: Codex