[libc] Enforce standard identifier validation in hdrgen (#198971)
Implemented validation for standard identifiers in the hdrgen tool to
catch typos and unknown standards. Aggregated standards from all entity
types (macros, types, etc.) for validation, addressing a TODO in
header.py.
Added llvm_libc_ext, stdc_ext, and llvm_libc_stdfix_ext to the canonical
identifiers. Standardised invalid or inconsistently formatted standards
in several YAML files.
This enforces the correctness of any provided standards field but does
not yet require that every entity has one (many entities still inherit
standards from the header level).
Assisted-by: Automated tooling, human reviewed.
[CostModel][X86] Make avx512 inlane 2src shuffles cheaper that crosslane 2src shuffles (#199074)
256/512 variable mask shuffles are not going to sustain tp = 1 on all
avx512 targets - unlike immediate mask inlane shuffles
1src shuffles aren't much better, but there's additional special cases
that need handling for these
Noticed while triaging failed vectorcombine reduction folds due to weird
costs
[alpha.webkit.UncountedCallArgsChecker] Check CXXOperatorCallExpr's this argument (#198688)
This PR fixes the bug that we were not checking "this" parameter of
CXXOperatorCallExpr.
[webkit.UncountedLambdaCapturesChecker] Check lambdas in constructors and destructors (#198709)
This PR fixes the bug that lambda captures checkers don't check for
"this" pointer captured in a lambda inside C++ constructors and
destructors.
[webkit.UncountedLambdaCapturesChecker] Check every lambdas passed to makeVisitor (#198713)
This PR fixes the bug in UncountedLambdaCapturesChecker that we were
failing to check variable captures of a non-first lambdas passed to
WTF::makeVisitor. To support this, we store a SmallVector of
LambdaExpr's instead of a single LambdaExpr in LambdaOwnerMap.
[alpha.webkit.UncountedLocalVarsChecker] Some forms of mutating a guardian variable is ignored (#198950)
This PR fixes a bug in UncountedLocalVarsChecker that it was allowing
mutations to guardian variables within the same scope of a guarded raw
pointer/reference. Since mutating a guardian can affect the lifetime of
a guarded object, we must not consider it as a guardian variable for the
scope.
VisitCXXConstructExpr was just looking for smart pointer's move
constructor but any constructor which takes a guardian smart pointer
using a non-const function argument is problematic so detect all those
cases. Also add VisitCallExpr to detect all forms of function calls to
which a guardian variable is passed via a non-const argument. For
VisitCXXMemberCallExpr, we consider calling any non-const member
function on a guardian variable to be dangerous except conversion
operators (e.g. operator T()).
[AArch64] Combine A + zext(B) * C -> A - zext(B) * -C (#198488)
This converts `A + zext(B) * C` -> `A - zext(B) * -C` if C can be
negated in order to use umsubl.
[AMDGPU][Clang] add __builtin_amdgcn_av_(load|store)_b128
These builtins allow the program to request store-available and load-visible
accesses as described in #191246. Each of them takes a __MEMORY_SCOPE_* operand
that is then translated to target-specific cache policy bits.
This patch was extracted from #172090.
Co-authored-by: macurtis-amd <macurtis at amd.com>
Assisted-by: Claude Opus 4.6z
[llvm-profgen] Speed up parsing of MMap events (#197871)
During the mmap extraction, `extractMMapEventForBinary()` is invoked
line by line to parse the perf script(usually 100K to 1M+ lines). This
patch tries to early quit when the current line does not contain the
Binary name, and this will help to avoid subsequent parsing
overhead(baseline behavior uses regex to extract the name, returning
false if it doesn't match the current binary).
With this minor change, the execution time of
extractMMapEventForBinary() dropped from 13,600ms to 32ms(-99%) in an
internal workload test(827K lines).
[AMDGPU] Pre-commit test for redundant s_wait_xcnt after implicit XCN… (#198772)
…T drain
Demonstrates that `SIInsertWaitcnts` currently emits `s_wait_xcnt 0x0`
after instructions that already drain XCNT in hardware on gfx1250:
`s_barrier_wait`, `s_barrier_signal`, `s_barrier_signal_isfirst`,
`s_sendmsg`, PC-changing terminators etc.
[NFC][PowerPC][AIX] add explicit code model to 64-bit AIX tests (#199159)
A later PR will propose updating the default code model, so this PR sets
an explicit code model on tests that don't have it. This is strictly
NFC, as we are just setting the existing code model.
[NFC][PowerPC][AIX] add explicit code model to 64-bit AIX tests
A later PR will propose updating the default code model, so
this PR sets an explicit code model on tests that don't have it.
[CoroSplit] Rename Suspend/End to AlwaysKill/NeverKill (NFC) (#199150)
Rename them so that we can generalize to more intrinsics, for example,
`llvm.coro.is_in_ramp` in #198226
Revert "DebugInfo: Shrink-to-fit some containers to reduce peak memory usage" (#199145)
Reverts llvm/llvm-project#198935
I think this broke llvm/test/tools/llvm-gsymutil/X86/elf-dwo.yaml .
[mlir] Specify isSigned when creating APInt for I16 attributes (#198687)
8- and 32-bit attribute constructors already do this. Debug builds
trigger an assertion unless isSigned is specified.