WebAssembly: Stop adding kill flags on virtual registers
Continue purging new kill flags on virtual registers.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
ixl(4): Fix NVM update API
Driver provides an interface for tools operating on adapters'
Non-Volatile Memory using SIOC(G|S)DRVSPEC ioctls. It allows
tools to issue Admin Queue commands to the firmware, which
may return an error code encoded as a negative integer.
The driver passed this negative integer as the return value
of the ioctl handler. This was causing issues because the FreeBSD
kernel reserves negative error codes in system calls for special
purposes such as restarting the handler or detecting incorrect
behavior in VFS operations. Simple remapping of negative values
to positive integers caused currently available tools to misbehave
and could break the NVM update process. Introduce a new API version,
which allows new versions of tools to detect the fixed driver.
Temporarily keep the old API, but issue a warning that tools need
to be updated.
Also refactor the code to use centralized cleanup and move the
debug message from the firmware earlier to make sure it is not masked
[9 lines not shown]
CodeGen: Replace TargetOptions::DebuggerTuning with module flag
Read the debugger tuning from the module's "debugger-tuning" flag instead of
TargetOptions. Delete the now-dead -debugger-tune= cl::opt and the
TargetOptions::DebuggerTuning field.
Update the tests relying on it to directly use the module flag. The cases
that exercise multiple values do a text substitution to swap the value.
Alternatively this could be changed to synthesize the module flag in the
llc flag like some of the other widely used module flags do.
Co-authored-by: Claude Sonnet 5 <noreply at anthropic.com>
IR: Introduce "debugger-tuning" module flag
Prepare to replace TargetOptions::DebuggerTuning with a module flag. Unlike
other TargetOptions recently moved to module flags, debugger tuning is not a
firm ABI property. Mismatches and unrecognized names are tolerated.
Co-authored-by: Claude Sonnet 5 <noreply at anthropic.com>
MC: Remove MCAsmInfo::ExceptionsType
The exception model now comes from the module, and the MCAsmInfo
predicates that depend on it take the model as a parameter. The
target's default model is still available from
Triple::getDefaultExceptionHandling.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[Clang][OBT] Add overflow handler diagnostics
Add three warnings:
- -Woverflow-behavior-goto-no-effect (on): the operand of
__builtin_overflow_goto performs no checked operation. Not issued for
dependent operands or during template instantiation.
- -Woverflow-behavior-no-handler (off): an expression's checks trap
because no handler is visible. Projects that require a handler can
promote it to an error.
- -Woverflow-behavior-unreachable-handler (on): checks in a lambda or
block trap although the enclosing function has a handler, which they
cannot reach.
The last two report once per outermost unhandled expression. They are
emitted when the outermost function body is complete, so that labels
defined after a lambda are known, and per instantiation for templates.
The walk runs only when the function has a handler or the off-by-default
warning is enabled.
[2 lines not shown]
[Clang][OBT] Add __builtin_overflow_goto
__builtin_overflow_goto(expr, label) sends the failed trap overflow
behavior type checks of operations written in expr to label instead of
to the default __overflow handler. It yields the value of expr, which
must have integer or void type, and keeps its value category. A void
operand lets a GNU statement expression guard a whole block:
#define try(x, label) __builtin_overflow_goto(({ x; }), label)
try(a + 1, L); // yields a + 1
try({ a--; a += 2; }, L); // void
When builtins and GNU local handler labels nest, the innermost applies.
Effects before the failing check are kept. The builtin may not branch out
of code whose checks always trap, such as a constructor initializer or a
new-expression initializer; the jump scope checker rejects it, and runs for
every function that uses the builtin.
[12 lines not shown]
[Clang][OBT] Branch to the overflow handler on trap OBT conversion checks
Implicit and explicit integral conversions into or out of an __ob_trap
type check for truncation and sign change. Route a failed check to the
overflow handler label, when one is visible, the same way arithmetic
checks already do. Compound assignments check the conversion back to
the left-hand type even when the operator itself (for example <<=) is
not checked, so they count as checked operations too.
The shared predicate gains isOverflowHandlerCheckedConversion, which
mirrors the width and signedness rules CodeGen uses to decide whether a
check is emitted, and CodeGen asserts that the two agree. The jump scope
checker therefore diagnoses exactly the conversion branches CodeGen
emits.
Assisted-By: claude
Signed-off-by: Justin Stitt <justinstitt at google.com>
[Clang][OBT] Branch to an overflow handler label on trap OBT overflow
A failed trap overflow behavior type check now branches to a label named
__overflow, when the enclosing function defines one, instead of trapping.
This gives code such as the Linux kernel a local, goto-style error path for
overflow, as requested in the LKML discussion of OverflowBehaviorTypes.
The handler belongs to the function, not to the type. Lookup follows goto
scoping: a GNU local label (__label__ __overflow;) redirects checks within
its block, and lambdas and blocks use their own handlers. The name can be
changed with -cc1 -foverflow-behavior-label=<name>.
Sema, CodeGen, and the CFG share one set of helpers in
clang/AST/OverflowHandler.h. They decide which operations are checked and
which statements introduce a handler, so every walker agrees on the label
each operation branches to, and CodeGen does no name lookup. CodeGen
asserts that each branch it emits comes from an operation Sema checked.
JumpScopeChecker treats each checked operation as a jump to its handler,
so a branch into the scope of a VLA or cleanup variable is rejected
[35 lines not shown]
WebAssembly: Use reportFatalUsageError for eh option errors
Avoid using the deprecated report_fatal_error, and add missing
error test coverage.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Remove TargetOptions::ExceptionModel (#232977)
The exception model now comes only from the "exception-model" module
flag. Remove the TargetOptions field and its copy into MCAsmInfo, so
MCAsmInfo only knows the target's default model.
The WebAssembly model checks move from the TargetMachine constructor
into the Emscripten EH/SjLj lowering pass. Clang relied on the backend
to reject non-wasm models for wasm targets, so it now rejects them itself.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[clang][C2y] Fix post-commit CI failure (#235029)
After landing 75a53e72d6939bede9df3bc9e73ae05cb314e9e1, one of the ARM
bots started failing:
https://lab.llvm.org/buildbot/#/builders/38/builds/12438
This adds a triple to the test; we don't care what platform the test is
targeting, we only care that we didn't need to include headers for the
pragmas to be recognized. Testing that on a single target is fine.
[TTI] Add cost for @llvm.mask.beforefirst (#212174)
This implements the cost model for the proposed `@llvm.mask.beforefirst`
intrinsic.
BasicTTIImpl returns a cost of 1 when it's legal, 2 when it's custom,
and a generic expansion cost otherwise. This gives roughly the correct
cost for RISC-V and AArch64.
finance/odoo16: Update to 16.0.20261023
- Fix start issues with Python 3.13.x
- the port switches to USE_PYTHON=pep517 (the package metadata becomes
dist-info)
- the port follows the Python Ports Policy
- concurrent is added to USE_PYTHON
- portlint warnings are fixed
PR: 299721
Reported by: Patrick Crandol <patrick __at__ crandol.com>