llvm-6502/test/Assembler
Adrian Prantl 076fd5dfc1 Move the complex address expression out of DIVariable and into an extra
argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.

Previously, DIVariable was a variable-length field that has an optional
reference to a Metadata array consisting of a variable number of
complex address expressions. In the case of OpPiece expressions this is
wasting a lot of storage in IR, because when an aggregate type is, e.g.,
SROA'd into all of its n individual members, the IR will contain n copies
of the DIVariable, all alike, only differing in the complex address
reference at the end.

By making the complex address into an extra argument of the
dbg.value/dbg.declare intrinsics, all of the pieces can reference the
same variable and the complex address expressions can be uniqued across
the CU, too.
Down the road, this will allow us to move other flags, such as
"indirection" out of the DIVariable, too.

The new intrinsics look like this:
declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr)
declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr)

This patch adds a new LLVM-local tag to DIExpressions, so we can detect
and pretty-print DIExpression metadata nodes.

What this patch doesn't do:

This patch does not touch the "Indirect" field in DIVariable; but moving
that into the expression would be a natural next step.

http://reviews.llvm.org/D4919
rdar://problem/17994491

Thanks to dblaikie and dexonsmith for reviewing this patch!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218778 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-01 17:55:39 +00:00
..
2002-03-08-NameCollision2.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-03-08-NameCollision.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-04-07-HexFloatConstants.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-04-07-InfConstant.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-04-29-NameBinding.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-05-02-InvalidForwardRef.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-07-14-OpaqueType.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-07-25-QuoteInString.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-07-25-ReturnPtrFunction.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-07-31-SlashInString.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-08-15-CastAmbiguity.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-08-15-ConstantExprProblem.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-08-15-UnresolvedGlobalReference.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-08-16-ConstExprInlined.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-08-19-BytecodeReader.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-08-22-DominanceProblem.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-10-08-LargeArrayPerformance.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-10-13-ConstantEncodingProblem.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2002-12-15-GlobalResolve.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-01-30-UnsignedString.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-04-15-ConstantInitAssertion.ll
2003-04-25-UnresolvedGlobalReference.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-05-03-BytecodeReaderProblem.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-05-12-MinIntProblem.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-05-15-AssemblerProblem.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-05-15-SwitchBug.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-05-21-ConstantShiftExpr.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-05-21-EmptyStructTest.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-05-21-MalformedShiftCrash.ll
2003-05-21-MalformedStructCrash.ll
2003-08-20-ConstantExprGEP-Fold.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-08-21-ConstantExprCast-Fold.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-11-05-ConstantExprShift.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-11-11-ImplicitRename.ll
2003-11-12-ConstantExprCast.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2003-11-24-SymbolTableCrash.ll
2004-01-11-getelementptrfolding.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2004-01-20-MaxLongLong.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2004-02-01-NegativeZero.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2004-02-27-SelfUseAssertError.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2004-03-07-FunctionAddressAlignment.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2004-03-30-UnclosedFunctionCrash.ll
2004-04-04-GetElementPtrIndexTypes.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2004-06-07-VerifierBug.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2004-10-22-BCWriterUndefBug.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2004-11-28-InvalidTypeCrash.ll
2005-01-03-FPConstantDisassembly.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2005-01-31-CallingAggregateFunction.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2005-05-05-OpaqueUndefValues.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2005-12-21-ZeroInitVector.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2006-09-28-CrashOnInvalid.ll
2006-12-09-Cast-To-Bool.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-01-02-Undefined-Arg-Type.ll
2007-01-05-Cmp-ConstExpr.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-01-16-CrashOnBadCast2.ll
2007-01-16-CrashOnBadCast.ll
2007-03-18-InvalidNumberedVar.ll
2007-03-19-NegValue.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-04-20-AlignedLoad.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-04-20-AlignedStore.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-04-25-AssemblerFoldExternWeak.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-05-21-Escape.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-07-19-ParamAttrAmbiguity.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-08-06-AliasInvalid.ll
2007-09-10-AliasFwdRef.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-09-29-GC.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2007-11-26-AttributeOverload.ll
2007-12-11-AddressSpaces.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2008-01-11-VarargAttrs.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2008-02-18-IntPointerCrash.ll
2008-07-10-APInt.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2008-09-02-FunctionNotes2.ll
2008-09-02-FunctionNotes.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2008-09-29-RetAttr.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2008-10-14-QuoteInName.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2009-02-01-UnnamedForwardRef.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2009-02-28-CastOpc.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2009-02-28-StripOpaqueName.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2009-03-24-ZextConstantExpr.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2009-07-24-ZeroArgGEP.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
2010-02-05-FunctionLocalMetadataBecomesNull.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 17:55:39 +00:00
addrspacecast-alias.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
aggregate-constant-values.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
aggregate-return-single-value.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
alias-redefinition.ll Don't crash on redefinitions. 2014-05-09 21:49:17 +00:00
alias-use-list-order.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
align-inst-alloca.ll
align-inst-load.ll
align-inst-store.ll
align-inst.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
alignstack.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
anon-functions.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
atomic.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
attribute-builtin.ll Remove verifier check that attribute 'builtin' is only applied to calls to 2013-09-07 00:25:48 +00:00
auto_upgrade_intrinsics.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
bcwrap.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
comment.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
ConstantExprFold.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
ConstantExprFoldCast.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
ConstantExprFoldSelect.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
ConstantExprNoFold.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
externally-initialized.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
extractvalue-invalid-idx.ll
fast-math-flags.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
flags.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
functionlocal-metadata.ll Move the complex address expression out of DIVariable and into an extra 2014-10-01 17:55:39 +00:00
getelementptr_struct.ll
getelementptr_vec_idx1.ll
getelementptr_vec_idx2.ll
getelementptr_vec_idx3.ll
getelementptr_vec_struct.ll
getelementptr.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
getInt.ll Clean up RUN command for Assembler/getInt.ll. 2014-01-13 22:37:35 +00:00
global-addrspace-forwardref.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
half-constprop.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
half-conv.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
half.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
huge-array.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
inalloca.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
inline-asm-clobber.ll [inline asm] Add a check in InlineAsm::ConstraintInfo::Parse to make sure '{' 2014-09-05 22:30:32 +00:00
insertextractvalue.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
insertvalue-invalid-idx.ll
internal-hidden-alias.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
internal-hidden-function.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
internal-hidden-variable.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
internal-protected-alias.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
internal-protected-function.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
internal-protected-variable.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
invalid_cast2.ll
invalid_cast3.ll Bug 18228 - Fix accepting bitcasts between vectors of pointers with a 2014-01-22 19:21:33 +00:00
invalid_cast.ll
invalid-comdat2.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
invalid-comdat.ll IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
invalid-fwdref1.ll
invalid-name.ll Make it explicit that nulls are not allowed in names. 2013-11-19 21:12:39 +00:00
invalid-uselistorder_bb-missing-bb.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder_bb-missing-body.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder_bb-missing-func.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder_bb-not-bb.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder_bb-not-func.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder_bb-numbered.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-function-between-blocks.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-function-missing-named.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-function-missing-numbered.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-global-missing.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-indexes-duplicated.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-indexes-empty.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-indexes-one.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-indexes-ordered.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-indexes-range.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-indexes-toofew.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-indexes-toomany.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
invalid-uselistorder-type.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
metadata.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
MultipleReturnValueType.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
musttail-invalid-1.ll Declare that musttail calls in variadic functions forward the ellipsis 2014-08-26 00:33:28 +00:00
musttail-invalid-2.ll Declare that musttail calls in variadic functions forward the ellipsis 2014-08-26 00:33:28 +00:00
musttail.ll Declare that musttail calls in variadic functions forward the ellipsis 2014-08-26 00:33:28 +00:00
named-metadata.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
numbered-values.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
private-hidden-alias.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
private-hidden-function.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
private-hidden-variable.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
private-protected-alias.ll Use "weak alias" instead of "alias weak" 2014-07-30 22:51:54 +00:00
private-protected-function.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
private-protected-variable.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
select.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
tls-models.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
unnamed-addr.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
unnamed.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
upgrade-loop-metadata.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
uselistorder_bb.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
uselistorder.ll IR: Implement uselistorder assembly directives 2014-08-19 21:30:15 +00:00
vbool-cmp.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
vector-cmp.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
vector-select.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
vector-shift.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
x86mmx.ll verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00