[NFC][SLP] Refactor so that CostKind is a property of BoUpSLP (#217463)
Track in just one place so we can adjust as needed.
Precursor to #217398.
AI Usage: Assisted by Codex
AMDGPU: Remove remaining uses of old manual bitset of target features. (#217748)
Use new feature bitset for sgpr-init-bug checks, and remove the
remaining llvm uses of getArchAttrAMDGCN in favor of the new feature
bitset.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[Flang][OpenMP] add more OpenMP support entries and status updates (#212889)
This adds a feature table for OpenMP 4.5 to the Flang OpenMP support
page, and also updates various entries (PR links, status, Claimed By
column for some in progress features, Notes).
[GISel][NewPM] Port RegBankSelect
Standard NewPM pass porting. A little bit more analysis plumbing than
normal.
* Plumb both Pass*/MachineFunctionAnalysisManager* for critical edge
splitting analysis updates.
* Plumb through functions to get MBFI/MBPI both cached and non-cached.
* Move the Impl class to the C++ file to try and keep the size of
RegBankSelect.h small.
Reviewers: arsenm, mshockwave, aemerson, lenary, wangpc-pp
Pull Request: https://github.com/llvm/llvm-project/pull/217756
[NewPM] Port CFIInstrInserter to the new pass manager
Adds a newPM pass for CFIInstrInserter (cfi-instr-inserter).
- Extracts the pass's working state (MBBVector, CSRLocMap) and logic
into a CFIInstrInserterImpl class with a run method, called by both
the legacy pass and the new pass manager pass.
- Renames the old pass with the "Legacy" suffix.
- Adds the new pass manager pass CFIInstrInserterPass, using
RequiredPassInfoMixin: the legacy pass's runOnMachineFunction never
calls skipFunction, so it always runs unconditionally and should not
be skippable in the new PM either. run() unconditionally returns
PreservedAnalyses::all(), matching the legacy pass's own
AU.setPreservesAll() declaration -- the same shape CFIFixupPass (an
already-ported sibling CFI pass) already uses.
- Updates MachinePassRegistry.def, PassBuilder, and CodeGenPassBuilder.
- Wires the pass into X86's and RISC-V's newPM pipelines, matching
their existing legacy-PM gating conditions:
- X86 replaces an existing TODO inside an already-correct
[13 lines not shown]
Fix missing CFIInstrInserter.h include after CRTP removal
050470e75fb6 ([CodeGen] Replace CodeGenPassBuilder CRTP with virtual
hooks) moved pass headers out of CodeGenPassBuilder.h and into the
specific translation units that actually call them. FuncletLayout.h's
include followed its call site (the generic base pipeline) into the
new lib/Passes/CodeGenPassBuilder.cpp correctly, and MachineCombiner.h
was already included directly in X86CodeGenPassBuilder.cpp, so neither
needed a fix. CFIInstrInserter.h fell through: it was only ever pulled
in transitively via CodeGenPassBuilder.h, so once that stopped
including pass headers, both X86CodeGenPassBuilder.cpp and
RISCVCodeGenPassBuilder.cpp were left calling CFIInstrInserterPass()
with no declaration in scope.
Assisted-by: Claude Sonnet 5
[llc] set canonical triple in module (#203725)
Prior to this change the effective triple for the TargetMachine and the
triple in the module were determined by different criteria and diverged
in some cases. This can create lots of issues in passes which check the
module triple.
TargetMachine:
1. -march
2. -mtriple
3. target triple in incoming module
4. default target triple
Module:
1. -mtriple
2. target triple in incoming module
Stamp the canonical target triple into the module so that this
divergence is no longer possible.
[SPIRV] Cleanup includes in SPIRVSubtarget.h
This makes some cleanup for NewPM porting easier for RegBankSelect.
SPIRVSubtarget currently transitively depends in RegisterBankInfo.h from
RegBankSelect.h, which we want to remove. Also remove an unused include
while at it.
Reviewers: aeubanks
Pull Request: https://github.com/llvm/llvm-project/pull/217755
[RISCV][NFC] Remove unneeded QC.SelectI<cc>I Patterns (#216837)
The `Select_GPR_Using_CC_GPR` patterns have complexity from 3 to 8,
depending on which exact pattern is being considered. The
`QCISELECTICCIPat` patterns have complexity 11, so would already be
preferred to those documented in the comment, so these additional
patterns with explicit zeroes are not required.
[lldb] Don't overwrite a caller-supplied lookup name (#217491)
MakeLookupInfos takes a lookup_name_override so a caller can say exactly
which name to search the symbol and object files for. The LookupInfo
constructor then replaced it with the basename it got from the language
plugin, so the override was thrown away.
Assisted-by: claude
Factor out genAssignSimple vs genAssign selection into a lambda
The logic for choosing between genAssignSimple and genAssign was
duplicated in the allocatable and non-allocatable paths of
AssignOpConversion. Extract it into a genSimpleOrAssign lambda to
avoid code drift between the two paths.
This also fixes the allocatable path which was missing the
useFortranAssignOnly guard that the non-allocatable path had.
Co-Authored-By: Claude Opus 4 (1M context) <noreply at anthropic.com>
[CIR] Implement fixed-point arithmetic lowering (#217710)
This should be the rest of the lowering for fixed point, so it removes
the `MissingFeatures` listing. It is a faithful re-implementation of
classic-lowering as best I can tell, except the create<COMPARE> ops are
combined.
AMDGPU: Deprecate getArchAttrAMDGCN
The legacy ArchFeatureKind bitfield returned by getArchAttrAMDGCN is being
replaced by getFeatureBitset (FEAT_* bits). All in-tree callers have been
migrated, so mark both overloads LLVM_DEPRECATED to steer out of tree code
to the bitset API before the accessor is removed.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[LV] Regenerate dereferenceable tests with masked mem-ops support (NFC). (#217750)
This cuts down on the file size and makes the IR easier to read. Also
filter out after scalar.ph.
[flang][openacc] Fix nested labeled DO loops sharing a terminator (#217705)
When an OpenACC loop construct is associated with a non-block labeled
DO, GetFinalLabel() did not look through that construct. Nested DO
statements that share a terminating label then failed with "Label is
not in DO loop scope".
Walk the associated loop of OpenACC loop and combined constructs so the
shared label still closes the outer DO.