[PATCH] D41697: [DebugInfo][Metadata] Add support for a DIExpression as 'count' field of DISubrange.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 10:32:05 PST 2018


aprantl added a comment.

I just had an idea:

We could represent Reg46 like this:

  call @llvm.dbg.declare(undef, !0, !DIExpression(DW_OP_uconst, 2, DW_OP_mul, DW_OP_stack_value))
  ...
  !0 = !DIVariable(name: "$LLVM_ARM_GRANULE_REG_EXPR1")
  !1 = !DISubrange(count: !0)

and the backend recognized name.startsWith("$LLVM_ARM_GRANULE_REG_") and replaces its location with DW_OP_breg46. This way we don't need to allow DIExpressions in DISubrange and keep the representation a little simpler. Let me know what you think!


https://reviews.llvm.org/D41697





More information about the llvm-commits mailing list