[NFC] Stop relying on the LocationDescription conversion in unit tests. (#221004)
`LocationDescription` has an implicit conversion from a bare insertion
point, and it leaves DL default-constructed. `OpenMPIRBuilderTest`
depends on that in a number of places, either by naming an insertion
point directly or by handing `Builder.saveIP()` to an entry point that
takes a `LocationDescription`.
Spell out what each of those sites means instead. Where a live builder
is already sitting at the insertion point it is passed directly, and
where the test names an insertion point of its own the empty location is
written out, which is what it was getting before, so no test changes
behavior.
Co-authored-by: Cursor <cursoragent at cursor.com>
[CIR][CMake] Configure MLIR as a dependency-only project
ClangIR requires MLIR, but enabling CIR currently requires users to list MLIR
explicitly in LLVM_ENABLE_PROJECTS. That also attaches all MLIR build, install,
unit-test, and lit targets to the corresponding LLVM aggregates.
When Clang is selected and CLANG_ENABLE_CIR is enabled, record MLIR in
LLVM_DEPENDENCY_ONLY_PROJECTS. The common project setup normalizes this request
against LLVM_ENABLE_PROJECTS, so an explicit MLIR selection still takes
precedence while an implicit selection remains dependency-only.
This configures the MLIR targets used by CIR without changing
LLVM_ENABLE_PROJECTS or enabling MLIR's aggregate targets. Keep the existing
standalone ClangIR restriction, and continue to omit MLIR when CIR is disabled.
Assisted-by: Codex
[CMake] Add dependency-only project mode for Flang's MLIR
LLVM_ENABLE_PROJECTS historically treats projects enabled to satisfy another
project's dependency the same as projects selected by the user. Consequently,
enabling Flang attaches the complete MLIR project, install rules, and test
suites to LLVM's aggregate targets.
Record implicit dependencies in the internal-only
LLVM_DEPENDENCY_ONLY_PROJECTS list without changing LLVM_ENABLE_PROJECTS.
Normalize the list after collecting dependencies so duplicate requests are
removed and explicit project selections always take precedence.
Teach project setup to configure the union of both lists and add
dependency-only source directories with EXCLUDE_FROM_ALL. This keeps every
MLIR target available for normal dependency resolution while omitting MLIR-wide
build and install targets. Flang is the first user of this mode.
Let MLIR own its dependency-only test policy: configure test support libraries
for downstream consumers without creating MLIR unit tests or registering its
[3 lines not shown]
[clang-tidy][NFC] Convert check list to yaml format (#221411)
Yaml format was introduced in 19-20 release which is old enough to
safely transition our file to new version since we are on 23 release
already.
[CIR][CMake] Configure MLIR as a dependency-only project
ClangIR requires MLIR, but enabling CIR currently requires users to list MLIR
explicitly in LLVM_ENABLE_PROJECTS. That also attaches all MLIR build, install,
unit-test, and lit targets to the corresponding LLVM aggregates.
When Clang is selected and CLANG_ENABLE_CIR is enabled, record MLIR in
LLVM_DEPENDENCY_ONLY_PROJECTS unless it is already available. This configures
the MLIR targets used by CIR without changing LLVM_ENABLE_PROJECTS or enabling
MLIR's aggregate targets.
Keep explicit MLIR selections unchanged and retain the existing standalone
ClangIR restriction. Clang builds with CIR disabled continue to omit MLIR.
Assisted-by: Codex
[CMake] Add dependency-only project mode for Flang's MLIR
LLVM_ENABLE_PROJECTS historically treats projects enabled to satisfy another
project's dependency the same as projects selected by the user. Consequently,
enabling Flang attaches the complete MLIR project, install rules, and test
suites to LLVM's aggregate targets.
Record implicit dependencies in the internal-only
LLVM_DEPENDENCY_ONLY_PROJECTS list instead of changing LLVM_ENABLE_PROJECTS.
Teach project setup to configure the union of both lists and add dependency-only
source directories with EXCLUDE_FROM_ALL. Flang is the first user of this mode.
This keeps every MLIR target available for normal dependency resolution while
omitting the MLIR-wide build and install targets. Let MLIR own its
dependency-only test policy: configure test support libraries for downstream
consumers without creating MLIR unit tests or registering its lit suite.
Explicitly enabling MLIR preserves the existing behavior.
Assisted-by: Codex
[Clang][Driver] Final phase also determined by input (#218802)
Before this PR, `getFinalPhase` assumed that when no option is give then
the final phase will a linking step. This is objectively wrong: For
instance passing a header file as input (`-x c-header` or `-x
c++-header`) triggers precompilation, not linking. Other inputs that do
not have a link phase as specified by `Types.def`
are `.dxo`, `.ifs`, and `.hlsl` files.
Instead of defaulting to link in the absence of any action flag, this PR
uses the last phase that `Types.def` specifies for the given input
files. The effect of this is relevant when handling linking options
which are categorized as "input" like any other file.
Usually these should be filtered out if
there is no linking step. But, since `getFinalPhase` says there is a
linking flag, those are forwarded to the precompile handling which gets
confused with such "inputs". An accurate determination of the final
phase filters out those non-applicable linker options.
[8 lines not shown]
[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] 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 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] 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.
[mlir][tosa] Add F32 to F16 type narrowing pass (#218900)
Add `tosa-narrow-f32-to-f16`, extending the shared TOSA type narrowing
infrastructure with support for destructively converting F32 tensors,
scalar attributes, dense constants, and resource-backed constants to
F16.
The pass supports conservative and aggressive rewriting, optional
function-boundary conversion, and optional preservation of F32
accumulator types.
Add coverage for constant precision loss, function boundaries, regions,
dense resources, aggressive rewriting, and accumulator-type
preservation.
Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>
[CMake] Add dependent project mode for Flang's MLIR
LLVM_ENABLE_PROJECTS currently treats projects enabled to satisfy another
project's dependency the same as projects selected by the user. As a result,
enabling Flang pulls the entire MLIR project, install rules, and test suites
into aggregate targets.
Track implicitly configured projects in LLVM_DEPENDENT_PROJECTS and pass
EXCLUDE_FROM_ALL when adding their source directories. This leaves all MLIR
targets available for Flang's normal dependency resolution without attaching
the MLIR-wide target to the default build or install.
Also force MLIR_INCLUDE_TESTS off when MLIR is pulled in by Flang. This avoids
registering MLIR unit tests and lit suites with check-all. Explicitly listing
mlir continues to use existing behavior and honors MLIR_INCLUDE_TESTS.
Assisted-by: Codex
[lldb][test] Merge demangling tests into one test (#221214)
The XML test report that LIT generates describes the outcome of every
test in the test suite. Currently, the test report for the LLDB unit
tests alone is about 5MiB of which 4.7MiB (about 94%) are used to
describe all 30'000 DemanglingInfoCorrectnessTest instances names (they
don't have any output on success, so this is just used to describe the
test names).
This patch merges all these test instances into one. To make test
failures still easy to parse, this patch changes test function to use a
gtest scrope (which annotates failures with the mangled name) and use
non-fatal checks to continue testing when one test fails.
This reduces the test report size overhead of these tests from 4.7MiB to
about 100B.
assisted-by: claude
[lldb][test] Bump utility expression timeout to 10 minutes (#221691)
LLDB needs to sometimes run utility expressions such as loading
libraries via a call to `dlopen`. These utility expressions have a
timeout associated with them which is only 15 seconds (and 60 on
sanitized builds).
I suspect our expressions reaching this timeout is the reason why
TestLoadUsingPaths.py sometimes fails to load libraries and produces
this error:
```
File "../TestLoadUsingPaths.py", line 78, in test_load_using_paths
self.assertNotEqual(token, lldb.LLDB_INVALID_IMAGE_TOKEN, "Got a valid token")
```
This patch bumps the timeout to 10 minutes. There is no good reason why
this timeout should exist in the first place on test bots, and maybe we
should remove them or make them fatal errors on the test bots. But for
now this patch should at least fix the test randomly failing on very
slow bots.
snd_dummy: Bump primary channel count
Makes it easier to test scenarios involving more than 1 primary channels
per direction.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D59085
sound: Prefer idle primary channels when allocating
dsp_chn_alloc() stopped at the first primary channel that was either
idle or already had vchans. Since the list is walked in order, the first
channel matched both conditions once it had been used, so every client
after the first was stacked onto it as a vchan and the remaining primary
channels were never allocated at all.
This is invisible on devices with a single primary channel, but not on
those which provide several. snd_emu10kx(4), for instance, registers
four primary channels for its front device, each able to run with its
own rate.
Look for an idle primary channel first, and only fall back to sharing
one that already has vchans when there is none left.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D59084
net-mgmt/rubygem-opn_api: new port
Ruby client library and CLI tool for the OPNsense REST API
It is meant as a replacement for net-mgmt/py-opn-cli. It provides:
- An HTTP client with SSL, redirect handling, and API key authentication
- UUID/name resolution for ModelRelationField and CertificateField references
- Service reconfigure orchestration with configtest support
- OPNsense selection-hash normalization
- A CLI tool for interactive API access
- A resource registry that abstracts away inconsistent endpoint naming
PR: 294026
[SLP]Fix crash in canBuildSplitNode on struct-typed scalars
Split nodes require plain vector types for the cost model and codegen,
but getWidenedType on a struct scalar type returns a struct-of-vectors,
so the cast<VectorType> asserted. Bail out on struct-typed scalars, they
are not supported.
Fixes #221715
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/221721
www/{nginx,nginx-devel,freenginx}: 3rd-party modules management
Use the new www/nginx-module-cache-purge source port instead of
fetching ngx_cache_purge from GitHub. The module version is now
maintained in one place for these ports.
Sponsored by: Netzkommune GmbH
www/nginx-module-cache-purge: Add New Port
The cache_purge module adds the ability to purge content from the
proxy, FastCGI, SCGI and uwsgi caches of nginx. This port installs the
module sources only, the module itself is built by the nginx ports.
Sponsored by: Netzkommune GmbH