[PATCH] D142218: [MC] Store implicit ops immediately after the TargetInsts table. NFC.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 10:54:47 PST 2023
foad added inline comments.
================
Comment at: llvm/include/llvm/MC/MCInstrDesc.h:581
ArrayRef<MCPhysReg> implicit_defs() const {
- return {ImplicitOps + NumImplicitUses, NumImplicitDefs};
+ auto ImplicitOps = reinterpret_cast<const MCPhysReg *>(this + Opcode + 1);
+ return {ImplicitOps + ImplicitOffset + NumImplicitUses, NumImplicitDefs};
----------------
arsenm wrote:
> This looks a bit undefined to me. Is ubsan and asan happy with this?
Yes. I ran `check-llvm` with `LLVM_USE_SANITIZER='Address;Undefined'` and it is clean.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142218/new/
https://reviews.llvm.org/D142218
More information about the llvm-commits
mailing list