[PATCH] D158185: [DebugInfo] Process single-location debug values in variadic form when producing DWARF
Felipe de Azevedo Piovezan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 05:09:34 PDT 2023
fdeazeve added a comment.
I've just noticed that, for reason I am still investigating, the optimizer produced this expression in some test:
call void @llvm.dbg.value(metadata !DIArgList(ptr %0, i32 %4), metadata !319, metadata !DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_deref, DW_OP_LLVM_arg, 0, DW_OP_plus_uconst, 16, DW_OP_LLVM_arg, 1, DW_OP_constu, 1, DW_OP_mul, DW_OP_plus, DW_OP_deref, DW_OP_stack_value)), !dbg !344
This is technically an entry value, as `entry_value, 1` is referring to `%0` here. However, because of the check `if (auto singleLocElts = getSingleLocationExpressionElements())` we are going to return false.
I suspect a similar issue happens with the current implementation of the `isDeref` check. Any thoughts on this? I'm unsure what kind of semantics those `isX` methods should have in the presence of variadic arg lists
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158185/new/
https://reviews.llvm.org/D158185
More information about the llvm-commits
mailing list