[PATCH] Move the IsIndirect flag from DIVariable into DIExpression.

Adrian Prantl aprantl at apple.com
Wed Jan 14 17:23:42 PST 2015

> On Jan 14, 2015, at 5:19 PM, Adrian Prantl <aprantl at apple.com> wrote:
> Hi dblaikie, echristo,
> This has been long overdue, and is generally totally mechanical. It does break IR-Metadata compatibility, but we do that a lot at the moment :-)
> In this form I'm taking no prisoners and simple reflow DIDescriptor::FlagLValueReference and FlagRValueReference to close the gap from removing the flag, but I could understand if someone rather wants to leave a hole in the enum.
> Note: LLVM+CFE is rolled into one patch.
> Commit message:
>    Move the IsIndirect flag from DIVariable into DIExpression.
>    This is a much more natural place for this information to be, but there
>    is also a more technical reason:
>    The IsIndirect flag is used to mark a variable that is turned
>    into a reference by virtue of the calling convention; this happends
>    for example to aggregate return values.
>    The inliner, for example, may actually need to undo this indirection to
>    correctly represent the value in its new context. This is impossible to
>    implement because the DIVariable can't be safely modified. We can however
>    safely construct a new DIExpression on the fly.

For those interested in the inliner bug mentioned above, you can observe it by running the attached IR though opt -inline.
-- adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ll
Type: application/octet-stream
Size: 5954 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150114/546cac18/attachment.obj>
-------------- next part --------------

>  rL LLVM
> http://reviews.llvm.org/D6986
> Files:
>  include/llvm/CodeGen/AsmPrinter.h
>  include/llvm/IR/DebugInfo.h
>  lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
>  lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
>  lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
>  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>  lib/CodeGen/CGDebugInfo.cpp
>  test/CodeGen/debug-info-vla.c
>  test/CodeGenCXX/debug-info.cpp
>  test/DebugInfo/AArch64/struct_by_value.ll
>  test/DebugInfo/ARM/lowerbdgdeclare_vla.ll
>  test/DebugInfo/ARM/selectiondag-deadcode.ll
>  test/DebugInfo/X86/dbg_value_direct.ll
>  test/DebugInfo/X86/debug-loc-offset.ll
>  test/DebugInfo/X86/op_deref.ll
>  test/DebugInfo/X86/parameters.ll
>  test/DebugInfo/X86/pr19307.ll
>  test/DebugInfo/X86/reference-argument.ll
>  test/DebugInfo/X86/sret.ll
>  test/DebugInfo/X86/vla.ll
>  test/DebugInfo/debug-info-qualifiers.ll
>  http://reviews.llvm.org/settings/panel/emailpreferences/
> <D6986.18199.patch>

More information about the llvm-commits mailing list