[PATCH] D35994: Debug info for variables whos type is shrinked to bool
Nikola Prica via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 07:37:48 PDT 2017
NikolaPrica updated this revision to Diff 110536.
NikolaPrica edited the summary of this revision.
NikolaPrica added a reviewer: petarj.
NikolaPrica added a comment.
This patch implements new DIExpression :
val * (ValOther - ValInit) + ValInit:
DW_OP_deref DW_OP_constu <ValMinus>
DW_OP_mul DW_OP_constu <ValInit> DW_OP_plus DW_OP_stack_value
The other expression which was suggested was :
// val * 42 | ((~val)&1) * 87
DW_OP_dup DW_OP_deref DW_OP_constu 42 DW_OP_mul DW_OP_swap
DW_OP_deref DW_OP_not DW_OP_lit1 DW_OP_and DW_OP_constu 87 DW_OP_mul
DW_OP_or DW_OP_stack_value
I have chosen to implement first because it is simpler.
I have also added simpler test also with concrete DW_AT_location description .
https://reviews.llvm.org/D35994
Files:
lib/CodeGen/AsmPrinter/DwarfExpression.cpp
lib/IR/DebugInfoMetadata.cpp
lib/Transforms/IPO/GlobalOpt.cpp
test/Transforms/GlobalOpt/integer-bool-dwarf.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35994.110536.patch
Type: text/x-patch
Size: 8189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170810/a7d900a4/attachment.bin>
More information about the llvm-commits
mailing list