[clang] Fix -chain-include with relative or non-canonical paths (#244269)
ChainedIncludesSource registers each intermediate PCH in the in-memory
module cache under "<include>.pch<N>", spelled exactly as on the command
line. But the PCH that imports it records the import's file name as an
absolute, canonical path (ASTWriter::PreparePathForOutput()), so the
final reader looks for a different name and fails with "PCH file '...'
not found" when the include path is relative, contains "." components,
or (on Windows) has mixed separators.
Register the buffer under the absolute, canonical name instead.
[NFC][AMDGPU] Add a test for casts of known non-null pointers at -O0
At -O0, SelectionDAG checks for null when it casts an alloca or an LDS global
to flat, but GlobalISel does not.
This PR was assisted by AI but I reviewed all the changes.
[AMDGPU] Pass the cast source to isKnownNonNull in lowerADDRSPACECAST
`lowerADDRSPACECAST` passes the cast node instead of its source to
`isKnownNonNull`. The cast node is never a frame index, a global address, or a
constant, so the check never succeeds, and SelectionDAG checks for null when it
casts an alloca or a global. At -O2 the `nonnull` flag that IR passes set on the
cast hides this, but at -O0 every such cast gets a compare and two selects. The
GlobalISel path already passes the source.
This PR was assisted by AI but I reviewed all the changes.
[Hexagon] Stable instruction itinerary names (#239302)
Currently, changes in instruction itineraries ("itins") produce a large
number of changes in td files. Moreover, changes in the td descriptions
cause original lines to get deleted and new ones added in a different
location in the file. This happens because the itin names use a hash of
their content to make them shorter and the definitions are sorted by
name. Another difficulty is that original itin content is not preserved,
which makes it impossible to know how the name was produced.
Instead, use the tag of one of the instructions that use the itin
as the itin's name. This will avoid most of the changes in td files
when itineraries change.
The resulting itin list was regenerated. This exposed a number of
inconsistencies that accumulated over time when manually updating itins
without a clear understanding of their content.
Below is the analysis of changes in itineraries. There were 345
[82 lines not shown]
[libc++][Android] Clean up pre-API-23 carveouts and document LIBCXX-ANDROID-FIXMEs
Due to updating the Android sysroot and compiler in previous upgrades, certain test configurations can be updated by switching them from `UNSUPPORTED` to `XFAIL` and dropping obsolete API carveouts. In addition, document root cause and resolutions for other `LIBCXX-ANDROID-FIXME`.
Assisted-by: Gemini
[Clang][AllocToken] Address post-merge review of placement-new inference (#243991)
Follow-up to #241548:
- Skip collecting placement news in C, which has none. Otherwise every
function with an untyped allocation call (`malloc(n)`) had its body
traversed for nothing.
- Drop the look-through of trivial copy/move constructors in a
variable's initializer. With guaranteed copy elision the initializer is
the call itself, so this only affected class-typed results before C++17,
and it was not tested.
- Test reassignment of a class-typed variable (an operator call), and
drop the compound assignment, increment and constructor-argument cases,
which add no coverage.
RuntimeLibcalls: Mark noreturn and pure helper libcalls
Mark the functions which never return as noreturn. Add some nounwind
and cold, mostly following inferLibFuncAttributes. Mark
misc. functions as pure.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Add attributes inferLibFuncAttributes gives libcalls
Remove more differences with the attributes the InferFunctionAttrs
pass would add to the declared libcalls.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
bhyve.8: mention VM nodes in /dev/vmm
Currently, VM nodes in /dev/vmm are only described in the
EXAMPLES section of bhyvectl.8. Add a FILES section to bhyve.8
to make this information easier to find.
Update the bhyvectl.8 example to say "Existing VMs"
instead of "Running VMs" as the VMs listed in /dev/vmm
are not necessarily running.
Update bhyvectl.8 to refer to vmm(4).
Reviewed by: ziaee
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61623
use ret from raw test case in verbose to see return value
and then tests can reach normalization tests for in flight packet testing.
more in flight packets tests for routing and possibly logging soon
tests/sys/pmc: Skip pmc_ss and getmsr_refusals without a hardware PMC
In a guest without a PMU, hwpmc(4) registers only the SOFT class, but
the "instructions" alias still resolves from the pmu-events tables, so
pmc_allocate() fails with EINVAL. pmc_ss_test checked only the alias
and getmsr_refusals required the allocation, so both failed in CI
instead of skipping.
Probe the allocation the tests make and skip if it fails, as
rdpmc_reads_own_counter already does.
PR: 300856 (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300856)
Reported by: ngie
Reviewed by: mhorne, ngie
Fixes: d546356523f3 ("tests/sys/pmc: add PERF, RDPMC, row, sampling and unload tests")
Sponsored by: Advanced Micro Devices, Inc.
Signed-off-by: Osvaldo Janeri Filho <ojanerif at amd.com>
Differential Revision: https://reviews.freebsd.org/D61689
hwpmc: keep AMD UMC counters from saturating
UMC counters saturate at 2^48 instead of wrapping, after about a day
and a half of memory clock cycles. Clear bit 47 on a read once it is
set and count the carries in the per-CPU overflow count of the PMC,
like the arm64 and armv7 drivers do for their 32-bit counters.
Reviewed by: mhorne
Sponsored by: Advanced Micro Devices, Inc.
Signed-off-by: Osvaldo Janeri Filho <ojanerif at amd.com>
Differential Revision: https://reviews.freebsd.org/D60771
[SPIRV] Add flag to allow OpUntypedVariableKHR in DebugDeclare
NonSemantic.Shader.DebugInfo requires DebugDeclare's Variable operand to be
an OpVariable, so accepting an OpUntypedVariableKHR is not allowed.
Add -spirv-debug-declare-untyped-variable, off by default, to allow it.
[CostModel][X86] Add initial @llvm.vector.shuffle costs tables (#244280)
Still working on llvm-mca testing (especially for index types of
different bitwidths), but this touches the simple 128-bit
PSHUFB/VPERMILP cases
[AMDGPU] Make the reserved WWM VGPR tests exercise their scenario again (#241452)
Since #206739, rewrite-vgpr-mfma-to-agpr-reserved-wwm-vgpr.ll has no
SGPR
spill lanes and no VGPR spill slot, so it no longer checks that
AMDGPURewriteAGPRCopyMFMA keeps away from the reserved WWM VGPR.
- The IR test forces the scenario with inline asm clobbers and pinned
register
budgets. Its checks are hand-written and the update scripts skip it, so
it
fails if the scenario is lost.
- A new MIR test runs only the passes involved, with greedy and basic.
An
AGPR-only copy of the MFMA result fixes the scenario for any allocator,
so
its checks are autogenerated. A blind regeneration loses the scenario
only
if AMDGPURewriteAGPRCopyMFMA stops rewriting the MFMA; the IR test still
[8 lines not shown]
EliminateAvailableExternally: Preserve the function analysis manager proxy
Previously all cached function analyses were cleared When only
deleting function bodies, clear the analyses of those functions and
preserve the proxy.
CTMark instructions:u geomean: O3 -0.02% (kimwitu++ -0.12%, tramp3d-v4
-0.12%), ThinLTO -0.01%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
JumpThreading: Register cloned assumptions in the assumption cache (#244022)
JumpThreading clones assumes when threading blocks, but did not add the
clones to the assumption cache, leaving it stale after the pass.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
bhyve.8: mention config files for VM parameters
Mention that virtual CPUs, memory and other options can be configured
with a configuration file, and refer to the -k option.
Reviewed by: ziaee
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61718
Let an S3 grant list its actions
The S3 service now serves bucket policies, which compile to grant rows
that can list exact actions instead of a preset. Accept that in the
API: a grant's access is a preset or a list of the actions READWRITE
allows. The service refuses its whole config over any other name, so
owner-only actions like releasing a legal hold are refused here first.
The 28.0 and 27.1 APIs take a list; 27.0 clients see one as the
smallest preset that covers it.
Render a list into policies.conf comma-separated, add the three policy
actions to audit masks and audit events, and add the Object Lock
fields the audit parser now keeps: bypass, lock_mode, retain_until,
legal_hold and obj_vers.
[SPIRV] Add flag to allow OpUntypedVariableKHR in DebugDeclare
NonSemantic.Shader.DebugInfo requires DebugDeclare's Variable operand to be
an OpVariable, so accepting an OpUntypedVariableKHR is not allowed.
Add -spirv-debug-declare-untyped-variable, off by default, to allow it.
DAG: Move the atomicrmw to ISD opcode mapping into a helper (#244273)
Add getAtomicRMWOpcode next to getICmpCondCode so the mapping can be
reused outside of SelectionDAGBuilder.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[libc++] Handle IFUNC symbols in the ABI list script (#243354)
GNU readelf only prints `IFUNC` for libraries marked as GNU, and the
Android
library is marked as `UNIX - System V`, so readelf `prints <OS
specific>: 10` instead.
This causes the ABI script to fail for `IFUNC` on Android because it
expects the
symbol type to be a single word. Map `<OS specific>: 10` to `IFUNC` then
record
`IFUNC` symbols as `FUNC` since callers do not see them differently.
Link: https://github.com/llvm/llvm-project/pull/215813
Assisted-by: Gemini