[all-commits] [llvm/llvm-project] 0f572a: [clang][bytecode] Add an on-by-default `CanFail` f...
Timm Baeder via All-commits
all-commits at lists.llvm.org
Sun Jun 14 23:08:57 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0f572a599b29a92efb98671e34e028fadf926bf9
https://github.com/llvm/llvm-project/commit/0f572a599b29a92efb98671e34e028fadf926bf9
Author: Timm Baeder <tbaeder at redhat.com>
Date: 2026-06-15 (Mon, 15 Jun 2026)
Changed paths:
M clang/lib/AST/ByteCode/Opcodes.td
M clang/utils/TableGen/ClangOpcodesEmitter.cpp
Log Message:
-----------
[clang][bytecode] Add an on-by-default `CanFail` flag to opcodes (#203671)
We have several opcodes that can't fail, so add a flag to them
indicating that they always return `true` anyway.
This simplifies the generated code from e.g.
```c++
PRESERVE_NONE
static bool Interp_Activate(InterpState &S, CodePtr &PC) {
if (!Activate(S, PC))
return false;
#if USE_TAILCALLS
MUSTTAIL return InterpNext(S, PC);
#else
return true;
#endif
}
```
to
```c++
PRESERVE_NONE
static bool Interp_Activate(InterpState &S, CodePtr &PC) {
Activate(S, PC);
#if USE_TAILCALLS
MUSTTAIL return InterpNext(S, PC);
#else
return true;
#endif
}
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list