DAGCombiner: Drop AllowFPOpFusion from isContractableFMUL (#221410)
This is a step toward removing the AllowFPOpFusion field from
TargetOptions.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[LoopInfo] Add recompute() and use it in SimpleLoopUnswitch (#213514)
recomputeLoopBlockSet and rebuildLoopAfterUnswitch reconstruct by hand
with significant complexity, but analyze() cannot replace them: it
allocates a fresh Loop for every header, while ScalarEvolution stores
the loop pointer in every AddRec, the loop analysis manager keys its
cache on it, and the pass manager hands the running pass a `Loop &`.
Add LoopInfoBase::recompute, which reruns the analysis over the current
CFG but refills the loop each header already had.
Block lists now come out in the analysis's canonical order rather than
the original order filtered, renumbering cloned blocks in eight
SimpleLoopUnswitch tests.
Aided by Claude Opus 5
[CIR] Use the modern enum case classes
The `I32EnumAttrCase` family carries an `Attr` half, and an `IntegerAttr`
predicate with it, that a CIR enum has no use for now that the enums derive
from `EnumInfo`. Upstream says of those forms that they "are not needed when
using the newer `EnumCase` form".
Rename all 198 of them to `I32EnumCase`, `I32BitEnumCaseNone`,
`I32BitEnumCaseBit` and `BitEnumCaseGroup`. The group class drops its width
prefix because the modern spelling takes the width from its cases.
NFC, mechanical.
[CIR] Drop the redundant suffix from the inline kind mnemonic
inline_kind was the one CIR enum attribute mnemonic still repeating what its
C++ enum class name says. The attribute now spells
`#cir.inline<always_inline>`. The operation argument keeps the name
inline_kind, since that is the accessor name, so the printed form reads
`inline_kind = #cir.inline<always_inline>`.
The enum's summary also becomes "inline kind" rather than the camelCase
"inlineKind", which is what generated docs show now that CIR_InlineKindAttr
no longer overrides it.
25 CHECK lines change across four test files. Nine are in an
aarch64-registered-target test, unsupported in an X86-only build, but the
substitution matches the two CIR tests that do run.
[CIR] Drop dead ceremony around the CIR enum attributes
Five things that no longer earn their place in the CIR enum attribute
machinery.
CIR_CleanupKindAttr carried three. Its cppClassName restated the default
AttrDef already derives. Its skipDefaultBuilders plus hand-written
AttrBuilder existed only to default $value to CleanupKind::All, which no
caller relies on, so the generated builders stayed suppressed for nothing.
And its summary and description restated the name, overriding the enum's own
"cleanup kind" that EnumAttr would otherwise inherit. The isNormal, isEH and
isNormalAndEH helpers stay.
CIR_TLSModelAttr's summary restated its name the same way, so only that goes.
CIR_DefaultValuedEnumParameter has never had a user.
NFC.
[CIR] Derive lowering attr names from cppClassName, not the def name
CIRLoweringEmitter built its CXX_ABI_ALWAYS_LEGAL_ATTRS entries with
GetOpCppClassName, which splits the TableGen def name at the first
underscore. That works only while every def is named CIR_<CppClassName>Attr.
When one is not, the emitter writes an `isa<>` for a class that does not
exist, and the failure lands as a compile error in generated code.
Attributes carry the authoritative name in cppClassName, which
GenerateAttrToValueVisitor was already reading. Factor that out as
GetAttrCppClassRef and use it for both attribute paths. GetOpCppClassName
stays for operations.
NFC, and checkable. No CIR attribute overrides cppClassName, so the generated
CIRLowering.inc is byte-identical.
[CIR] Migrate GlobalLinkageKind, CallingConv and SideEffect off IntegerAttr
GlobalLinkageKind, CallingConv and SideEffect generated IntegerAttr
subclasses with no dialect spelling of their own. Each now sets
genSpecializedAttr = 0 and gains a CIR_EnumAttr wrapper, and cir.global wraps
$linkage in `enum()`. GlobalLinkageKind spells `#cir.linkage<internal>`,
dropping both the `global_` prefix and the `_kind` suffix.
cir.func and cir.call print all three by hand, but they stream
stringifyGlobalLinkageKind(getLinkage()) and friends, which take the enum
rather than the attribute, so those sites are unchanged.
Operation syntax is unchanged.
[CIR] Migrate the FPClassTest bit enum and unquote its flags
cir.is_fp_class printed its flags inconsistently. Single-bit values came out
bare, as in `fcSNan`, while group values and combinations came out quoted, as
in `"fcInf"` and `"fcSNan|fcNegInf"`. That comes from I32BitEnumAttr setting
printBitEnumQuoted, which EnumAttr.td keeps only for backwards compatibility.
Clearing the bit and using the `enum` directive selects the separator-aware
parser and printer, so every value now spells unquoted:
cir.is_fp_class %x, fcSNan|fcNegInf : (!cir.float) -> !cir.bool
The enum also drops its specialized IntegerAttr for a CIR_EnumAttr wrapper,
giving it the standalone spelling `#cir.fp_class<fcSNan|fcNegInf>`. This
changes operation syntax, so it updates 37 CHECK lines.
[CIR] Move the CIR enums off the legacy EnumAttrInfo hierarchy
MLIR has two enum hierarchies. `EnumAttrInfo` doubles as an `IntegerAttr`
constraint, so every CIR enum had to clear `genSpecializedAttr` to say it did
not want one. `EnumInfo` describes a C++ enum and nothing more.
Derive the CIR bases from `I32Enum`, `I64Enum` and `I32BitEnum`, and widen
`CIR_EnumAttr` to the `EnumInfo` that upstream `EnumAttr` already takes. The
flag no longer exists to clear. `FPClassTestEnum` gets unquoted printing from
`BitEnumBase` rather than overriding `printBitEnumQuoted`, and
`CIR_KnownFuncKind` drops a `parameterPrinter` the generated `operator<<`
now covers, still spelling `#cir.func_identity<"std::find">`.
AMDGPU wraps an `I32Enum` in an `EnumAttr` with this same bracketed format.
Parsing moves to the generated `FieldParser`, whose diagnostic names the
accepted spellings, so two `expected-error` lines change. Generated attribute
code drops 16 KB as 28 inlined parsers collapse into it.
[CIR] Migrate AssumeBundleKind, AtomicFetchKind and AsmFlavor off IntegerAttr
AssumeBundleKind, AtomicFetchKind and AsmFlavor generated IntegerAttr
subclasses with no dialect spelling of their own. Each now sets
genSpecializedAttr = 0 and gains a CIR_EnumAttr wrapper.
Unlike the other CIR operation enums, these three are reached through
hand-written parsers and printers, so they needed checking individually.
cir.atomic.fetch references $binop declaratively and gains an `enum()`
wrapper. The other two need no change, since printAssumeBundle is already
typed on cir::AssumeBundleKindAttr and InlineAsmOp::print streams the enum
rather than the attribute.
Operation syntax is unchanged.
[CIR] Migrate MemOrder and SyncScopeKind off IntegerAttr (#220884)
MemOrder and SyncScopeKind, the enums the atomic operations share,
generated
IntegerAttr subclasses with no dialect spelling of their own.
Both now set genSpecializedAttr = 0 and gain CIR_EnumAttr wrappers,
spelling
`#cir.mem_order<seq_cst>` and `#cir.sync_scope<system>`, and the atomic
operations wrap their arguments in `enum()` to keep the bare keyword.
net/freeradius-client: Update to 1.1.8
The old master sites no longer resolve, so use the upstream git tag.
Add two upstream fixes made after the tag: rc_avpair_gen() is now
iterative, it recursed per attribute on unverified replies, and
vendor-specific attributes reserve room for the VSA header.
Drop the local rc_nasaddress() patch, it has no consumer in the tree.
PR: 297676
Approved by: netch at portaone.com (maintainer timeout)
Sponsored by: Netzkommune GmbH
[clang][amdgpu] resolve type mismatch warning in conditional comparison (#220526)
The following warning is generated because of a mismatch in the object
types.
```bash
/home/xane/Documents/shallowllvm/llvm-project/clang/lib/Basic/Targets/AMDGPU.cpp: In constructor ‘clang::targets::AMDGPUTargetInfo::AMDGPUTargetInfo(const llvm::Triple&, const clang::TargetOptions&)’:
/home/xane/Documents/shallowllvm/llvm-project/clang/lib/Basic/Targets/AMDGPU.cpp:200:37: warning: enumerated mismatch in conditional expression: ‘llvm::AMDGPU::ArchFeatureKind’ vs ‘llvm::AMDGPU::R600FeatureKind’ [-Wenum-compare]
200 | GPUFeatures(Triple.isAMDGCN() ? llvm::AMDGPU::FEATURE_NONE
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
201 | : llvm::AMDGPU::getArchAttrR600(GPUKind)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[1/166] Building CXX object tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/CodeGenPGO.cpp.o^C
```
The type of `GpuFeatures` and return value of `getArchAttrR600()` is
ultimately an `unsigned` int value. Static cast the return value of the
method to `unsigned` to resolve the warning without any functional or
breaking changes.
Signed-off-by: Hardik Kumar <hardikxk at gmail.com>
AMDGPU: Drop AllowFPOpFusion from FMA formation (#221409)
Exclusively use the flags so AllowFPOpFusion can be removed.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
CodeGen: Move frame-pointer queries out of TargetOptions
These used to depend on a TargetOptions field, which was removed
at some point. These are now only depend on MachineFunction,
so move the attribute check there.
Co-authored-by: Claude (Claude-Opus-4.8)
[lldb] Fix SBAPI breakage in SBFrame::GetValueForVariablePath (#218565)
SBFrame::GetValueForVariablePath added new parameters in commit
80fffd527c20ac8970fbffc37c674caa17faa815.
This caused an ABI break because
the ABI is based on the function's mangled name, which changes when
parameters are added. Existing users depend on the original symbol being
present in the library.
changing the ABI from:
```cpp
// _ZN4lldb7SBFrame23GetValueForVariablePathEPKcNS_16DynamicValueTypeE
lldb::SBFrame::GetValueForVariablePath(char const*, lldb::DynamicValueType)
```
to
```cpp
// _ZN4lldb7SBFrame23GetValueForVariablePathEPKcNS_16DynamicValueTypeENS_7DILModeE`
lldb::SBFrame::GetValueForVariablePath(char const*, lldb::DynamicValueType, lldb::DILMode)
```
[47 lines not shown]
[AArch64] Use NoSchedPred for SME instructions in C1 scheduling models.
We can have the scheduling model enabled without SME using -mtune, which means
that no scheduling information was persent for any instructions that execute in
either SME or the core. AFAICT the predicate should be NoSchedPred, as any
instructions should be using the non-streaming scheduling info when not in a
SME function.
This is a cherry-pick of f33ef3a26db25f9a4b75a25af6527304bc03fcb8,
modified to remove the Pro change not present in the llvm-23 branch.
Fixes #220070
Fixes #220067
[clang-tidy] Fix false positives in readability-trailing-comma for designated initializers (#215934)
The problem is that we delete the necessary comma whenever we use
implicit initializer lists. How we solve this is that whenever we see an
implicit initializer list, we do not match ``InitListExpr`` nodes at
all, so that we will not delete the necessary comma. Why we chose this
path is detailed in Alternatives considered.
This produces a fix that breaks valid code (#214087) and one that never
converges (#214086).
<details>
<summary><b>Alternatives considered</b></summary>
### Why not repair the source ranges instead
The synthesized nodes also carry misleading locations - their range is a
snapshot of the designator that caused them to be created, so it need
not cover their own children. The anonymous-struct node in #214087
[40 lines not shown]
[ORC] Fix malformed Mach-O `__unwind_info` tables (#217781)
The malformed tables are produced by `JITLink` after compact-unwind
record merging.
`CompactUnwindManager::mergeRecords()` coalesces adjacent function
records with identical mergeable encodings. When the final raw record is
merged away, `writeIndexes()` generates the top-level index terminator
from the final remaining record instead of the final original function.
This truncates the final index range.
On macOS arm64, libunwind resolves a PC in the merged-away final
function through the terminator entry. Its second-level-page offset is
zero by design, causing libunwind to interpret the `__unwind_info`
header as a second-level page and report:
```
libunwind: malformed __unwind_info ... bad second level page
```
[23 lines not shown]