[libc] s/in_addr/struct in_addr/ (#196937)
in_addr should be a regular tagged struct, not a
typedef-of-an-anonymous-struct. C++ doesn't care about this as much as C
does, but even in C++ one cannot use `struct Foo` syntax to refer to a
struct if it was not declared that way.
[SPIRV] Extend NSDI debug handling for DebugTypeFunction.
Changes:
- Collect required types with DebugInfoFinder instead of walking DbgVariableRecords only. This allows processing types that might not be available in these records, and avoids code duplication for the traversals.
- Emit DebugTypeFunction for DISubroutineType when every signature slot maps to an
emitted debug type.
- Reset per-module state in beginModule().
- Replace parallel FileStringRegs/BasicTypeNameRegs with a StringMap OpString
cache, deduplicating identical strings.
- Add LLVM DINode flag lowering for NSDI.
- Cache DebugInfoNone, OpTypeVoid and OpTypeInt32 registers to avoid duplicate instructions.
[SPIRV] Make sure spirv-tools are copied with exe suffix (#196658)
If a user provides the spirv-tools for LLVM_INCLUDE_SPIRV_TOOLS_TESTS,
we need to make sure that they're copied into the bin dir with the
appropriate platform suffix (ie, .exe on windows). Otherwise, lit's
`add_tool_substitutions` won't be able to find them, and after #192462
this can lead to silently using versions that happen to be in your path.
[CIR] Use SymbolTableCollection in LoweringPrepare's getCalledFunction (#195919)
`LoweringPreparePass::lowerTrivialCopyCall` calls `getCalledFunction`
once per `cir.call`, which used the static
`mlir::SymbolTable::lookupNearestSymbolFrom` — that function does a
linear scan of every operation in the module on each call, giving O(N ×
M) total for N calls in an M-operation module.
The pass already maintains a `SymbolTableCollection` (used by
`lowerStoreOfConstAggregate` and `lowerLocalInitOp`). Thread it through
`getCalledFunction` and `lowerTrivialCopyCall` so the per-call lookup
uses the cached hash-based path instead.
Measured on Eigen's `bdcsvd.cpp` (heavy template instantiation): the
15.06% self-time hotspot from `getCalledFunction` is eliminated,
contributing roughly another 2x compile-time speedup on the slowest
tests.
The cold path in `getOrCreateDtorFunc` (per-global, not per-call) is
[9 lines not shown]
[CIR] Use SymbolTableCollection in CallOp/TryCallOp LLVM lowering (#195916)
`CIRToLLVMCallOpLowering` and `CIRToLLVMTryCallOpLowering` used the
static `mlir::SymbolTable::lookupNearestSymbolFrom` to resolve each
direct call's callee. That static lookup does a linear scan of every
operation in the module (O(M) per call), so a function with N call sites
took O(N × M) total — quadratic in module size.
Add a `SymbolTableCollection` member to both patterns via
`customLLVMLoweringConstructorDecl` and use its caching
`lookupNearestSymbolFrom`. The first lookup builds the symbol table
(O(M)), then subsequent lookups are O(1) hash-based.
Measured on Eigen's `bdcsvd.cpp` (heavy template instantiation, many
call sites): the 36.98% self-time hotspot from this lookup is
eliminated, and overall CIR compile time drops by roughly 2x on the
slowest tests.
Stacked behind #195883 (the equivalent fix for
[4 lines not shown]
[mlir][ABI] Add Test target + classification injection helper (#195725)
First in a series of PRs splitting #192119 / #192124 per @andykaylor's
review request to break them down by ArgKind and replace the C++ unit
tests with `cir-opt`-driven `.cir` tests. This one is dialect-agnostic
so it can land before the CIR side.
Two pieces:
1. A test ABI target at `mlir/lib/ABI/Targets/Test/`. Predictable rules
approximating x86_64 SysV thresholds (Direct / Extend / Indirect /
Ignore). The header and `.cpp` are both explicit that this is not a real
ABI target — real ones live next to the LLVM ABI library.
2. A `parseClassificationAttr` helper that reads a plain
`DictionaryAttr` and returns a `FunctionClassification`. Lets tests
inject any classification (including shapes the test target itself
doesn't produce) so rewriter behavior can be validated against
real-ABI-shaped expectations without waiting for #194433. The schema is
[24 lines not shown]
[AMDGPU] Fix inconsistencies in RP tracking advance/reset behavior (#196595)
Some of the variants of `advance` and `reset` in the `GCNRPTracker` and
`GCNDownwardRPTracker` had unclear/inconsistent semantics on their
return value. This aims to clarify that through improved documentation
and light functional changes.
These inconsistencies ultimately triggered an assert in
`GCNRPTaget::saveRP` on a complex kernel during scheduling.
`GCNScheduleDAGMILive::getRealRegPressure` would incorrectly return a
null pressure for a non-empty region which only had debug values. Such
regions can arise if the `PreRARematStage` rematerializes all non-debug
instructions out of their original region, leaving only debug values.
Attempting to rematerialize registers across that same region afterwards
would trigger the assert.
[SPIRV] Extend NSDI debug handling for DebugTypeFunction.
Changes:
- Collect required types with DebugInfoFinder instead of walking DbgVariableRecords only. This allows processing types that might not be available in these records, and avoids code duplication for the traversals.
- Emit DebugTypeFunction for DISubroutineType when every signature slot maps to an
emitted debug type.
- Reset per-module state in beginModule().
- Replace parallel FileStringRegs/BasicTypeNameRegs with a StringMap OpString
cache, deduplicating identical strings.
- Add LLVM DINode flag lowering for NSDI.
- Cache DebugInfoNone, OpTypeVoid and OpTypeInt32 registers to avoid duplicate instructions.
Pull up the following, requested by christos in ticket #283:
external/ibm-public/postfix//dist/README_FILES/NON_BERKELEYDB_README up to
external/ibm-public/postfix//dist/README_FILES/REQUIRETLS_README up to
external/ibm-public/postfix//dist/conf/postfix-non-bdb-script up to
external/ibm-public/postfix//dist/html/NON_BERKELEYDB_README.html up to
external/ibm-public/postfix//dist/html/REQUIRETLS_README.html up to
external/ibm-public/postfix//dist/html/nbdb_reindexd.8.html up to
external/ibm-public/postfix//dist/html/postfix-non-bdb.1.html up to
external/ibm-public/postfix//dist/man/man1/postfix-non-bdb.1 up to
external/ibm-public/postfix//dist/man/man8/nbdb_reindexd.8 up to
external/ibm-public/postfix//dist/mantools/check-proxy-type-table up to
external/ibm-public/postfix//dist/proto/NON_BERKELEYDB_README.html up to
external/ibm-public/postfix//dist/proto/REQUIRETLS_README.html up to
external/ibm-public/postfix//dist/src/cleanup/cleanup_message_test.c up to
external/ibm-public/postfix//dist/src/global/ehlo_mask_test.c up to
external/ibm-public/postfix//dist/src/global/nbdb_clnt.c up to
external/ibm-public/postfix//dist/src/global/allowed_prefix.c up to
external/ibm-public/postfix//dist/src/global/allowed_prefix.h up to
[575 lines not shown]
power: Rename sleep types
Make sleep type names clearer and more consistent, and allow space for
something like "os_hibernate" once that gets added to FreeBSD.
Reviewed by: jaeyoon, olce, markj
Approved by: jaeyoon, olce, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56920
XCOFF no inline ptr glue (#193786)
Adds an option for out of line indirect calls. `-maix-use-ptrgl` enables
the option, and when enabled indirect calls will load the address of the
function descriptor of the callee into r11, keeping all other arguments
the same and do a direct branch to `._ptrgl` which contains the indirect
call sequence code. The call is followed by a toc restore since ptrglue
does a tail call and cannot restore the toc itself. The negative option
`-mno-aix-use-ptrgl` is also added to revert back to the default
behaviour of emitting the indirect call sequence inline at the call
site.
---------
Co-authored-by: Hubert Tong <hubert.reinterpretcast at gmail.com>
[clang][AST] Treat unsigned _BitInt(1) as boolean-valued (#195793)
Update `Expr::isKnownToHaveBooleanValue` to recognize `unsigned
_BitInt(1)` when semantic boolean-ness is not required.
[clang-tidy][clang][diagnostics] Unify system header/macro supression (#193774)
Before this change, if Clang-Tidy ran with `--system-headers=false` (the
default config), it suppressed all reports where the location was in a
system header or in the expansion of a macro from a system header.
This was problematic because e.g. practically all reports of
'clang-diagnostic-invalid-offsetof' (a/k/a `-Winvalid-offsetof`) are in
the expansion of a system macro (namely 'offsetof'), so Clang-Tidy was
unable to display these reports.
In the clang frontend there was a more refined logic: certain
diagnostics have the 'ShowInSystemHeader' and/or 'ShowInSystemMacro'
properties which ensure that they are printed (by the clang frontend)
even if the compiler wouldn't otherwise print diagnostics from system
headers/macros.
This commit exposes this more refined logic under the name
`DiagnosticIDs::shouldSuppressAsSystemWarning` and invokes this logic
[13 lines not shown]
[clang-tidy][NFC] Use `std::array` instead of `SmallVector` in `UseTrailingReturnTypeCheck` (#196992)
We know we have exactly 2 `Token` in the array. There is no need to use
`SmallVector` here.
fixup! [clang] Forward `-fvalidate-ast-input-files-content` when loading AST dumps
Apparently `-t 300001010000` is not a universally valid date format.
This should fix the buildbot failure caused by #196298
Replace with an in-line python script that should be more portable.