Currently, InstrRefLDV only handles DBG_VALUE instructions, not DBG_VALUE_LIST, and as a result of this it handles these instructions using functions that only work for that type of debug value, i.e. using getOperand(0) to get the debug operand. This patch changes this to use the generic debug value functions, such as getDebugOperand and isDebugOffsetImm, as well as adding an IsVariadic field to the DbgValueProperties class and a few other minor changes to acknowledge DBG_VALUE_LISTs. Note that this patch does not add support for DBG_VALUE_LIST here, but is a precursor to other patches that do add that support.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp | ||
---|---|---|
461–462 | I would consider adding assert(!Prop.IsVariadic) above this line (or changing the emitMOLoc call to emitMOLoc(MO, Var, {NewExpr, Prop.Indirect, Prop.IsVariadic}) (or both), so that this line doesn't get out of sync with the if statement added at the start of this function, but YMMV - feel free to ignore this. |
I would consider adding assert(!Prop.IsVariadic) above this line (or changing the emitMOLoc call to emitMOLoc(MO, Var, {NewExpr, Prop.Indirect, Prop.IsVariadic}) (or both), so that this line doesn't get out of sync with the if statement added at the start of this function, but YMMV - feel free to ignore this.