forked from OSchip/llvm-project
1ae2d9a2bd
Summary: Internally in LLVM's metadata we use DW_OP_entry_value operations with the same semantics as DWARF; that is, its operand specifies the number of bytes that the entry value covers. At the time of emitting entry values we don't know the emitted size of the DWARF expression that the entry value will cover. Currently the size is hardcoded to 1 in DIExpression, and other values causes the verifier to fail. As the size is 1, that effectively means that we can only have valid entry values for registers that can be encoded in one byte, which are the registers with DWARF numbers 0 to 31 (as they can be encoded as single-byte DW_OP_reg0..DW_OP_reg31 rather than a multi-byte DW_OP_regx). It is a bit confusing, but it seems like llvm-dwarfdump will print an operation "correctly", even if the byte size is less than that, which may make it seem that we emit correct DWARF for registers with DWARF numbers > 31. If you instead use readelf for such cases, it will interpret the number of specified bytes as a DWARF expression. This seems like a limitation in llvm-dwarfdump. As suggested in D66746, a way forward would be to add an internal variant of DW_OP_entry_value, DW_OP_LLVM_entry_value, whose operand instead specifies the number of operations that the entry value covers, and we then translate that into the byte size at the time of emission. In this patch that internal operation is added. This patch keeps the limitation that a entry value can only be applied to simple register locations, but it will fix the issue with the size operand being incorrect for DWARF numbers > 31. Reviewers: aprantl, vsk, djtodoro, NikolaPrica Reviewed By: aprantl Subscribers: jyknight, fedor.sergeev, hiraditya, llvm-commits Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D67492 llvm-svn: 374881 |
||
---|---|---|
.. | ||
AMDGPU | ||
ARM | ||
Mips | ||
SystemZ | ||
2002-04-13-RetTypes.ll | ||
2002-11-05-GetelementptrPointers.ll | ||
2004-05-21-SwitchConstantMismatch.ll | ||
2006-07-11-StoreStruct.ll | ||
2006-10-15-AddrLabel.ll | ||
2006-12-12-IntrinsicDefine.ll | ||
2007-12-21-InvokeParamAttrs.ll | ||
2008-01-11-VarargAttrs.ll | ||
2008-03-01-AllocaSized.ll | ||
2008-11-15-RetVoid.ll | ||
2009-05-29-InvokeResult1.ll | ||
2009-05-29-InvokeResult2.ll | ||
2009-05-29-InvokeResult3.ll | ||
2010-08-07-PointerIntrinsic.ll | ||
AmbiguousPhi.ll | ||
DIFile.ll | ||
DILocation-parents.ll | ||
DILocation-scope.ll | ||
DISubprogram.ll | ||
PhiGrouping.ll | ||
README.txt | ||
SelfReferential.ll | ||
alias.ll | ||
align-md.ll | ||
alloc-size-failedparse.ll | ||
allocsize.ll | ||
amdgpu-cc.ll | ||
atomics.ll | ||
bitcast-address-space-nested-global-cycle.ll | ||
bitcast-address-space-nested-global.ll | ||
bitcast-address-space-through-constant-inttoptr-inside-gep-instruction.ll | ||
bitcast-address-space-through-constant-inttoptr.ll | ||
bitcast-address-space-through-gep-2.ll | ||
bitcast-address-space-through-gep.ll | ||
bitcast-address-space-through-inttoptr.ll | ||
bitcast-address-spaces.ll | ||
bitcast-alias-address-space.ll | ||
bitcast-pointer-vector-neg.ll | ||
bitcast-vector-pointer-as-neg.ll | ||
bitcast-vector-pointer-as.ll | ||
bitcast-vector-pointer-neg.ll | ||
bitcast-vector-pointer-pos.ll | ||
blockbyref.ll | ||
byval-1.ll | ||
byval-4.ll | ||
callbr.ll | ||
callsite-dbgloc.ll | ||
cc-flags.ll | ||
comdat-decl1.ll | ||
comdat-decl2.ll | ||
comdat.ll | ||
comdat2.ll | ||
comdat3.ll | ||
commandline-meta1.ll | ||
commandline-meta2.ll | ||
commandline-meta3.ll | ||
commandline-meta4.ll | ||
cttz-undef-arg.ll | ||
dbg-difile-crash.ll | ||
dbg-invalid-compileunit.ll | ||
dbg-invalid-named-metadata.ll | ||
dbg-invalid-retaintypes.ll | ||
dbg-invalid-vector.ll | ||
dbg-line-without-file.ll | ||
dbg-null-retained-type.ll | ||
dbg-orphaned-compileunit.ll | ||
dbg-typerefs.ll | ||
dbg.ll | ||
deoptimize-intrinsic.ll | ||
dereferenceable-md-inttoptr.ll | ||
dereferenceable-md.ll | ||
di-subroutine-localvar.ll | ||
diderivedtype-address-space-atomic-type.ll | ||
diderivedtype-address-space-const-type.ll | ||
diderivedtype-address-space-friend.ll | ||
diderivedtype-address-space-inheritance.ll | ||
diderivedtype-address-space-member.ll | ||
diderivedtype-address-space-ptr-to-member-type.ll | ||
diderivedtype-address-space-restrict-type.ll | ||
diderivedtype-address-space-rvalue-reference-type.ll | ||
diderivedtype-address-space-typedef.ll | ||
diderivedtype-address-space-volatile-type.ll | ||
diexpression-dwarf-entry-value.ll | ||
diexpression-entry-value-llvm-ir.ll | ||
diexpression-entry-value.ll | ||
diexpression-swap.ll | ||
diexpression-valid-entry-value.ll | ||
diglobalvariable.ll | ||
dominates.ll | ||
element-wise-atomic-memory-intrinsics.ll | ||
fnarg-debuginfo.ll | ||
fnarg-nodebug.ll | ||
fp-intrinsics.ll | ||
fpmath.ll | ||
fragment.ll | ||
frameescape.ll | ||
func-dbg.ll | ||
function-metadata-bad.ll | ||
function-metadata-good.ll | ||
gc_relocate_addrspace.ll | ||
gc_relocate_operand.ll | ||
gc_relocate_return.ll | ||
gcread-ptrptr.ll | ||
gcroot.ll | ||
gcwrite-ptrptr.ll | ||
global-ctors-2.ll | ||
global-ctors.ll | ||
guard-intrinsic.ll | ||
ident-meta1.ll | ||
ident-meta2.ll | ||
ident-meta3.ll | ||
ident-meta4.ll | ||
immarg-param-attribute-invalid.ll | ||
inalloca-vararg.ll | ||
inalloca1.ll | ||
inalloca2.ll | ||
inalloca3.ll | ||
intrinsic-arg-overloading-struct-ret.ll | ||
intrinsic-bad-arg-type.ll | ||
intrinsic-immarg.ll | ||
invalid-disubrange-count-node.ll | ||
invalid-eh.ll | ||
invalid-statepoint.ll | ||
invalid-statepoint2.ll | ||
invoke.ll | ||
jumptable.ll | ||
llvm.compiler_used-invalid-type.ll | ||
llvm.dbg.declare-address.ll | ||
llvm.dbg.declare-expression.ll | ||
llvm.dbg.declare-variable.ll | ||
llvm.dbg.intrinsic-dbg-attachment.ll | ||
llvm.dbg.value-expression.ll | ||
llvm.dbg.value-value.ll | ||
llvm.dbg.value-variable.ll | ||
llvm.loop.ll | ||
llvm.used-invalid-init.ll | ||
llvm.used-invalid-init2.ll | ||
llvm.used-invalid-type.ll | ||
llvm.used-invalid-type2.ll | ||
llvm.used-ptr-type.ll | ||
masked-load.ll | ||
masked-store.ll | ||
mdcompositetype-templateparams-tuple.ll | ||
mdcompositetype-templateparams.ll | ||
memcpy.ll | ||
metadata-function-dbg.ll | ||
metadata-function-prof.ll | ||
module-flags-1.ll | ||
module-flags-2.ll | ||
module-flags-3.ll | ||
module-flags-cgprofile.ll | ||
musttail-invalid.ll | ||
musttail-valid.ll | ||
non-integer-gep-index.ll | ||
non-integer-gep-index.ll.bc | ||
non-integral-pointers.ll | ||
operand-bundles.ll | ||
pr34325.ll | ||
range-1.ll | ||
range-2.ll | ||
recursive-struct-param.ll | ||
recursive-type-1.ll | ||
recursive-type-2.ll | ||
recursive-type-3.ll | ||
resume.ll | ||
scalable-global-vars.ll | ||
scatter_gather.ll | ||
speculatable-callsite-invalid.ll | ||
speculatable-callsite.ll | ||
sret.ll | ||
statepoint.ll | ||
swifterror.ll | ||
swifterror2.ll | ||
swifterror3.ll | ||
swiftself.ll | ||
tbaa-allowed.ll | ||
tbaa.ll | ||
token1.ll | ||
token2.ll | ||
token3.ll | ||
token4.ll | ||
token5.ll | ||
token6.ll | ||
token7.ll | ||
unsized-types.ll | ||
varargs-intrinsic.ll | ||
variant-part.ll | ||
writeonly.ll |
README.txt
This directory contains testcases that the verifier is supposed to detect as malformed LLVM code. Testcases for situations that the verifier incorrectly identifies as malformed should go in the test/Assembler directory.