[SSAF][NFC] Rename operator new/delete pointers analysis to TypeConstrainedPointers
There will be more such pointer entities that must retain their type
during the clang-reforge transformation. Since they are extracted and
processed similarly, combining them into a single analysis simplifies
maintenance. Therefore, we are using TypeConstrainedPointers as the
umbrella name.
AMDGPU: Migrate Analysis/Transforms tests to amdgpu subarch triple (4) (#208812)
Continue migrating command-line target spelling on RUN lines to the
folded amdgpu subarch triple form, covering the remaining Transforms tests in
this group.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
[lldb][test] Update whitespace of `register read` in some tests (#208838)
#188049 changed the formatting of `register read` output. A few tests
are failing now due to small space changes.
[Clang] [C++26] Expansion Statements (P1306R5) (#169680)
This implements C++26's expansion statements, i.e.
[P1306R5](https://wg21.link/P1306R5).
An expansion statement is implemented using a number of new AST
nodes. Since an expansion statement is a template, we need it to be
a dependent DeclContext, but only nodes that inherit from Decl can
be DeclContexts, for which reason this introduces a CXXExpansionStmtDecl.
This holds a synthesised constant template parameter used as the
expansion index as well as a 'CXXExpansionStmtPattern' and a
'CXXExpansionStmtInstantiation.
These two AST nodes are similar to the semantic vs syntactic form
of an InitListExpr: the 'Pattern' represents an unexpanded expansion
statement, and the resulting AST after expansion is stored in an
'Instantiation'.
Since expansion statements require us to perform template instantiation
[9 lines not shown]
[GettingStarted] Clarify Python requirement. (#208790)
We don't support building LLVM without python in any configuration;
clarify that it's a hard requirement.
[clang-doc][nfc] Remove stale FIXME (#208795)
This was fixed a long time ago when relanding arena support. This FIXME
was missed when we folded in the deep copying to the reland. It can
safely be removed, as the situation it warns about cannot happen
anymore.
[flang][OpenMP] Address post-merge feedback for metadirective loop-nest checks
- Rename mayVariantBeSelected to MayVariantBeSelected and move it from
check-omp-variant.cpp into the shared openmp-utils, next to
MakeVariantMatchInfo, so declare-variant checking can reuse it.
- Explain why the WHEN clause records its context selector only when the
modifier list holds exactly one modifier.
- Diagnose a loop-associated metadirective variant in a declaration-only
program unit (e.g. a module specification part). Such a unit has no
execution part whose first construct could be the associated loop nest,
so any variants still pending at the end of the program unit are now
validated instead of silently ignored. Add a Semantics test for the
module case.
[VPlan] Enable CSE of VPWidenPHIRecipe. (#207573)
Add VPWidenPHIRecipe to the set of recipes CSE can handle. Besides their
operands (incoming values), they also depend on their predecessors, so
canHandle checks for that.
PR: https://github.com/llvm/llvm-project/pull/207573/
[clangd][remote] Fix SmallVector assertion in uriToRelativePath for Windows paths (#208830)
After https://github.com/llvm/llvm-project/pull/207202 buildbot has
detected a new failure.
Assertion happens in newly created test:
```
ClangdTests: /vol/worker/clangd-ubuntu-clang/clangd-ubuntu-tsan/llvm-project/llvm/include/llvm/ADT/SmallVector.h:196: void llvm::SmallVectorTemplateCommon<char>::assertSafeToReferenceAfterResize(const void *, size_t) [T = char]: Assertion `isSafeToReferenceAfterResize(Elt, NewSize) && "Attempting to reference an element of the vector in an operation " "that invalidates it"' failed.
```
The root cause is that `Path` is a `StringRef` aliasing `Result`s
buffer. Assigning `Result` to `Path.drop_front()` triggers
`SmallVector`s `assertSafeToReferenceAfterResize` assertion (that
assertion checks if we are passing an iterator that points into the own
buffer).
With this patch we convert `Path.drop_front()` to `std::string` to break
the aliasing before assignment.
[mlir][scf] Validate pipelining annotations in test pass (#208788)
I made the SCF pipelining test pass validate malformed scheduling
annotations before building the schedule. Bad annotations now produce
diagnostics instead of crashing, while valid schedules keep using the
existing path.
Fixes #206918
AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (8)
Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (7)
Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (6)
Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (5)
Mechanically migrate the command-line target spelling on llc/opt RUN lines in
llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the folded
subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
clang/AMDGPU: Remove driver restriction on --gpu-max-threads-per-block
Previously this flag was only handled for HIP, and would produce an unused
argument warning. There is a custom warning produced by cc1 that the
argument isn't supported, but practically speaking that was unreachable
due to not forwarding the argument. Also add a test for the untested warning.
Also use a simpler method for forwarding the flag to cc1.
AMDGPU: Migrate Analysis/Transforms tests to amdgpu subarch triple (4)
Continue migrating command-line target spelling on RUN lines to the folded
amdgpu subarch triple form, covering the remaining Transforms tests in this
group.
Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
[CMake] Use minimum python version of 3.8 everywhere (#208822)
We used to set a minimum of 3.0, and only 3.8 if tests were enabled. But
it doesn't seem like anyone is actually testing this config and it just
seems to cause more confusion/breakage than anything else, so just set
the global minimum to 3.8.
[SimplifyCFG] Do not thread branches into uncontrolled convergent regions
SimplifyCFG's foldCondBranchOnValueKnownInPredecessor can thread an edge past
a block that acts as a reconvergence point. If the threaded destination reaches
an uncontrolled convergent operation before returning to the threaded-through
block, the transform can change which dynamic instance of the convergent
operation is executed.
Add a conservative destination scan for this fold and skip the threading
candidate when it can reach an uncontrolled convergent call before returning
to the original block. Controlled convergent operations using convergence
control tokens are left alone.
Fixes ROCM-26496.
[Hexagon] Recompute physreg live-ins after HexagonRDFOpt (PR207422) (#208050)
HexagonRDFOpt's Liveness recomputation (LV.resetLiveIns) can leave
stale, over-approximate physical register live-ins on some blocks.
Downstream this has surfaced as If Converter inserting incorrect
implicit-use operands on predicated loads, tripping the machine verifier
with 'Using an undefined physical register'.
Run a conventional backward liveness recomputation after the RDF update
to correct the live-in lists. The entry block is skipped because its
live-ins reflect the calling convention and include argument registers
that may not be read directly.
clang/AMDGPU: Fix double linking opencl libs with --libclc-lib (#204865)
Noticed by inspection. If using an explicit --libclc-lib flag,
do not attempt to also link the rocm device libs which will contain
different implementations of the same opencl symbols.
Co-Authored-By: Claude <noreply at anthropic.com>