[PATCH] D95990: Remove overzealous verifier check on DW_OP_LLVM_entry_value and improve the documentation

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 10:51:03 PST 2021


aprantl added inline comments.


================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:1114
       // other expressions.
-      return I->get() == expr_op_begin()->get() && I->getArg(0) == 1 &&
-             getNumElements() == 2;
+      return I->get() == expr_op_begin()->get() && I->getArg(0) == 1;
     }
----------------
vsk wrote:
> djtodoro wrote:
> > The same I added in: https://reviews.llvm.org/D87233#change-euq8o0qWqm4k
> > 
> > Maybe we can add a `constexpr` variable, for example:
> > 
> > `constexpr unsigned entry_val_size = 1;`
> > 
> > and use it here as well as in `DIExpression::prependOpcodes()` from the D87233. WDYT?
> > 
> > 
> I think introducing a size constant and referencing it in `prependOpcodes` is a good idea. If/when we lift the restriction, it'll make it easier to know what to fix up.
I was wondering about this, but I'm thinking that prependOpcodes() doesn't want to push the max_entry_value_block_size:  I think it always wants to push 1.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95990/new/

https://reviews.llvm.org/D95990



More information about the llvm-commits mailing list