[PATCH] D132223: [Assignment Tracking][4/*] Add llvm.dbg.assign intrinsic boilerplate
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 7 02:11:05 PST 2022
Orlando added a comment.
(I accidently had an not submitted an inline reply)
================
Comment at: llvm/include/llvm/IR/IntrinsicInst.h:375
+ return I->getIntrinsicID() == Intrinsic::dbg_value ||
+ I->getIntrinsicID() == Intrinsic::dbg_assign;
+ }
----------------
jmorse wrote:
> Hmm -- so this is going to mean that feeding a dbg.assign into `isa<DbgValueInst>(...)` is true, doesn't that risk some misinterpretation out there?
>
> If this is activating some code paths that are necessary for handling / accounting for debug intrinsics, we might want to handle that by putting a new superclass in rather than having dbg.values alias dbg.addrs.
>
> (/me reads further) Ah, because dbg.addr subclasses dbg.value. I can see that there's precedent for this elsewhere (all these things are subclasses of CallInst), I suspect we'll need to think through carefully what the implications are.
I did this early on to reduce friction when working on the prototype. I have not tried making `DbgAssignIntrinsic` a sibling in the inheritance hierarchy and don't have a strong gut feeling for whether the number of clarifying `isa<>` casts would increase or decrease.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132223/new/
https://reviews.llvm.org/D132223
More information about the llvm-commits
mailing list