<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">It looks like there is a random DebugLoc MDNode that happens to have the DW_TAG_expression as a line number and that confuses the pretty-printer.<div class="">A hot-fix would be to disable the assertion in DIExpression::printInternal(), but we might be able to think of something better.</div><div class=""><br class=""></div><div class="">-- adrian</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 2, 2014, at 9:23 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Looks like this issue or something similar has been reported as <a href="http://llvm.org/bugs/show_bug.cgi?id=21131" class="">http://llvm.org/bugs/show_bug.cgi?id=21131</a> with a reproduction.</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Oct 2, 2014 at 8:03 AM, Adrian Prantl <span dir="ltr" class=""><<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is there any chance you can show me a backtrace for the crash?<br class="">
<br class="">
-- adrian<br class="">
<div class=""><div class="h5"><br class="">
On Oct 2, 2014, at 5:49 AM, Manuel Klimek <<a href="mailto:klimek@google.com" class="">klimek@google.com</a>> wrote:<br class="">
<br class="">
> This apparently leads to clang segfaults in our internal builds...<br class="">
><br class="">
> On Wed Oct 01 2014 at 9:11:14 PM Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:<br class="">
> Author: adrian<br class="">
> Date: Wed Oct 1 13:55:02 2014<br class="">
> New Revision: 218787<br class="">
><br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=218787&view=rev" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=218787&view=rev</a><br class="">
> Log:<br class="">
> Move the complex address expression out of DIVariable and into an extra<br class="">
> argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.<br class="">
><br class="">
> Previously, DIVariable was a variable-length field that has an optional<br class="">
> reference to a Metadata array consisting of a variable number of<br class="">
> complex address expressions. In the case of OpPiece expressions this is<br class="">
> wasting a lot of storage in IR, because when an aggregate type is, e.g.,<br class="">
> SROA'd into all of its n individual members, the IR will contain n copies<br class="">
> of the DIVariable, all alike, only differing in the complex address<br class="">
> reference at the end.<br class="">
><br class="">
> By making the complex address into an extra argument of the<br class="">
> dbg.value/dbg.declare intrinsics, all of the pieces can reference the<br class="">
> same variable and the complex address expressions can be uniqued across<br class="">
> the CU, too.<br class="">
> Down the road, this will allow us to move other flags, such as<br class="">
> "indirection" out of the DIVariable, too.<br class="">
><br class="">
> The new intrinsics look like this:<br class="">
> declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr)<br class="">
> declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr)<br class="">
><br class="">
> This patch adds a new LLVM-local tag to DIExpressions, so we can detect<br class="">
> and pretty-print DIExpression metadata nodes.<br class="">
><br class="">
> What this patch doesn't do:<br class="">
><br class="">
> This patch does not touch the "Indirect" field in DIVariable; but moving<br class="">
> that into the expression would be a natural next step.<br class="">
><br class="">
> <a href="http://reviews.llvm.org/D4919" target="_blank" class="">http://reviews.llvm.org/D4919</a><br class="">
> <a href="rdar://problem/17994491" class="">rdar://problem/17994491</a><br class="">
><br class="">
> Thanks to dblaikie and dexonsmith for reviewing this patch!<br class="">
><br class="">
> Note: I accidentally committed a bogus older version of this patch previously.<br class="">
><br class="">
> Modified:<br class="">
> llvm/trunk/docs/SourceLevelDebugging.rst<br class="">
> llvm/trunk/include/llvm/CodeGen/MachineInstr.h<br class="">
> llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h<br class="">
> llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h<br class="">
> llvm/trunk/include/llvm/CodeGen/SelectionDAG.h<br class="">
> llvm/trunk/include/llvm/IR/DIBuilder.h<br class="">
> llvm/trunk/include/llvm/IR/DebugInfo.h<br class="">
> llvm/trunk/include/llvm/IR/IntrinsicInst.h<br class="">
> llvm/trunk/include/llvm/IR/Intrinsics.td<br class="">
> llvm/trunk/include/llvm/Support/Dwarf.h<br class="">
> llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br class="">
> llvm/trunk/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp<br class="">
> llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h<br class="">
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br class="">
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h<br class="">
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br class="">
> llvm/trunk/lib/CodeGen/InlineSpiller.cpp<br class="">
> llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp<br class="">
> llvm/trunk/lib/CodeGen/MachineInstr.cpp<br class="">
> llvm/trunk/lib/CodeGen/RegAllocFast.cpp<br class="">
> llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp<br class="">
> llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp<br class="">
> llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp<br class="">
> llvm/trunk/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h<br class="">
> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp<br class="">
> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp<br class="">
> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h<br class="">
> llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp<br class="">
> llvm/trunk/lib/IR/AutoUpgrade.cpp<br class="">
> llvm/trunk/lib/IR/DIBuilder.cpp<br class="">
> llvm/trunk/lib/IR/DebugInfo.cpp<br class="">
> llvm/trunk/lib/Support/Dwarf.cpp<br class="">
> llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.cpp<br class="">
> llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.h<br class="">
> llvm/trunk/lib/Target/X86/X86FastISel.cpp<br class="">
> llvm/trunk/lib/Transforms/Scalar/SROA.cpp<br class="">
> llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp<br class="">
> llvm/trunk/lib/Transforms/Utils/Local.cpp<br class="">
> llvm/trunk/test/Analysis/GlobalsModRef/pr12351.ll<br class="">
> llvm/trunk/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll<br class="">
> llvm/trunk/test/Assembler/functionlocal-metadata.ll<br class="">
> llvm/trunk/test/CodeGen/AArch64/aarch64-2014-08-11-MachineCombinerCrash.ll<br class="">
> llvm/trunk/test/CodeGen/AArch64/arm64-2011-03-17-AsmPrinterCrash.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/2009-10-16-Scope.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/2010-08-04-StackVariable.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/coalesce-dbgvalue.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/debug-info-arg.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/debug-info-blocks.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/debug-info-branch-folding.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/debug-info-d16-reg.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/debug-info-qreg.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/debug-info-s16-reg.ll<br class="">
> llvm/trunk/test/CodeGen/ARM/debug-info-sreg2.ll<br class="">
> llvm/trunk/test/CodeGen/Generic/dbg_value.ll<br class="">
> llvm/trunk/test/CodeGen/Hexagon/hwloop-dbg.ll<br class="">
> llvm/trunk/test/CodeGen/Inputs/DbgValueOtherTargets.ll<br class="">
> llvm/trunk/test/CodeGen/PowerPC/dbg.ll<br class="">
> llvm/trunk/test/CodeGen/PowerPC/pr17168.ll<br class="">
> llvm/trunk/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2009-10-16-Scope.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2010-01-18-DbgValue.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2010-02-01-DbgValueCrash.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2010-05-28-Crash.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2010-07-06-DbgCrash.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2010-08-04-StackVariable.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2010-11-02-DbgParameter.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2012-11-30-handlemove-dbg.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2012-11-30-misched-dbg.ll<br class="">
> llvm/trunk/test/CodeGen/X86/2012-11-30-regpres-dbg.ll<br class="">
> llvm/trunk/test/CodeGen/X86/MachineSink-DbgValue.ll<br class="">
> llvm/trunk/test/CodeGen/X86/StackColoring-dbg.ll<br class="">
> llvm/trunk/test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll<br class="">
> llvm/trunk/test/CodeGen/X86/dbg-changes-codegen.ll<br class="">
> llvm/trunk/test/CodeGen/X86/fpstack-debuginstr-kill.ll<br class="">
> llvm/trunk/test/CodeGen/X86/stack-protector-dbginfo.ll<br class="">
> llvm/trunk/test/CodeGen/XCore/dwarf_debug.ll<br class="">
> llvm/trunk/test/DebugInfo/2009-11-10-CurrentFn.ll<br class="">
> llvm/trunk/test/DebugInfo/2010-03-12-llc-crash.ll<br class="">
> llvm/trunk/test/DebugInfo/2010-03-19-DbgDeclare.ll<br class="">
> llvm/trunk/test/DebugInfo/2010-03-24-MemberFn.ll<br class="">
> llvm/trunk/test/DebugInfo/2010-03-30-InvalidDbgInfoCrash.ll<br class="">
> llvm/trunk/test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll<br class="">
> llvm/trunk/test/DebugInfo/2010-05-03-DisableFramePtr.ll<br class="">
> llvm/trunk/test/DebugInfo/2010-05-03-OriginDIE.ll<br class="">
> llvm/trunk/test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll<br class="">
> llvm/trunk/test/DebugInfo/2010-10-01-crash.ll<br class="">
> llvm/trunk/test/DebugInfo/AArch64/struct_by_value.ll<br class="">
> llvm/trunk/test/DebugInfo/ARM/PR16736.ll<br class="">
> llvm/trunk/test/DebugInfo/ARM/lowerbdgdeclare_vla.ll<br class="">
> llvm/trunk/test/DebugInfo/ARM/s-super-register.ll<br class="">
> llvm/trunk/test/DebugInfo/ARM/selectiondag-deadcode.ll<br class="">
> llvm/trunk/test/DebugInfo/Mips/delay-slot.ll<br class="">
> llvm/trunk/test/DebugInfo/PR20038.ll<br class="">
> llvm/trunk/test/DebugInfo/SystemZ/variable-loc.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/2010-04-13-PubType.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/2011-12-16-BadStructRef.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/DW_AT_byte_size.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/DW_AT_linkage_name.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/DW_AT_location-reference.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/DW_AT_object_pointer.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/aligned_stack_var.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/arguments.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/array.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/array2.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/block-capture.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/byvalstruct.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/cu-ranges.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-byval-parameter.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-const-int.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-const.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-declare-arg.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-declare.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-i128-const.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-merge-loc-entry.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-prolog-end.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-value-const-byref.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-value-dag-combine.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-value-isel.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-value-location.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-value-range.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg-value-terminator.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dbg_value_direct.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/debug-info-block-captured-self.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/debug-info-blocks.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/debug-info-static-member.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/debug-loc-asan.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/debug-loc-offset.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/debug-ranges-offset.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/decl-derived-member.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/dwarf-public-names.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/earlydup-crash.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/elf-names.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/empty-and-one-elem-array.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/ending-run.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/fission-ranges.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/formal_parameter.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/inline-member-function.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/inline-seldag-test.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/instcombine-instrinsics.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/lexical_block.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/line-info.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/linkage-name.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/misched-dbg-value.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/multiple-at-const-val.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/nodebug_with_debug_loc.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/objc-property-void.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/op_deref.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/parameters.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/pieces-1.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/pieces-2.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/pieces-3.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/pr11300.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/pr12831.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/pr19307.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/recursive_inlining.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/reference-argument.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/rvalue-ref.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/sret.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/subrange-type.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/subreg.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/subregisters.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/union-template.ll<br class="">
> llvm/trunk/test/DebugInfo/X86/vla.ll<br class="">
> llvm/trunk/test/DebugInfo/array.ll<br class="">
> llvm/trunk/test/DebugInfo/cross-cu-inlining.ll<br class="">
> llvm/trunk/test/DebugInfo/cross-cu-linkonce-distinct.ll<br class="">
> llvm/trunk/test/DebugInfo/cross-cu-linkonce.ll<br class="">
> llvm/trunk/test/DebugInfo/cu-range-hole.ll<br class="">
> llvm/trunk/test/DebugInfo/cu-ranges.ll<br class="">
> llvm/trunk/test/DebugInfo/dead-argument-order.ll<br class="">
> llvm/trunk/test/DebugInfo/debug-info-qualifiers.ll<br class="">
> llvm/trunk/test/DebugInfo/dwarf-public-names.ll<br class="">
> llvm/trunk/test/DebugInfo/enum-types.ll<br class="">
> llvm/trunk/test/DebugInfo/enum.ll<br class="">
> llvm/trunk/test/DebugInfo/incorrect-variable-debugloc.ll<br class="">
> llvm/trunk/test/DebugInfo/inheritance.ll<br class="">
> llvm/trunk/test/DebugInfo/inline-debug-info-multiret.ll<br class="">
> llvm/trunk/test/DebugInfo/inline-debug-info.ll<br class="">
> llvm/trunk/test/DebugInfo/inline-scopes.ll<br class="">
> llvm/trunk/test/DebugInfo/inlined-arguments.ll<br class="">
> llvm/trunk/test/DebugInfo/inlined-vars.ll<br class="">
> llvm/trunk/test/DebugInfo/member-order.ll<br class="">
> llvm/trunk/test/DebugInfo/missing-abstract-variable.ll<br class="">
> llvm/trunk/test/DebugInfo/namespace.ll<br class="">
> llvm/trunk/test/DebugInfo/namespace_inline_function_definition.ll<br class="">
> llvm/trunk/test/DebugInfo/restrict.ll<br class="">
> llvm/trunk/test/DebugInfo/sugared-constants.ll<br class="">
> llvm/trunk/test/DebugInfo/tu-composite.ll<br class="">
> llvm/trunk/test/DebugInfo/two-cus-from-same-file.ll<br class="">
> llvm/trunk/test/DebugInfo/unconditional-branch.ll<br class="">
> llvm/trunk/test/DebugInfo/varargs.ll<br class="">
> llvm/trunk/test/Instrumentation/AddressSanitizer/coverage-dbg.ll<br class="">
> llvm/trunk/test/Instrumentation/AddressSanitizer/coverage2-dbg.ll<br class="">
> llvm/trunk/test/Instrumentation/AddressSanitizer/debug_info.ll<br class="">
> llvm/trunk/test/Instrumentation/MemorySanitizer/store-origin.ll<br class="">
> llvm/trunk/test/JitListener/test-common-symbols.ll<br class="">
> llvm/trunk/test/JitListener/test-inline.ll<br class="">
> llvm/trunk/test/JitListener/test-parameters.ll<br class="">
> llvm/trunk/test/Linker/2011-08-18-unique-class-type.ll<br class="">
> llvm/trunk/test/Linker/2011-08-18-unique-class-type2.ll<br class="">
> llvm/trunk/test/Linker/DbgDeclare.ll<br class="">
> llvm/trunk/test/Linker/DbgDeclare2.ll<br class="">
> llvm/trunk/test/Linker/Inputs/type-unique-inheritance-a.ll<br class="">
> llvm/trunk/test/Linker/Inputs/type-unique-inheritance-b.ll<br class="">
> llvm/trunk/test/Linker/Inputs/type-unique-simple2-a.ll<br class="">
> llvm/trunk/test/Linker/Inputs/type-unique-simple2-b.ll<br class="">
> llvm/trunk/test/Linker/type-unique-odr-a.ll<br class="">
> llvm/trunk/test/Linker/type-unique-odr-b.ll<br class="">
> llvm/trunk/test/Linker/type-unique-simple-a.ll<br class="">
> llvm/trunk/test/Linker/type-unique-simple-b.ll<br class="">
> llvm/trunk/test/Linker/type-unique-simple2-a.ll<br class="">
> llvm/trunk/test/Linker/type-unique-simple2-b.ll<br class="">
> llvm/trunk/test/Linker/type-unique-type-array-a.ll<br class="">
> llvm/trunk/test/Linker/type-unique-type-array-b.ll<br class="">
> llvm/trunk/test/Transforms/AddDiscriminators/no-discriminators.ll<br class="">
> llvm/trunk/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll<br class="">
> llvm/trunk/test/Transforms/DeadStoreElimination/inst-limits.ll<br class="">
> llvm/trunk/test/Transforms/GCOVProfiling/linezero.ll<br class="">
> llvm/trunk/test/Transforms/GlobalOpt/2009-03-05-dbg.ll<br class="">
> llvm/trunk/test/Transforms/Inline/ignore-debug-info.ll<br class="">
> llvm/trunk/test/Transforms/InstCombine/debuginfo.ll<br class="">
> llvm/trunk/test/Transforms/LICM/debug-value.ll<br class="">
> llvm/trunk/test/Transforms/LoopIdiom/debug-line.ll<br class="">
> llvm/trunk/test/Transforms/LoopRotate/dbgvalue.ll<br class="">
> llvm/trunk/test/Transforms/LoopStrengthReduce/pr12018.ll<br class="">
> llvm/trunk/test/Transforms/LoopVectorize/dbg.value.ll<br class="">
> llvm/trunk/test/Transforms/LoopVectorize/debugloc.ll<br class="">
> llvm/trunk/test/Transforms/Mem2Reg/ConvertDebugInfo.ll<br class="">
> llvm/trunk/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll<br class="">
> llvm/trunk/test/Transforms/ObjCARC/allocas.ll<br class="">
> llvm/trunk/test/Transforms/ObjCARC/basic.ll<br class="">
> llvm/trunk/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll<br class="">
> llvm/trunk/test/Transforms/SLPVectorizer/X86/debug_info.ll<br class="">
> llvm/trunk/test/Transforms/SampleProfile/branch.ll<br class="">
> llvm/trunk/test/Transforms/ScalarRepl/debuginfo-preserved.ll<br class="">
> llvm/trunk/test/Transforms/Scalarizer/dbginfo.ll<br class="">
> llvm/trunk/test/Transforms/SimplifyCFG/branch-fold-dbg.ll<br class="">
> llvm/trunk/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll<br class="">
> llvm/trunk/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll<br class="">
> llvm/trunk/test/Transforms/StripSymbols/strip-dead-debug-info.ll<br class="">
> llvm/trunk/unittests/Transforms/Utils/Cloning.cpp<br class="">
><br class="">
> Modified: llvm/trunk/docs/SourceLevelDebugging.rst<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/SourceLevelDebugging.rst?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/SourceLevelDebugging.rst?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/docs/SourceLevelDebugging.rst (original)<br class="">
> +++ llvm/trunk/docs/SourceLevelDebugging.rst Wed Oct 1 13:55:02 2014<br class="">
> @@ -571,7 +571,7 @@ Local variables<br class="">
> metadata, ;; Reference to the type descriptor<br class="">
> i32, ;; flags<br class="">
> metadata ;; (optional) Reference to inline location<br class="">
> - metadata ;; (optional) Reference to a complex expression (see below)<br class="">
> + metadata ;; (optional) Reference to a complex expression.<br class="">
> }<br class="">
><br class="">
> These descriptors are used to define variables local to a sub program. The<br class="">
> @@ -590,7 +590,20 @@ The context is either the subprogram or<br class="">
> Name the source variable name. Context and line indicate where the variable<br class="">
> was defined. Type descriptor defines the declared type of the variable.<br class="">
><br class="">
> -The ``OpPiece`` operator is used for (typically larger aggregate)<br class="">
> +Complex Expressions<br class="">
> +^^^^^^^^^^^^^^^^^^^<br class="">
> +.. code-block:: llvm<br class="">
> +<br class="">
> + !8 = metadata !{<br class="">
> + i32, ;; DW_TAG_expression<br class="">
> + ...<br class="">
> + }<br class="">
> +<br class="">
> +Complex expressions describe variable storage locations in terms of<br class="">
> +prefix-notated DWARF expressions. Currently the only supported<br class="">
> +operators are ``DW_OP_plus``, ``DW_OP_deref``, and ``DW_OP_piece``.<br class="">
> +<br class="">
> +The ``DW_OP_piece`` operator is used for (typically larger aggregate)<br class="">
> variables that are fragmented across several locations. It takes two<br class="">
> i32 arguments, an offset and a size in bytes to describe which piece<br class="">
> of the variable is at this location.<br class="">
><br class="">
> Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original)<br class="">
> +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -244,12 +244,22 @@ public:<br class="">
> ///<br class="">
> DebugLoc getDebugLoc() const { return debugLoc; }<br class="">
><br class="">
> - /// getDebugVariable() - Return the debug variable referenced by<br class="">
> + /// \brief Return the debug variable referenced by<br class="">
> /// this DBG_VALUE instruction.<br class="">
> DIVariable getDebugVariable() const {<br class="">
> assert(isDebugValue() && "not a DBG_VALUE");<br class="">
> - const MDNode *Var = getOperand(getNumOperands() - 1).getMetadata();<br class="">
> - return DIVariable(Var);<br class="">
> + DIVariable Var(getOperand(2).getMetadata());<br class="">
> + assert(Var.Verify() && "not a DIVariable");<br class="">
> + return Var;<br class="">
> + }<br class="">
> +<br class="">
> + /// \brief Return the complex address expression referenced by<br class="">
> + /// this DBG_VALUE instruction.<br class="">
> + DIExpression getDebugExpression() const {<br class="">
> + assert(isDebugValue() && "not a DBG_VALUE");<br class="">
> + DIExpression Expr(getOperand(3).getMetadata());<br class="">
> + assert(Expr.Verify() && "not a DIExpression");<br class="">
> + return Expr;<br class="">
> }<br class="">
><br class="">
> /// emitError - Emit an error referring to the source location of this<br class="">
><br class="">
> Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original)<br class="">
> +++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -170,6 +170,8 @@ public:<br class="">
><br class="">
> const MachineInstrBuilder &addMetadata(const MDNode *MD) const {<br class="">
> MI->addOperand(*MF, MachineOperand::CreateMetadata(MD));<br class="">
> + assert((MI->isDebugValue() ? MI->getDebugVariable().Verify() : true) &&<br class="">
> + "first MDNode argument of a DBG_VALUE not a DIVariable");<br class="">
> return *this;<br class="">
> }<br class="">
><br class="">
> @@ -345,24 +347,25 @@ inline MachineInstrBuilder BuildMI(Machi<br class="">
> /// address. The convention is that a DBG_VALUE is indirect iff the<br class="">
> /// second operand is an immediate.<br class="">
> ///<br class="">
> -inline MachineInstrBuilder BuildMI(MachineFunction &MF,<br class="">
> - DebugLoc DL,<br class="">
> - const MCInstrDesc &MCID,<br class="">
> - bool IsIndirect,<br class="">
> - unsigned Reg,<br class="">
> - unsigned Offset,<br class="">
> - const MDNode *MD) {<br class="">
> +inline MachineInstrBuilder BuildMI(MachineFunction &MF, DebugLoc DL,<br class="">
> + const MCInstrDesc &MCID, bool IsIndirect,<br class="">
> + unsigned Reg, unsigned Offset,<br class="">
> + const MDNode *Variable, const MDNode *Expr) {<br class="">
> + assert(DIVariable(Variable).Verify() && "not a DIVariable");<br class="">
> + assert(DIExpression(Expr).Verify() && "not a DIExpression");<br class="">
> if (IsIndirect)<br class="">
> return BuildMI(MF, DL, MCID)<br class="">
> - .addReg(Reg, RegState::Debug)<br class="">
> - .addImm(Offset)<br class="">
> - .addMetadata(MD);<br class="">
> + .addReg(Reg, RegState::Debug)<br class="">
> + .addImm(Offset)<br class="">
> + .addMetadata(Variable)<br class="">
> + .addMetadata(Expr);<br class="">
> else {<br class="">
> assert(Offset == 0 && "A direct address cannot have an offset.");<br class="">
> return BuildMI(MF, DL, MCID)<br class="">
> - .addReg(Reg, RegState::Debug)<br class="">
> - .addReg(0U, RegState::Debug)<br class="">
> - .addMetadata(MD);<br class="">
> + .addReg(Reg, RegState::Debug)<br class="">
> + .addReg(0U, RegState::Debug)<br class="">
> + .addMetadata(Variable)<br class="">
> + .addMetadata(Expr);<br class="">
> }<br class="">
> }<br class="">
><br class="">
> @@ -371,15 +374,15 @@ inline MachineInstrBuilder BuildMI(Machi<br class="">
> /// address and inserts it at position I.<br class="">
> ///<br class="">
> inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB,<br class="">
> - MachineBasicBlock::iterator I,<br class="">
> - DebugLoc DL,<br class="">
> - const MCInstrDesc &MCID,<br class="">
> - bool IsIndirect,<br class="">
> - unsigned Reg,<br class="">
> - unsigned Offset,<br class="">
> - const MDNode *MD) {<br class="">
> + MachineBasicBlock::iterator I, DebugLoc DL,<br class="">
> + const MCInstrDesc &MCID, bool IsIndirect,<br class="">
> + unsigned Reg, unsigned Offset,<br class="">
> + const MDNode *Variable, const MDNode *Expr) {<br class="">
> + assert(DIVariable(Variable).Verify() && "not a DIVariable");<br class="">
> + assert(DIExpression(Expr).Verify() && "not a DIExpression");<br class="">
> MachineFunction &MF = *BB.getParent();<br class="">
> - MachineInstr *MI = BuildMI(MF, DL, MCID, IsIndirect, Reg, Offset, MD);<br class="">
> + MachineInstr *MI =<br class="">
> + BuildMI(MF, DL, MCID, IsIndirect, Reg, Offset, Variable, Expr);<br class="">
> BB.insert(I, MI);<br class="">
> return MachineInstrBuilder(MF, MI);<br class="">
> }<br class="">
><br class="">
> Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h (original)<br class="">
> +++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -166,6 +166,7 @@ public:<br class="">
><br class="">
> struct VariableDbgInfo {<br class="">
> TrackingVH<MDNode> Var;<br class="">
> + TrackingVH<MDNode> Expr;<br class="">
> unsigned Slot;<br class="">
> DebugLoc Loc;<br class="">
> };<br class="">
> @@ -390,8 +391,9 @@ public:<br class="">
><br class="">
> /// setVariableDbgInfo - Collect information used to emit debugging<br class="">
> /// information of a variable.<br class="">
> - void setVariableDbgInfo(MDNode *N, unsigned Slot, DebugLoc Loc) {<br class="">
> - VariableDbgInfo Info = { N, Slot, Loc };<br class="">
> + void setVariableDbgInfo(MDNode *Var, MDNode *Expr, unsigned Slot,<br class="">
> + DebugLoc Loc) {<br class="">
> + VariableDbgInfo Info = {Var, Expr, Slot, Loc};<br class="">
> VariableDbgInfos.push_back(std::move(Info));<br class="">
> }<br class="">
><br class="">
><br class="">
> Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)<br class="">
> +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -984,15 +984,18 @@ public:<br class="">
><br class="">
> /// getDbgValue - Creates a SDDbgValue node.<br class="">
> ///<br class="">
> - SDDbgValue *getDbgValue(MDNode *MDPtr, SDNode *N, unsigned R,<br class="">
> - bool IsIndirect, uint64_t Off,<br class="">
> - DebugLoc DL, unsigned O);<br class="">
> - /// Constant.<br class="">
> - SDDbgValue *getConstantDbgValue(MDNode *MDPtr, const Value *C, uint64_t Off,<br class="">
> - DebugLoc DL, unsigned O);<br class="">
> - /// Frame index.<br class="">
> - SDDbgValue *getFrameIndexDbgValue(MDNode *MDPtr, unsigned FI, uint64_t Off,<br class="">
> - DebugLoc DL, unsigned O);<br class="">
> + /// SDNode<br class="">
> + SDDbgValue *getDbgValue(MDNode *Var, MDNode *Expr, SDNode *N, unsigned R,<br class="">
> + bool IsIndirect, uint64_t Off, DebugLoc DL,<br class="">
> + unsigned O);<br class="">
> +<br class="">
> + /// Constant<br class="">
> + SDDbgValue *getConstantDbgValue(MDNode *Var, MDNode *Expr, const Value *C,<br class="">
> + uint64_t Off, DebugLoc DL, unsigned O);<br class="">
> +<br class="">
> + /// FrameIndex<br class="">
> + SDDbgValue *getFrameIndexDbgValue(MDNode *Var, MDNode *Expr, unsigned FI,<br class="">
> + uint64_t Off, DebugLoc DL, unsigned O);<br class="">
><br class="">
> /// RemoveDeadNode - Remove the specified node from the system. If any of its<br class="">
> /// operands then becomes dead, remove them as well. Inform UpdateListener<br class="">
><br class="">
> Modified: llvm/trunk/include/llvm/IR/DIBuilder.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DIBuilder.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DIBuilder.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/include/llvm/IR/DIBuilder.h (original)<br class="">
> +++ llvm/trunk/include/llvm/IR/DIBuilder.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -85,7 +85,6 @@ namespace llvm {<br class="">
><br class="">
> public:<br class="">
> explicit DIBuilder(Module &M);<br class="">
> - enum ComplexAddrKind { OpPlus=1, OpDeref, OpPiece };<br class="">
> enum DebugEmissionKind { FullDebug=1, LineTablesOnly };<br class="">
><br class="">
> /// finalize - Construct any deferred debug info descriptors.<br class="">
> @@ -501,33 +500,18 @@ namespace llvm {<br class="">
> unsigned Flags = 0,<br class="">
> unsigned ArgNo = 0);<br class="">
><br class="">
> -<br class="">
> - /// createComplexVariable - Create a new descriptor for the specified<br class="">
> + /// createExpression - Create a new descriptor for the specified<br class="">
> /// variable which has a complex address expression for its address.<br class="">
> - /// @param Tag Dwarf TAG. Usually DW_TAG_auto_variable or<br class="">
> - /// DW_TAG_arg_variable.<br class="">
> - /// @param Scope Variable scope.<br class="">
> - /// @param Name Variable name.<br class="">
> - /// @param F File where this variable is defined.<br class="">
> - /// @param LineNo Line number.<br class="">
> - /// @param Ty Variable Type<br class="">
> /// @param Addr An array of complex address operations.<br class="">
> - /// @param ArgNo If this variable is an argument then this argument's<br class="">
> - /// number. 1 indicates 1st argument.<br class="">
> - DIVariable createComplexVariable(unsigned Tag, DIDescriptor Scope,<br class="">
> - StringRef Name, DIFile F, unsigned LineNo,<br class="">
> - DITypeRef Ty, ArrayRef<Value *> Addr,<br class="">
> - unsigned ArgNo = 0);<br class="">
> + DIExpression createExpression(ArrayRef<Value *> Addr = None);<br class="">
><br class="">
> - /// createVariablePiece - Create a descriptor to describe one part<br class="">
> + /// createPieceExpression - Create a descriptor to describe one part<br class="">
> /// of aggregate variable that is fragmented across multiple Values.<br class="">
> ///<br class="">
> - /// @param Variable Variable that is partially represented by this.<br class="">
> /// @param OffsetInBytes Offset of the piece in bytes.<br class="">
> /// @param SizeInBytes Size of the piece in bytes.<br class="">
> - DIVariable createVariablePiece(DIVariable Variable,<br class="">
> - unsigned OffsetInBytes,<br class="">
> - unsigned SizeInBytes);<br class="">
> + DIExpression createPieceExpression(unsigned OffsetInBytes,<br class="">
> + unsigned SizeInBytes);<br class="">
><br class="">
> /// createFunction - Create a new descriptor for the specified subprogram.<br class="">
> /// See comments in DISubprogram for descriptions of these fields.<br class="">
> @@ -675,34 +659,37 @@ namespace llvm {<br class="">
> /// insertDeclare - Insert a new llvm.dbg.declare intrinsic call.<br class="">
> /// @param Storage llvm::Value of the variable<br class="">
> /// @param VarInfo Variable's debug info descriptor.<br class="">
> + /// @param Expr A complex location expression.<br class="">
> /// @param InsertAtEnd Location for the new intrinsic.<br class="">
> Instruction *insertDeclare(llvm::Value *Storage, DIVariable VarInfo,<br class="">
> - BasicBlock *InsertAtEnd);<br class="">
> + DIExpression Expr, BasicBlock *InsertAtEnd);<br class="">
><br class="">
> /// insertDeclare - Insert a new llvm.dbg.declare intrinsic call.<br class="">
> /// @param Storage llvm::Value of the variable<br class="">
> /// @param VarInfo Variable's debug info descriptor.<br class="">
> + /// @param Expr A complex location expression.<br class="">
> /// @param InsertBefore Location for the new intrinsic.<br class="">
> Instruction *insertDeclare(llvm::Value *Storage, DIVariable VarInfo,<br class="">
> - Instruction *InsertBefore);<br class="">
> -<br class="">
> + DIExpression Expr, Instruction *InsertBefore);<br class="">
><br class="">
> /// insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.<br class="">
> /// @param Val llvm::Value of the variable<br class="">
> /// @param Offset Offset<br class="">
> /// @param VarInfo Variable's debug info descriptor.<br class="">
> + /// @param Expr A complex location expression.<br class="">
> /// @param InsertAtEnd Location for the new intrinsic.<br class="">
> Instruction *insertDbgValueIntrinsic(llvm::Value *Val, uint64_t Offset,<br class="">
> - DIVariable VarInfo,<br class="">
> + DIVariable VarInfo, DIExpression Expr,<br class="">
> BasicBlock *InsertAtEnd);<br class="">
><br class="">
> /// insertDbgValueIntrinsic - Insert a new llvm.dbg.value intrinsic call.<br class="">
> /// @param Val llvm::Value of the variable<br class="">
> /// @param Offset Offset<br class="">
> /// @param VarInfo Variable's debug info descriptor.<br class="">
> + /// @param Expr A complex location expression.<br class="">
> /// @param InsertBefore Location for the new intrinsic.<br class="">
> Instruction *insertDbgValueIntrinsic(llvm::Value *Val, uint64_t Offset,<br class="">
> - DIVariable VarInfo,<br class="">
> + DIVariable VarInfo, DIExpression Expr,<br class="">
> Instruction *InsertBefore);<br class="">
> };<br class="">
> } // end namespace llvm<br class="">
><br class="">
> Modified: llvm/trunk/include/llvm/IR/DebugInfo.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/include/llvm/IR/DebugInfo.h (original)<br class="">
> +++ llvm/trunk/include/llvm/IR/DebugInfo.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -150,6 +150,7 @@ public:<br class="">
> bool isTemplateValueParameter() const;<br class="">
> bool isObjCProperty() const;<br class="">
> bool isImportedEntity() const;<br class="">
> + bool isExpression() const;<br class="">
><br class="">
> /// print - print descriptor.<br class="">
> void print(raw_ostream &OS) const;<br class="">
> @@ -720,20 +721,6 @@ public:<br class="">
> /// Verify - Verify that a variable descriptor is well formed.<br class="">
> bool Verify() const;<br class="">
><br class="">
> - /// HasComplexAddr - Return true if the variable has a complex address.<br class="">
> - bool hasComplexAddress() const { return getNumAddrElements() > 0; }<br class="">
> -<br class="">
> - /// \brief Return the size of this variable's complex address or<br class="">
> - /// zero if there is none.<br class="">
> - unsigned getNumAddrElements() const {<br class="">
> - if (DbgNode->getNumOperands() < 9)<br class="">
> - return 0;<br class="">
> - return getDescriptorField(8)->getNumOperands();<br class="">
> - }<br class="">
> -<br class="">
> - /// \brief return the Idx'th complex address element.<br class="">
> - uint64_t getAddrElement(unsigned Idx) const;<br class="">
> -<br class="">
> /// isBlockByrefVariable - Return true if the variable was declared as<br class="">
> /// a "__block" variable (Apple Blocks).<br class="">
> bool isBlockByrefVariable(const DITypeIdentifierMap &Map) const {<br class="">
> @@ -744,6 +731,35 @@ public:<br class="">
> /// information for an inlined function arguments.<br class="">
> bool isInlinedFnArgument(const Function *CurFn);<br class="">
><br class="">
> + /// Return the size reported by the variable's type.<br class="">
> + unsigned getSizeInBits(const DITypeIdentifierMap &Map);<br class="">
> +<br class="">
> + void printExtendedName(raw_ostream &OS) const;<br class="">
> +};<br class="">
> +<br class="">
> +/// DIExpression - A complex location expression.<br class="">
> +class DIExpression : public DIDescriptor {<br class="">
> + friend class DIDescriptor;<br class="">
> + void printInternal(raw_ostream &OS) const;<br class="">
> +<br class="">
> +public:<br class="">
> + explicit DIExpression(const MDNode *N = nullptr) : DIDescriptor(N) {}<br class="">
> +<br class="">
> + /// Verify - Verify that a variable descriptor is well formed.<br class="">
> + bool Verify() const;<br class="">
> +<br class="">
> + /// \brief Return the number of elements in the complex expression.<br class="">
> + unsigned getNumElements() const {<br class="">
> + if (!DbgNode)<br class="">
> + return 0;<br class="">
> + unsigned N = DbgNode->getNumOperands();<br class="">
> + assert(N > 0 && "missing tag");<br class="">
> + return N - 1;<br class="">
> + }<br class="">
> +<br class="">
> + /// \brief return the Idx'th complex address element.<br class="">
> + uint64_t getElement(unsigned Idx) const;<br class="">
> +<br class="">
> /// isVariablePiece - Return whether this is a piece of an aggregate<br class="">
> /// variable.<br class="">
> bool isVariablePiece() const;<br class="">
> @@ -751,11 +767,6 @@ public:<br class="">
> uint64_t getPieceOffset() const;<br class="">
> /// getPieceSize - Return the size of this piece in bytes.<br class="">
> uint64_t getPieceSize() const;<br class="">
> -<br class="">
> - /// Return the size reported by the variable's type.<br class="">
> - unsigned getSizeInBits(const DITypeIdentifierMap &Map);<br class="">
> -<br class="">
> - void printExtendedName(raw_ostream &OS) const;<br class="">
> };<br class="">
><br class="">
> /// DILocation - This object holds location information. This object<br class="">
> @@ -872,9 +883,6 @@ DIVariable createInlinedVariable(MDNode<br class="">
> /// cleanseInlinedVariable - Remove inlined scope from the variable.<br class="">
> DIVariable cleanseInlinedVariable(MDNode *DV, LLVMContext &VMContext);<br class="">
><br class="">
> -/// getEntireVariable - Remove OpPiece exprs from the variable.<br class="">
> -DIVariable getEntireVariable(DIVariable DV);<br class="">
> -<br class="">
> /// Construct DITypeIdentifierMap by going through retained types of each CU.<br class="">
> DITypeIdentifierMap generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes);<br class="">
><br class="">
><br class="">
> Modified: llvm/trunk/include/llvm/IR/IntrinsicInst.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IntrinsicInst.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IntrinsicInst.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/include/llvm/IR/IntrinsicInst.h (original)<br class="">
> +++ llvm/trunk/include/llvm/IR/IntrinsicInst.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -82,6 +82,7 @@ namespace llvm {<br class="">
> public:<br class="">
> Value *getAddress() const;<br class="">
> MDNode *getVariable() const { return cast<MDNode>(getArgOperand(1)); }<br class="">
> + MDNode *getExpression() const { return cast<MDNode>(getArgOperand(2)); }<br class="">
><br class="">
> // Methods for support type inquiry through isa, cast, and dyn_cast:<br class="">
> static inline bool classof(const IntrinsicInst *I) {<br class="">
> @@ -103,6 +104,7 @@ namespace llvm {<br class="">
> const_cast<Value*>(getArgOperand(1)))->getZExtValue();<br class="">
> }<br class="">
> MDNode *getVariable() const { return cast<MDNode>(getArgOperand(2)); }<br class="">
> + MDNode *getExpression() const { return cast<MDNode>(getArgOperand(3)); }<br class="">
><br class="">
> // Methods for support type inquiry through isa, cast, and dyn_cast:<br class="">
> static inline bool classof(const IntrinsicInst *I) {<br class="">
><br class="">
> Modified: llvm/trunk/include/llvm/IR/Intrinsics.td<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Intrinsics.td?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Intrinsics.td?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/include/llvm/IR/Intrinsics.td (original)<br class="">
> +++ llvm/trunk/include/llvm/IR/Intrinsics.td Wed Oct 1 13:55:02 2014<br class="">
> @@ -373,9 +373,12 @@ let Properties = [IntrNoMem] in {<br class="">
> // places.<br class="">
> let Properties = [IntrNoMem] in {<br class="">
> def int_dbg_declare : Intrinsic<[],<br class="">
> - [llvm_metadata_ty, llvm_metadata_ty]>;<br class="">
> + [llvm_metadata_ty,<br class="">
> + llvm_metadata_ty,<br class="">
> + llvm_metadata_ty]>;<br class="">
> def int_dbg_value : Intrinsic<[],<br class="">
> [llvm_metadata_ty, llvm_i64_ty,<br class="">
> + llvm_metadata_ty,<br class="">
> llvm_metadata_ty]>;<br class="">
> }<br class="">
><br class="">
><br class="">
> Modified: llvm/trunk/include/llvm/Support/Dwarf.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Dwarf.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/include/llvm/Support/Dwarf.h (original)<br class="">
> +++ llvm/trunk/include/llvm/Support/Dwarf.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -53,6 +53,7 @@ enum LLVMConstants : uint32_t {<br class="">
><br class="">
> DW_TAG_auto_variable = 0x100, // Tag for local (auto) variables.<br class="">
> DW_TAG_arg_variable = 0x101, // Tag for argument variables.<br class="">
> + DW_TAG_expression = 0x102, // Tag for complex address expressions.<br class="">
><br class="">
> DW_TAG_user_base = 0x1000, // Recommended base for user tags.<br class="">
><br class="">
><br class="">
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)<br class="">
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Oct 1 13:55:02 2014<br class="">
> @@ -614,8 +614,8 @@ static void emitKill(const MachineInstr<br class="">
> /// of DBG_VALUE, returning true if it was able to do so. A false return<br class="">
> /// means the target will need to handle MI in EmitInstruction.<br class="">
> static bool emitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {<br class="">
> - // This code handles only the 3-operand target-independent form.<br class="">
> - if (MI->getNumOperands() != 3)<br class="">
> + // This code handles only the 4-operand target-independent form.<br class="">
> + if (MI->getNumOperands() != 4)<br class="">
> return false;<br class="">
><br class="">
> SmallString<128> Str;<br class="">
> @@ -629,9 +629,11 @@ static bool emitDebugValueComment(const<br class="">
> OS << Name << ":";<br class="">
> }<br class="">
> OS << V.getName();<br class="">
> - if (V.isVariablePiece())<br class="">
> - OS << " [piece offset=" << V.getPieceOffset()<br class="">
> - << " size="<<V.getPieceSize()<<"]";<br class="">
> +<br class="">
> + DIExpression Expr = MI->getDebugExpression();<br class="">
> + if (Expr.isVariablePiece())<br class="">
> + OS << " [piece offset=" << Expr.getPieceOffset()<br class="">
> + << " size=" << Expr.getPieceSize() << "]";<br class="">
> OS << " <- ";<br class="">
><br class="">
> // The second operand is only an offset if it's an immediate.<br class="">
><br class="">
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp (original)<br class="">
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp Wed Oct 1 13:55:02 2014<br class="">
> @@ -27,7 +27,7 @@ namespace llvm {<br class="">
> // In the other case, returns 0.<br class="">
> static unsigned isDescribedByReg(const MachineInstr &MI) {<br class="">
> assert(MI.isDebugValue());<br class="">
> - assert(MI.getNumOperands() == 3);<br class="">
> + assert(MI.getNumOperands() == 4);<br class="">
> // If location of variable is described using a register (directly or<br class="">
> // indirecltly), this register is always a first operand.<br class="">
> return MI.getOperand(0).isReg() ? MI.getOperand(0).getReg() : 0;<br class="">
> @@ -37,7 +37,7 @@ void DbgValueHistoryMap::startInstrRange<br class="">
> const MachineInstr &MI) {<br class="">
> // Instruction range should start with a DBG_VALUE instruction for the<br class="">
> // variable.<br class="">
> - assert(MI.isDebugValue() && getEntireVariable(MI.getDebugVariable()) == Var);<br class="">
> + assert(MI.isDebugValue() && "not a DBG_VALUE");<br class="">
> auto &Ranges = VarInstrRanges[Var];<br class="">
> if (!Ranges.empty() && Ranges.back().second == nullptr &&<br class="">
> Ranges.back().first->isIdenticalTo(&MI)) {<br class="">
> @@ -193,7 +193,7 @@ void calculateDbgValueHistory(const Mach<br class="">
> // Use the base variable (without any DW_OP_piece expressions)<br class="">
> // as index into History. The full variables including the<br class="">
> // piece expressions are attached to the MI.<br class="">
> - DIVariable Var = getEntireVariable(MI.getDebugVariable());<br class="">
> + DIVariable Var = MI.getDebugVariable();<br class="">
><br class="">
> if (unsigned PrevReg = Result.getRegisterForVar(Var))<br class="">
> dropRegDescribedVar(RegVars, PrevReg, Var);<br class="">
><br class="">
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h (original)<br class="">
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DebugLocEntry.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -26,25 +26,30 @@ class DebugLocEntry {<br class="">
> public:<br class="">
> /// A single location or constant.<br class="">
> struct Value {<br class="">
> - Value(const MDNode *Var, int64_t i)<br class="">
> - : Variable(Var), EntryKind(E_Integer) {<br class="">
> + Value(const MDNode *Var, const MDNode *Expr, int64_t i)<br class="">
> + : Variable(Var), Expression(Expr), EntryKind(E_Integer) {<br class="">
> Constant.Int = i;<br class="">
> }<br class="">
> - Value(const MDNode *Var, const ConstantFP *CFP)<br class="">
> - : Variable(Var), EntryKind(E_ConstantFP) {<br class="">
> + Value(const MDNode *Var, const MDNode *Expr, const ConstantFP *CFP)<br class="">
> + : Variable(Var), Expression(Expr), EntryKind(E_ConstantFP) {<br class="">
> Constant.CFP = CFP;<br class="">
> }<br class="">
> - Value(const MDNode *Var, const ConstantInt *CIP)<br class="">
> - : Variable(Var), EntryKind(E_ConstantInt) {<br class="">
> + Value(const MDNode *Var, const MDNode *Expr, const ConstantInt *CIP)<br class="">
> + : Variable(Var), Expression(Expr), EntryKind(E_ConstantInt) {<br class="">
> Constant.CIP = CIP;<br class="">
> }<br class="">
> - Value(const MDNode *Var, MachineLocation Loc)<br class="">
> - : Variable(Var), EntryKind(E_Location), Loc(Loc) {<br class="">
> + Value(const MDNode *Var, const MDNode *Expr, MachineLocation Loc)<br class="">
> + : Variable(Var), Expression(Expr), EntryKind(E_Location), Loc(Loc) {<br class="">
> + assert(DIVariable(Var).Verify());<br class="">
> + assert(DIExpression(Expr).Verify());<br class="">
> }<br class="">
><br class="">
> // The variable to which this location entry corresponds.<br class="">
> const MDNode *Variable;<br class="">
><br class="">
> + // Any complex address location expression for this Value.<br class="">
> + const MDNode *Expression;<br class="">
> +<br class="">
> // Type of entry that this represents.<br class="">
> enum EntryType { E_Location, E_Integer, E_ConstantFP, E_ConstantInt };<br class="">
> enum EntryType EntryKind;<br class="">
> @@ -69,7 +74,8 @@ public:<br class="">
> MachineLocation getLoc() const { return Loc; }<br class="">
> const MDNode *getVariableNode() const { return Variable; }<br class="">
> DIVariable getVariable() const { return DIVariable(Variable); }<br class="">
> - bool isVariablePiece() const { return getVariable().isVariablePiece(); }<br class="">
> + bool isVariablePiece() const { return getExpression().isVariablePiece(); }<br class="">
> + DIExpression getExpression() const { return DIExpression(Expression); }<br class="">
> friend bool operator==(const Value &, const Value &);<br class="">
> friend bool operator<(const Value &, const Value &);<br class="">
> };<br class="">
> @@ -90,11 +96,13 @@ public:<br class="">
> // list of values.<br class="">
> // Return true if the merge was successful.<br class="">
> bool MergeValues(const DebugLocEntry &Next) {<br class="">
> - if (Begin == Next.Begin && Values.size() > 0 && Next.Values.size() > 0) {<br class="">
> + if (Begin == Next.Begin) {<br class="">
> + DIExpression Expr(Values[0].Expression);<br class="">
> DIVariable Var(Values[0].Variable);<br class="">
> + DIExpression NextExpr(Next.Values[0].Expression);<br class="">
> DIVariable NextVar(Next.Values[0].Variable);<br class="">
> - if (Var.getName() == NextVar.getName() &&<br class="">
> - Var.isVariablePiece() && NextVar.isVariablePiece()) {<br class="">
> + if (Var == NextVar && Expr.isVariablePiece() &&<br class="">
> + NextExpr.isVariablePiece()) {<br class="">
> addValues(Next.Values);<br class="">
> End = Next.End;<br class="">
> return true;<br class="">
> @@ -133,8 +141,10 @@ public:<br class="">
> std::sort(Values.begin(), Values.end());<br class="">
> Values.erase(std::unique(Values.begin(), Values.end(),<br class="">
> [](const Value &A, const Value &B) {<br class="">
> - return A.getVariable() == B.getVariable();<br class="">
> - }), Values.end());<br class="">
> + return A.getVariable() == B.getVariable() &&<br class="">
> + A.getExpression() == B.getExpression();<br class="">
> + }),<br class="">
> + Values.end());<br class="">
> }<br class="">
> };<br class="">
><br class="">
> @@ -144,7 +154,10 @@ inline bool operator==(const DebugLocEnt<br class="">
> if (A.EntryKind != B.EntryKind)<br class="">
> return false;<br class="">
><br class="">
> - if (A.getVariable() != B.getVariable())<br class="">
> + if (A.Expression != B.Expression)<br class="">
> + return false;<br class="">
> +<br class="">
> + if (A.Variable != B.Variable)<br class="">
> return false;<br class="">
><br class="">
> switch (A.EntryKind) {<br class="">
> @@ -163,7 +176,8 @@ inline bool operator==(const DebugLocEnt<br class="">
> /// Compare two pieces based on their offset.<br class="">
> inline bool operator<(const DebugLocEntry::Value &A,<br class="">
> const DebugLocEntry::Value &B) {<br class="">
> - return A.getVariable().getPieceOffset() < B.getVariable().getPieceOffset();<br class="">
> + return A.getExpression().getPieceOffset() <<br class="">
> + B.getExpression().getPieceOffset();<br class="">
> }<br class="">
><br class="">
> }<br class="">
><br class="">
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br class="">
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Oct 1 13:55:02 2014<br class="">
> @@ -901,7 +901,7 @@ void DwarfDebug::collectDeadVariables()<br class="">
> for (unsigned vi = 0, ve = Variables.getNumElements(); vi != ve; ++vi) {<br class="">
> DIVariable DV(Variables.getElement(vi));<br class="">
> assert(DV.isVariable());<br class="">
> - DbgVariable NewVar(DV, this);<br class="">
> + DbgVariable NewVar(DV, DIExpression(nullptr), this);<br class="">
> auto VariableDie = SPCU->constructVariableDIE(NewVar);<br class="">
> SPCU->applyVariableAttributes(NewVar, *VariableDie);<br class="">
> SPDIE->addChild(std::move(VariableDie));<br class="">
> @@ -1121,7 +1121,7 @@ DbgVariable *DwarfDebug::getExistingAbst<br class="">
><br class="">
> void DwarfDebug::createAbstractVariable(const DIVariable &Var,<br class="">
> LexicalScope *Scope) {<br class="">
> - auto AbsDbgVariable = make_unique<DbgVariable>(Var, this);<br class="">
> + auto AbsDbgVariable = make_unique<DbgVariable>(Var, DIExpression(), this);<br class="">
> addScopeVariable(Scope, AbsDbgVariable.get());<br class="">
> AbstractVariables[Var] = std::move(AbsDbgVariable);<br class="">
> }<br class="">
> @@ -1177,6 +1177,7 @@ void DwarfDebug::collectVariableInfoFrom<br class="">
> continue;<br class="">
> Processed.insert(VI.Var);<br class="">
> DIVariable DV(VI.Var);<br class="">
> + DIExpression Expr(VI.Expr);<br class="">
> LexicalScope *Scope = LScopes.findLexicalScope(VI.Loc);<br class="">
><br class="">
> // If variable scope is not found then skip this variable.<br class="">
> @@ -1184,7 +1185,7 @@ void DwarfDebug::collectVariableInfoFrom<br class="">
> continue;<br class="">
><br class="">
> ensureAbstractVariableIsCreatedIfScoped(DV, Scope->getScopeNode());<br class="">
> - ConcreteVariables.push_back(make_unique<DbgVariable>(DV, this));<br class="">
> + ConcreteVariables.push_back(make_unique<DbgVariable>(DV, Expr, this));<br class="">
> DbgVariable *RegVar = ConcreteVariables.back().get();<br class="">
> RegVar->setFrameIndex(VI.Slot);<br class="">
> addScopeVariable(Scope, RegVar);<br class="">
> @@ -1193,9 +1194,10 @@ void DwarfDebug::collectVariableInfoFrom<br class="">
><br class="">
> // Get .debug_loc entry for the instruction range starting at MI.<br class="">
> static DebugLocEntry::Value getDebugLocValue(const MachineInstr *MI) {<br class="">
> + const MDNode *Expr = MI->getDebugExpression();<br class="">
> const MDNode *Var = MI->getDebugVariable();<br class="">
><br class="">
> - assert(MI->getNumOperands() == 3);<br class="">
> + assert(MI->getNumOperands() == 4);<br class="">
> if (MI->getOperand(0).isReg()) {<br class="">
> MachineLocation MLoc;<br class="">
> // If the second operand is an immediate, this is a<br class="">
> @@ -1204,20 +1206,20 @@ static DebugLocEntry::Value getDebugLocV<br class="">
> MLoc.set(MI->getOperand(0).getReg());<br class="">
> else<br class="">
> MLoc.set(MI->getOperand(0).getReg(), MI->getOperand(1).getImm());<br class="">
> - return DebugLocEntry::Value(Var, MLoc);<br class="">
> + return DebugLocEntry::Value(Var, Expr, MLoc);<br class="">
> }<br class="">
> if (MI->getOperand(0).isImm())<br class="">
> - return DebugLocEntry::Value(Var, MI->getOperand(0).getImm());<br class="">
> + return DebugLocEntry::Value(Var, Expr, MI->getOperand(0).getImm());<br class="">
> if (MI->getOperand(0).isFPImm())<br class="">
> - return DebugLocEntry::Value(Var, MI->getOperand(0).getFPImm());<br class="">
> + return DebugLocEntry::Value(Var, Expr, MI->getOperand(0).getFPImm());<br class="">
> if (MI->getOperand(0).isCImm())<br class="">
> - return DebugLocEntry::Value(Var, MI->getOperand(0).getCImm());<br class="">
> + return DebugLocEntry::Value(Var, Expr, MI->getOperand(0).getCImm());<br class="">
><br class="">
> - llvm_unreachable("Unexpected 3 operand DBG_VALUE instruction!");<br class="">
> + llvm_unreachable("Unexpected 4-operand DBG_VALUE instruction!");<br class="">
> }<br class="">
><br class="">
> /// Determine whether two variable pieces overlap.<br class="">
> -static bool piecesOverlap(DIVariable P1, DIVariable P2) {<br class="">
> +static bool piecesOverlap(DIExpression P1, DIExpression P2) {<br class="">
> if (!P1.isVariablePiece() || !P2.isVariablePiece())<br class="">
> return true;<br class="">
> unsigned l1 = P1.getPieceOffset();<br class="">
> @@ -1268,11 +1270,11 @@ DwarfDebug::buildLocationList(SmallVecto<br class="">
> }<br class="">
><br class="">
> // If this piece overlaps with any open ranges, truncate them.<br class="">
> - DIVariable DIVar = Begin->getDebugVariable();<br class="">
> + DIExpression DIExpr = Begin->getDebugExpression();<br class="">
> auto Last = std::remove_if(OpenRanges.begin(), OpenRanges.end(),<br class="">
> [&](DebugLocEntry::Value R) {<br class="">
> - return piecesOverlap(DIVar, R.getVariable());<br class="">
> - });<br class="">
> + return piecesOverlap(DIExpr, R.getExpression());<br class="">
> + });<br class="">
> OpenRanges.erase(Last, OpenRanges.end());<br class="">
><br class="">
> const MCSymbol *StartLabel = getLabelBeforeInsn(Begin);<br class="">
> @@ -1294,7 +1296,7 @@ DwarfDebug::buildLocationList(SmallVecto<br class="">
> bool couldMerge = false;<br class="">
><br class="">
> // If this is a piece, it may belong to the current DebugLocEntry.<br class="">
> - if (DIVar.isVariablePiece()) {<br class="">
> + if (DIExpr.isVariablePiece()) {<br class="">
> // Add this value to the list of open ranges.<br class="">
> OpenRanges.push_back(Value);<br class="">
><br class="">
> @@ -1320,10 +1322,14 @@ DwarfDebug::buildLocationList(SmallVecto<br class="">
> if (PrevEntry != DebugLoc.rend() && PrevEntry->MergeRanges(*CurEntry))<br class="">
> DebugLoc.pop_back();<br class="">
><br class="">
> - DEBUG(dbgs() << "Values:\n";<br class="">
> - for (auto Value : CurEntry->getValues())<br class="">
> - Value.getVariable()->dump();<br class="">
> - dbgs() << "-----\n");<br class="">
> + DEBUG({<br class="">
> + dbgs() << CurEntry->getValues().size() << " Values:\n";<br class="">
> + for (auto Value : CurEntry->getValues()) {<br class="">
> + Value.getVariable()->dump();<br class="">
> + Value.getExpression()->dump();<br class="">
> + }<br class="">
> + dbgs() << "-----\n";<br class="">
> + });<br class="">
> }<br class="">
> }<br class="">
><br class="">
> @@ -1358,7 +1364,7 @@ DwarfDebug::collectVariableInfo(SmallPtr<br class="">
> if (!Scope)<br class="">
> continue;<br class="">
><br class="">
> - Processed.insert(getEntireVariable(DV));<br class="">
> + Processed.insert(DV);<br class="">
> const MachineInstr *MInsn = Ranges.front().first;<br class="">
> assert(MInsn->isDebugValue() && "History must begin with debug value");<br class="">
> ensureAbstractVariableIsCreatedIfScoped(DV, Scope->getScopeNode());<br class="">
> @@ -1392,7 +1398,8 @@ DwarfDebug::collectVariableInfo(SmallPtr<br class="">
> continue;<br class="">
> if (LexicalScope *Scope = LScopes.findLexicalScope(DV.getContext())) {<br class="">
> ensureAbstractVariableIsCreatedIfScoped(DV, Scope->getScopeNode());<br class="">
> - ConcreteVariables.push_back(make_unique<DbgVariable>(DV, this));<br class="">
> + DIExpression NoExpr;<br class="">
> + ConcreteVariables.push_back(make_unique<DbgVariable>(DV, NoExpr, this));<br class="">
> addScopeVariable(Scope, ConcreteVariables.back().get());<br class="">
> }<br class="">
> }<br class="">
> @@ -1580,18 +1587,17 @@ void DwarfDebug::beginFunction(const Mac<br class="">
><br class="">
> // The first mention of a function argument gets the FunctionBeginSym<br class="">
> // label, so arguments are visible when breaking at function entry.<br class="">
> - DIVariable DV(Ranges.front().first->getDebugVariable());<br class="">
> - if (DV.isVariable() && DV.getTag() == dwarf::DW_TAG_arg_variable &&<br class="">
> - getDISubprogram(DV.getContext()).describes(MF->getFunction())) {<br class="">
> - if (!DV.isVariablePiece())<br class="">
> - LabelsBeforeInsn[Ranges.front().first] = FunctionBeginSym;<br class="">
> - else {<br class="">
> + DIVariable DIVar(Ranges.front().first->getDebugVariable());<br class="">
> + if (DIVar.isVariable() && DIVar.getTag() == dwarf::DW_TAG_arg_variable &&<br class="">
> + getDISubprogram(DIVar.getContext()).describes(MF->getFunction())) {<br class="">
> + LabelsBeforeInsn[Ranges.front().first] = FunctionBeginSym;<br class="">
> + if (Ranges.front().first->getDebugExpression().isVariablePiece()) {<br class="">
> // Mark all non-overlapping initial pieces.<br class="">
> for (auto I = Ranges.begin(); I != Ranges.end(); ++I) {<br class="">
> - DIVariable Piece = I->first->getDebugVariable();<br class="">
> + DIExpression Piece = I->first->getDebugExpression();<br class="">
> if (std::all_of(Ranges.begin(), I,<br class="">
> - [&](DbgValueHistoryMap::InstrRange Pred){<br class="">
> - return !piecesOverlap(Piece, Pred.first->getDebugVariable());<br class="">
> + [&](DbgValueHistoryMap::InstrRange Pred) {<br class="">
> + return !piecesOverlap(Piece, Pred.first->getDebugExpression());<br class="">
> }))<br class="">
> LabelsBeforeInsn[I->first] = FunctionBeginSym;<br class="">
> else<br class="">
> @@ -2089,9 +2095,9 @@ void DwarfDebug::emitLocPieces(ByteStrea<br class="">
><br class="">
> unsigned Offset = 0;<br class="">
> for (auto Piece : Values) {<br class="">
> - DIVariable Var = Piece.getVariable();<br class="">
> - unsigned PieceOffset = Var.getPieceOffset();<br class="">
> - unsigned PieceSize = Var.getPieceSize();<br class="">
> + DIExpression Expr = Piece.getExpression();<br class="">
> + unsigned PieceOffset = Expr.getPieceOffset();<br class="">
> + unsigned PieceSize = Expr.getPieceSize();<br class="">
> assert(Offset <= PieceOffset && "overlapping or duplicate pieces");<br class="">
> if (Offset < PieceOffset) {<br class="">
> // The DWARF spec seriously mandates pieces with no locations for gaps.<br class="">
> @@ -2102,8 +2108,9 @@ void DwarfDebug::emitLocPieces(ByteStrea<br class="">
> Offset += PieceSize;<br class="">
><br class="">
> const unsigned SizeOfByte = 8;<br class="">
> - assert(!Var.isIndirect() && "indirect address for piece");<br class="">
> #ifndef NDEBUG<br class="">
> + DIVariable Var = Piece.getVariable();<br class="">
> + assert(!Var.isIndirect() && "indirect address for piece");<br class="">
> unsigned VarSize = Var.getSizeInBits(Map);<br class="">
> assert(PieceSize+PieceOffset <= VarSize/SizeOfByte<br class="">
> && "piece is larger than or outside of variable");<br class="">
> @@ -2149,24 +2156,25 @@ void DwarfDebug::emitDebugLocValue(ByteS<br class="">
> }<br class="">
> } else if (Value.isLocation()) {<br class="">
> MachineLocation Loc = Value.getLoc();<br class="">
> - if (!DV.hasComplexAddress())<br class="">
> + DIExpression Expr = Value.getExpression();<br class="">
> + if (!Expr)<br class="">
> // Regular entry.<br class="">
> Asm->EmitDwarfRegOp(Streamer, Loc, DV.isIndirect());<br class="">
> else {<br class="">
> // Complex address entry.<br class="">
> - unsigned N = DV.getNumAddrElements();<br class="">
> + unsigned N = Expr.getNumElements();<br class="">
> unsigned i = 0;<br class="">
> - if (N >= 2 && DV.getAddrElement(0) == DIBuilder::OpPlus) {<br class="">
> + if (N >= 2 && Expr.getElement(0) == dwarf::DW_OP_plus) {<br class="">
> if (Loc.getOffset()) {<br class="">
> i = 2;<br class="">
> Asm->EmitDwarfRegOp(Streamer, Loc, DV.isIndirect());<br class="">
> Streamer.EmitInt8(dwarf::DW_OP_deref, "DW_OP_deref");<br class="">
> Streamer.EmitInt8(dwarf::DW_OP_plus_uconst, "DW_OP_plus_uconst");<br class="">
> - Streamer.EmitSLEB128(DV.getAddrElement(1));<br class="">
> + Streamer.EmitSLEB128(Expr.getElement(1));<br class="">
> } else {<br class="">
> // If first address element is OpPlus then emit<br class="">
> // DW_OP_breg + Offset instead of DW_OP_reg + Offset.<br class="">
> - MachineLocation TLoc(Loc.getReg(), DV.getAddrElement(1));<br class="">
> + MachineLocation TLoc(Loc.getReg(), Expr.getElement(1));<br class="">
> Asm->EmitDwarfRegOp(Streamer, TLoc, DV.isIndirect());<br class="">
> i = 2;<br class="">
> }<br class="">
> @@ -2176,14 +2184,14 @@ void DwarfDebug::emitDebugLocValue(ByteS<br class="">
><br class="">
> // Emit remaining complex address elements.<br class="">
> for (; i < N; ++i) {<br class="">
> - uint64_t Element = DV.getAddrElement(i);<br class="">
> - if (Element == DIBuilder::OpPlus) {<br class="">
> + uint64_t Element = Expr.getElement(i);<br class="">
> + if (Element == dwarf::DW_OP_plus) {<br class="">
> Streamer.EmitInt8(dwarf::DW_OP_plus_uconst, "DW_OP_plus_uconst");<br class="">
> - Streamer.EmitULEB128(DV.getAddrElement(++i));<br class="">
> - } else if (Element == DIBuilder::OpDeref) {<br class="">
> + Streamer.EmitULEB128(Expr.getElement(++i));<br class="">
> + } else if (Element == dwarf::DW_OP_deref) {<br class="">
> if (!Loc.isReg())<br class="">
> Streamer.EmitInt8(dwarf::DW_OP_deref, "DW_OP_deref");<br class="">
> - } else if (Element == DIBuilder::OpPiece) {<br class="">
> + } else if (Element == dwarf::DW_OP_piece) {<br class="">
> i += 3;<br class="">
> // handled in emitDebugLocEntry.<br class="">
> } else<br class="">
><br class="">
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)<br class="">
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Wed Oct 1 13:55:02 2014<br class="">
> @@ -70,6 +70,7 @@ public:<br class="">
> /// \brief This class is used to track local variable information.<br class="">
> class DbgVariable {<br class="">
> DIVariable Var; // Variable Descriptor.<br class="">
> + DIExpression Expr; // Complex address location expression.<br class="">
> DIE *TheDIE; // Variable DIE.<br class="">
> unsigned DotDebugLocOffset; // Offset in DotDebugLocEntries.<br class="">
> const MachineInstr *MInsn; // DBG_VALUE instruction of the variable.<br class="">
> @@ -78,18 +79,22 @@ class DbgVariable {<br class="">
><br class="">
> public:<br class="">
> /// Construct a DbgVariable from a DIVariable.<br class="">
> - DbgVariable(DIVariable V, DwarfDebug *DD)<br class="">
> - : Var(V), TheDIE(nullptr), DotDebugLocOffset(~0U), MInsn(nullptr),<br class="">
> - FrameIndex(~0), DD(DD) {}<br class="">
> + DbgVariable(DIVariable V, DIExpression E, DwarfDebug *DD)<br class="">
> + : Var(V), Expr(E), TheDIE(nullptr), DotDebugLocOffset(~0U),<br class="">
> + MInsn(nullptr), FrameIndex(~0), DD(DD) {<br class="">
> + assert(Var.Verify() && Expr.Verify());<br class="">
> + }<br class="">
><br class="">
> /// Construct a DbgVariable from a DEBUG_VALUE.<br class="">
> /// AbstractVar may be NULL.<br class="">
> DbgVariable(const MachineInstr *DbgValue, DwarfDebug *DD)<br class="">
> - : Var(DbgValue->getDebugVariable()), TheDIE(nullptr),<br class="">
> - DotDebugLocOffset(~0U), MInsn(DbgValue), FrameIndex(~0), DD(DD) {}<br class="">
> + : Var(DbgValue->getDebugVariable()), Expr(DbgValue->getDebugExpression()),<br class="">
> + TheDIE(nullptr), DotDebugLocOffset(~0U), MInsn(DbgValue),<br class="">
> + FrameIndex(~0), DD(DD) {}<br class="">
><br class="">
> // Accessors.<br class="">
> DIVariable getVariable() const { return Var; }<br class="">
> + DIExpression getExpression() const { return Expr; }<br class="">
> void setDIE(DIE &D) { TheDIE = &D; }<br class="">
> DIE *getDIE() const { return TheDIE; }<br class="">
> void setDotDebugLocOffset(unsigned O) { DotDebugLocOffset = O; }<br class="">
> @@ -124,14 +129,14 @@ public:<br class="">
><br class="">
> bool variableHasComplexAddress() const {<br class="">
> assert(Var.isVariable() && "Invalid complex DbgVariable!");<br class="">
> - return Var.hasComplexAddress();<br class="">
> + return Expr.getNumElements() > 0;<br class="">
> }<br class="">
> bool isBlockByrefVariable() const;<br class="">
> unsigned getNumAddrElements() const {<br class="">
> assert(Var.isVariable() && "Invalid complex DbgVariable!");<br class="">
> - return Var.getNumAddrElements();<br class="">
> + return Expr.getNumElements();<br class="">
> }<br class="">
> - uint64_t getAddrElement(unsigned i) const { return Var.getAddrElement(i); }<br class="">
> + uint64_t getAddrElement(unsigned i) const { return Expr.getElement(i); }<br class="">
> DIType getType() const;<br class="">
><br class="">
> private:<br class="">
><br class="">
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)<br class="">
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Wed Oct 1 13:55:02 2014<br class="">
> @@ -607,16 +607,20 @@ void DwarfUnit::addComplexAddress(const<br class="">
> unsigned N = DV.getNumAddrElements();<br class="">
> unsigned i = 0;<br class="">
> if (Location.isReg()) {<br class="">
> - if (N >= 2 && DV.getAddrElement(0) == DIBuilder::OpPlus) {<br class="">
> + if (N >= 2 && DV.getAddrElement(0) == dwarf::DW_OP_plus) {<br class="">
> + assert(!DV.getVariable().isIndirect() &&<br class="">
> + "double indirection not handled");<br class="">
> // If first address element is OpPlus then emit<br class="">
> // DW_OP_breg + Offset instead of DW_OP_reg + Offset.<br class="">
> addRegisterOffset(*Loc, Location.getReg(), DV.getAddrElement(1));<br class="">
> i = 2;<br class="">
> - } else if (N >= 2 && DV.getAddrElement(0) == DIBuilder::OpDeref) {<br class="">
> - addRegisterOpPiece(*Loc, Location.getReg(),<br class="">
> - DV.getVariable().getPieceSize(),<br class="">
> - DV.getVariable().getPieceOffset());<br class="">
> - i = 3;<br class="">
> + } else if (N >= 2 && DV.getAddrElement(0) == dwarf::DW_OP_deref) {<br class="">
> + assert(!DV.getVariable().isIndirect() &&<br class="">
> + "double indirection not handled");<br class="">
> + addRegisterOpPiece(*Loc, Location.getReg(),<br class="">
> + DV.getExpression().getPieceSize(),<br class="">
> + DV.getExpression().getPieceOffset());<br class="">
> + i = 3;<br class="">
> } else<br class="">
> addRegisterOpPiece(*Loc, Location.getReg());<br class="">
> } else<br class="">
> @@ -624,15 +628,15 @@ void DwarfUnit::addComplexAddress(const<br class="">
><br class="">
> for (; i < N; ++i) {<br class="">
> uint64_t Element = DV.getAddrElement(i);<br class="">
> - if (Element == DIBuilder::OpPlus) {<br class="">
> + if (Element == dwarf::DW_OP_plus) {<br class="">
> addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_plus_uconst);<br class="">
> addUInt(*Loc, dwarf::DW_FORM_udata, DV.getAddrElement(++i));<br class="">
><br class="">
> - } else if (Element == DIBuilder::OpDeref) {<br class="">
> + } else if (Element == dwarf::DW_OP_deref) {<br class="">
> if (!Location.isReg())<br class="">
> addUInt(*Loc, dwarf::DW_FORM_data1, dwarf::DW_OP_deref);<br class="">
><br class="">
> - } else if (Element == DIBuilder::OpPiece) {<br class="">
> + } else if (Element == dwarf::DW_OP_piece) {<br class="">
> const unsigned SizeOfByte = 8;<br class="">
> unsigned PieceOffsetInBits = DV.getAddrElement(++i)*SizeOfByte;<br class="">
> unsigned PieceSizeInBits = DV.getAddrElement(++i)*SizeOfByte;<br class="">
> @@ -1861,7 +1865,7 @@ std::unique_ptr<DIE> DwarfUnit::construc<br class="">
><br class="">
> // Check if variable is described by a DBG_VALUE instruction.<br class="">
> if (const MachineInstr *DVInsn = DV.getMInsn()) {<br class="">
> - assert(DVInsn->getNumOperands() == 3);<br class="">
> + assert(DVInsn->getNumOperands() == 4);<br class="">
> if (DVInsn->getOperand(0).isReg()) {<br class="">
> const MachineOperand RegOp = DVInsn->getOperand(0);<br class="">
> // If the second operand is an immediate, this is an indirect value.<br class="">
><br class="">
> Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original)<br class="">
> +++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Wed Oct 1 13:55:02 2014<br class="">
> @@ -1224,12 +1224,16 @@ void InlineSpiller::spillAroundUses(unsi<br class="">
> // Modify DBG_VALUE now that the value is in a spill slot.<br class="">
> bool IsIndirect = MI->isIndirectDebugValue();<br class="">
> uint64_t Offset = IsIndirect ? MI->getOperand(1).getImm() : 0;<br class="">
> - const MDNode *MDPtr = MI->getOperand(2).getMetadata();<br class="">
> + const MDNode *Var = MI->getDebugVariable();<br class="">
> + const MDNode *Expr = MI->getDebugExpression();<br class="">
> DebugLoc DL = MI->getDebugLoc();<br class="">
> DEBUG(dbgs() << "Modifying debug info due to spill:" << "\t" << *MI);<br class="">
> MachineBasicBlock *MBB = MI->getParent();<br class="">
> BuildMI(*MBB, MBB->erase(MI), DL, TII.get(TargetOpcode::DBG_VALUE))<br class="">
> - .addFrameIndex(StackSlot).addImm(Offset).addMetadata(MDPtr);<br class="">
> + .addFrameIndex(StackSlot)<br class="">
> + .addImm(Offset)<br class="">
> + .addMetadata(Var)<br class="">
> + .addMetadata(Expr);<br class="">
> continue;<br class="">
> }<br class="">
><br class="">
><br class="">
> Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp<br class="">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=218787&r1=218786&r2=218787&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=218787&r1=218786&r2=218787&view=diff</a><br class="">
> ==============================================================================<br class="">
> --- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)<br class="">
> +++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Wed Oct 1 13:55:02 2014<br class="">
> @@ -110,7 +110,8 @@ public:<br class="">
> namespace {<br class="">
> class LDVImpl;<br class="">
> class UserValue {<br class="">
> - const MDNode *variable; ///< The debug info variable we are part of.<br class="">
> + const MDNode *Variable; ///< The debug info variable we are part of.<br class="">
> + const MDNode *Expression; ///< Any complex address expression.<br class="">
> unsigned offset; ///< Byte offset into variable.<br class="">
> bool IsIndirect; ///< true if this is a register-indirect+offset value.<br class="">
> DebugLoc dl; ///< The debug location for the variable. This is<br class="">
> @@ -140,11 +141,10 @@ class UserValue {<br class="">
><br class="">
> public:<br class="">
> /// UserValue - Create a new UserValue.<br class="">
> - UserValue(const MDNode *var, unsigned o, bool i, DebugLoc L,<br class="">
> - LocMap::Allocator &alloc)<br class="">
> - : variable(var), offset(o), IsIndirect(i), dl(L), leader(this),<br class="">
> - next(nullptr), locInts(alloc)<br class="">
> - {}<br class="">
> + UserValue(const MDNode *var, const MDNode *expr, unsigned o, bool i,<br class="">
> + DebugLoc L, LocMap::Allocator &alloc)<br class="">
> + : Variable(var), Expression(expr), offset(o), IsIndirect(i), dl(L),<br class="">
> + leader(this), next(nullptr), locInts(alloc) {}<br class="">
><br class="">
> /// getLeader - Get the leader of this value's equivalence class.<br class="">
> UserValue *getLeader() {<br class="">
> @@ -158,8 +158,10 @@ public:<br class="">
> UserValue *getNext() const { return next; }<br class="">
><br class="">
> /// match - Does this UserValue match the parameters?<br class="">
> - bool match(const MDNode *Var, unsigned Offset, bool indirect) const {<br class="">
> - return Var == variable && Offset == offset && indirect == IsIndirect;<br class="">
> + bool match(const MDNode *Var, const MDNode *Expr, unsigned Offset,<br class="">
> + bool indirect) const {<br class="">
> + return Var == Variable && Expr == Expression && Offset == offset &&<br class="">
> + indirect == IsIndirect;<br class="">
> }<br class="">
><br class="">
> /// merge - Merge equivalence classes.<br class="">
> @@ -307,8 +309,8 @@ class LDVImpl {<br class="">
> UVMap userVarMap;<br class="">
><br class="">
> /// getUserValue - Find or create a UserValue.<br class="">
> - UserValue *getUserValue(const MDNode *Var, unsigned Offset,<br class="">
> - bool IsIndirect, DebugLoc DL);<br class="">
> + UserValue *getUserValue(const MDNode *Var, const MDNode *Expr,<br class="">
> + unsigned Offset, bool IsIndirect, DebugLoc DL);<br class="">
><br class="">
> /// lookupVirtReg - Find the EC leader for VirtReg or null.<br class="">
> UserValue *lookupVirtReg(unsigned VirtReg);<br class="">
> @@ -361,7 +363,7 @@ public:<br class="">
> } // namespace<br class="">
><br class="">
> void UserValue::print(raw_ostream &OS, const TargetMachine *TM) {<br class="">
> - DIVariable DV(variable);<br class="">
> + DIVariable DV(Variable);<br class="">
> OS << "!\"";<br class="">
> DV.printExtendedName(OS);<br class="">
> OS << "\"\t";<br class="">
> @@ -422,19 +424,20 @@ void UserValue::mapVirtRegs(LDVImpl *LDV<br class="">
> LDV->mapVirtReg(locations[i].getReg(), this);<br class="">
> }<br class="">
><br class="">
> -UserValue *LDVImpl::getUserValue(const MDNode *Var, unsigned Offset,<br class="">
> -<br class="">
<br class="">
</div></div>_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>