[CycleInfo] Identify cycles with a single-pass DFS algorithm (#210491)
Replace the Havlak-Tarjan construction in GenericCycleInfoCompute, a DFS
followed by a reverse-preorder scan, with the single-pass algorithm of
Wei, Mao, Zou and Chen, "A New Algorithm for Identifying Loops in
Decompilation" (SAS 2007). One depth-first traversal tags every block
with its innermost loop header on the fly; tagLoopHeader weaves the
per-block header chains, replacing UNION-FIND.
The flat forest is reconstructed from the tags, dropping the temporary
cycle objects and the per-block worklist passes. An edge re-entering an
already-closed cycle records non-header entries, so entries need no
predecessor scan.
The cycle sets, headers, reducibility and nesting are identical for the
given DFS order, cross-checked against the old construction on random
reducible and irreducible CFGs. Two implementation-defined orders change
(with minor test churn): sibling cycles are laid out in decreasing
header preorder, and non-header entries in block preorder.
[6 lines not shown]
Revert "[flang][OpenMP] Fix new metadirective-loop-nest.f90 test expectation with collapse changes in #208528" (#210860)
Reverts llvm/llvm-project#210753
Revert with #208528 pending llvm-test-suite fix.
[Clang][AIX] Switch -mloadtime-comment-vars name matching to mangled IR names
Replace source-qualified name matching in matchesLoadTimeCommentVarName with
mangled IR symbol name matching via getMangledName(GlobalDecl(VD)).
[ProfileData] Refactor SampleProfileNameTable into a polymorphic class hierarchy (NFC) (#210252)
This patch refactors SampleProfileNameTable into an abstract base
class with concrete derived classes like LazySampleProfileNameTable
and EagerSampleProfileNameTable.
The motivation is twofold:
- I want each derived class to focus on one data representation
instead of using complex if-then-else. Plus, I'm planning to
introduce one more data representation [1].
- I want each class to be populated and ready for use as soon as it is
constructed. That is, there is no intermediate state like
"constructed but waiting to be populated".
Now, you might notice that the iterator uses virtual operator[]. I
would argue that this is acceptable. We have three places where we
iterate over the entire range of the name table entries. Two of
[8 lines not shown]
[TableGen] Add sub-register overflow tests for exact-fit and non-covered registers (#210529)
Follow-up to #206346. Adds two cases the overflow check's companion test
missed: an exact-fit tiling that must be accepted, and a register
without `CoveredBySubRegs` that must be left alone. Test only.
[NFC][SLP] Precommit tests for ordered fadd-reduction FMA-fusion cost (#210835)
Baseline coverage for an ordered fadd-of-fmul reduction that is
currently vectorized even on FMA-capable targets, breaking the scalar
fmul + fadd -> fma fusion. A follow-up teaches the reduction cost model
to account for the lost fusion and keep these reductions scalar, at
which point these CHECK lines update. Covers X86 avx2, AMDGPU gfx90a and
NVPTX sm_80.
It is a pre-requisite for
https://github.com/llvm/llvm-project/pull/210399
Assisted-By: Claude Opus 4.8
[docs] Clean up migrated Clang InternalsManual markup
Replace migrated blockquote markup in InternalsManual.md with MyST definition lists where the surrounding text is semantically a term-and-definition list.
[docs] Rename selected Clang docs to Markdown
Rename 18 Clang documentation files from .rst to .md. The clang-format generated docs are split into users/rnk/clang-format-md-rename and users/rnk/clang-format-md-write for separate review.
[docs] Clean up migrated Clang InternalsManual markup
Replace migrated blockquote markup in InternalsManual.md with MyST definition lists where the surrounding text is semantically a term-and-definition list.
[docs] Rename selected Clang docs to Markdown
Rename 18 Clang documentation files from .rst to .md. The clang-format generated docs are split into users/rnk/clang-format-md-rename and users/rnk/clang-format-md-write for separate review.
[LoopInfo][LCSSA] Handle token-like values (#210816)
Token-like values have many (but not all) of the same restrictions as
regular token values.
They do however inherit the restriction on being placed in PHI and thus
they need to be
treated like regular tokens in LCSSA.
AI Disclosure: Written by GPT 5.6 - flagged during GPT 5.6 review of
#151062 rebase.