[lit] Add --fn to prepend llvm-extract for function-level test narrowing
Add a --fn=name1,name2 flag to llvm-lit that prepends
llvm-extract --func=<name> to the first pipeline stage of each
RUN line whose first stage references %s. This lets users narrow
IR tests to specific functions and their dependencies without
modifying test files.
[BOLT][NFC] Split out function marking from profile parsing
Move out `setHasProfileAvailable` into `markFunctionsWithProfile`.
This also allows extracting per-pre-aggregated type handling in
`parseAggregatedLBREntry` into a switch statement.
Test Plan:
NFC
Processing time change (wall time):
* 10MB pre-aggregated profile:
- Parsing aggregated branch events: 0.16s -> 0.05s
- Pre-process profile data (parsing+marking): 0.18s -> 0.16s
* 6GB perf.data file:
- Parsing branch events: 29.06s -> 28.55s
- Pre-process profile data (excluding perf script): 29.47s -> 29.13s
Reviewers:
[2 lines not shown]
[LLD][COFF] Gate second-dot section-name stripping on MinGW (#199625)
The comment in getOutputSectionName has always called the second-dot
stripping "for MinGW" (e.g. .ctors.NNNN), but the code applied it on
every target. This hiddes a split-dwarf bug #199616.
Take an isMinGW gate and skip the stripping when it is false.
[llvm-mca] Fix total execution count in Average Wait times (#199500)
Fix the column `0` for the `<total>` row in llvm-mca's `Average Wait times` report. The `total`
row now represents the total dynamic execution count used to normalize the averages,
instead of the per-instruction iteration count. Update the timeline view docs and autogenerated
test expectations accordingly.
Co-authored-by: liuxiaodong <liuxiaodong at sunmmio.com>
Compute GUIDs once and store in metadata (#184065)
This allows us to keep GUIDs consistent across compilation phases which
may change the name or linkage type.
See https://discourse.llvm.org/t/rfc-keep-globalvalue-guids-stable/84801
This is a large change since the addition of metadata breaks many tests.
The test changes are mostly just trivial changes to checks to get them
passing.
[Clang] Emit prefix map normalization before generating hashes for the unique linkage names. (#198667)
Use normalized path from the macro prefix map to generate the unique ids
for the internal linkage names. That allows a reproducible hash on any
build system. Regularly the macro prefix map gets normalized in favor of
the target system before the path substitution.
[LV] Add support for partial alias masking with tail folding (#182457)
This patch adds basic support for partial alias masking, which allows
entering the vector loop even when there is aliasing within a single
vector iteration. It does this by clamping the VF to the safe distance
between pointers. This allows the runtime VF to be anywhere from 2 to
the "static" VF.
Conceptually, this transform looks like:
```
// `c` and `b` may alias.
for (int i = 0; i < n; i++) {
c[i] = a[i] + b[i];
}
```
->
[33 lines not shown]
[lit][NFC] remove new-style class opt-ins (#199784)
In Python 3.0 and later it is no longer necessary to explicitly derive
from `object` to opt into "new-style" classes, they are the default.
Since the current minimum Python version is 3.8, this is no longer
required. This patch removes `object` from the base class lists of all
affected classes in lit.
Fixes for buildbot breaks in #183153
Attempt at fixing issues in #183153 caught by buildbots, specifically
no-assert and windows builds.
Not sure how to run those bots ahead of landing this?
Change-Id: I285adf09ac2df239d0ab05459f7388b6970247ad
[AArch64] Fix hasNearbyPairedStore to handle non-inbounds GEPs (#199137)
Problem: `hasNearbyPairedStore` uses
`stripAndAccumulateInBoundsConstantOffsets` to decompose store pointers
into (base, offset) pairs and check whether two stores are 16 bytes
apart. This fails when LSR has rewritten pointer arithmetic into
non-inbounds GEPs because the function refuses to look through them. The
two stores then appear to have different base pointers and the check
returns false. When this happens, `lowerInterleavedStore` proceeds to
emit `ST2` for a pattern that would be more profitable as `zip+stp`,
since the load-store optimizer can pair adjacent stores into `STP` but
cannot merge `ST2` with anything. On a bf16-to-fp32 NEON conversion loop
this causes a regression from 11 to 17 instructions per iteration.
Note: Interleaved stores support was added for RISCV in
https://github.com/llvm/llvm-project/pull/115354. Turning this off
produces the desired STP instructions.
https://godbolt.org/z/1afsjPd3e
[7 lines not shown]
[flang] Enabled pulling of rebox into array_coor. (#199161)
This patch enables pulling slicing `fir.rebox` operations
into `fir.array_coor`. This helps preserve information about
the original rank of the array being accessed.
`FIRToMemRef` and later passes may benefit from this.
Assisted by: Claude
[flang][FIRToMemRef] Get strides from descriptor for some array_coor cases. (#199158)
This is a follow-up on Jean's comment
https://github.com/llvm/llvm-project/pull/198933#discussion_r3279535746
This patch makes use of the descriptor strides when `fir.array_coor`'s
memref is a `fir.box` that is not a fir.embox result.
[LoopFusion] Do not fuse loops with different guards (#199724)
The testcase that was originally contributed to #193641 exposed a
functional issue in which loop fusion can fuse functions with different
loop guards. There seem to two distinct bugs and each of them alone is
enough to let this happen.
- The condition that checks loop guards are identical, intends to
exclude loops that require peeling. But the condition is not correct and
it allows some loops that do not require peeling to pass.
- The condition that checks two guards are identical implicitly assume
conditions of guard branches are instructions, but this is not
necessarily always correct.
This patch fixes the problem for the loops that do not require peeling.
The issue still exists for loops that require peeling and will be fixed
separately.