Displaying 20 results from an estimated 32 matches for "dilexicalblock".
2017 Jun 19
2
LLVM behavior different depending on function symbol name
...Definition: true, scopeLine: 46,
isOptimized: true, unit: !1, variables: !20)
!17 = !DIFile(filename: "test.zig", directory: "/home/andy/dev/zig/build")
!18 = !DISubroutineType(types: !19)
!19 = !{!15}
!20 = !{}
!21 = !DILocation(line: 47, column: 16, scope: !22)
!22 = distinct !DILexicalBlock(scope: !16, file: !17, line: 46, column: 29)
!23 = !DILocation(line: 47, column: 36, scope: !22)
!24 = !DILocation(line: 47, column: 27, scope: !22)
!25 = !DILocation(line: 47, column: 5, scope: !22)
!26 = distinct !DISubprogram(name: "__zig_panic", scope: !27, file: !27,
line: 7, type: !...
2017 Jun 19
2
LLVM behavior different depending on function symbol name
...it: !1, variables: !20)
>> !17 = !DIFile(filename: "test.zig", directory: "/home/andy/dev/zig/build")
>> !18 = !DISubroutineType(types: !19)
>> !19 = !{!15}
>> !20 = !{}
>> !21 = !DILocation(line: 47, column: 16, scope: !22)
>> !22 = distinct !DILexicalBlock(scope: !16, file: !17, line: 46, column:
>> 29)
>> !23 = !DILocation(line: 47, column: 36, scope: !22)
>> !24 = !DILocation(line: 47, column: 27, scope: !22)
>> !25 = !DILocation(line: 47, column: 5, scope: !22)
>> !26 = distinct !DISubprogram(name: "__zig_panic&q...
2017 Jun 19
4
LLVM behavior different depending on function symbol name
Greetings,
I have a Zig implementation of ceil which is emitted into LLVM IR like this:
; Function Attrs: nobuiltin nounwind
define internal fastcc float @ceil(float) unnamed_addr #3 !dbg !644 {
Entry:
%x = alloca float, align 4
store float %0, float* %x
call void @llvm.dbg.declare(metadata float* %x, metadata !649, metadata
!494), !dbg !651
%1 = load float, float* %x, !dbg !652
%2 =
2017 Sep 16
2
assertion triggered since update to llvm 5
...directory:
"/home/andy/dev/zig/build-llvm5-debug")
!18 = !DISubroutineType(types: !19)
!19 = !{!20}
!20 = !DIBasicType(name: "void", encoding: DW_ATE_unsigned)
!21 = !{!22}
!22 = !DILocalVariable(name: "bytes", scope: !23, file: !17, line: 2, type:
!24)
!23 = distinct !DILexicalBlock(scope: !16, file: !17, line: 1, column: 19)
!24 = !DICompositeType(tag: DW_TAG_structure_type, name: "[]u8", size: 128,
align: 64, elements: !25)
!25 = !{!26, !29}
!26 = !DIDerivedType(tag: DW_TAG_member, name: "ptr", scope: !24, baseType:
!27, size: 64, align: 64)
!27 = !DIDeri...
2017 Sep 17
2
assertion triggered since update to llvm 5
...t;> !18 = !DISubroutineType(types: !19)
>> !19 = !{!20}
>> !20 = !DIBasicType(name: "void", encoding: DW_ATE_unsigned)
>> !21 = !{!22}
>> !22 = !DILocalVariable(name: "bytes", scope: !23, file: !17, line: 2,
>> type: !24)
>> !23 = distinct !DILexicalBlock(scope: !16, file: !17, line: 1, column: 19)
>> !24 = !DICompositeType(tag: DW_TAG_structure_type, name: "[]u8", size:
>> 128, align: 64, elements: !25)
>> !25 = !{!26, !29}
>> !26 = !DIDerivedType(tag: DW_TAG_member, name: "ptr", scope: !24,
>> base...
2017 Oct 01
2
load with alignment of 1 crashes from being unaligned
...ze", size: 64, encoding: DW_ATE_unsigned)
!73 = !{!74}
!74 = !DILocalVariable(name: "msg", arg: 1, scope: !60, file: !61, line:
47, type: !66)
!75 = !DIExpression()
!76 = !DILocation(line: 47, column: 14, scope: !60)
!77 = !DILocation(line: 47, column: 45, scope: !78)
!78 = distinct !DILexicalBlock(scope: !79, file: !61, line: 47, column: 43)
!79 = distinct !DILexicalBlock(scope: !60, file: !61, line: 47, column: 14)
!80 = distinct !DISubprogram(name: "_start", scope: !53, file: !53, line:
15, type: !81, isLocal: false, isDefinition: true, scopeLine: 15,
isOptimized: false, unit: !1...
2017 Sep 17
4
assertion triggered since update to llvm 5
...gt;>> !19 = !{!20}
>>>> !20 = !DIBasicType(name: "void", encoding: DW_ATE_unsigned)
>>>> !21 = !{!22}
>>>> !22 = !DILocalVariable(name: "bytes", scope: !23, file: !17, line: 2,
>>>> type: !24)
>>>> !23 = distinct !DILexicalBlock(scope: !16, file: !17, line: 1, column:
>>>> 19)
>>>> !24 = !DICompositeType(tag: DW_TAG_structure_type, name: "[]u8", size:
>>>> 128, align: 64, elements: !25)
>>>> !25 = !{!26, !29}
>>>> !26 = !DIDerivedType(tag: DW_TAG_member,...
2017 Sep 17
2
assertion triggered since update to llvm 5
...!20}
>>>>> !20 = !DIBasicType(name: "void", encoding: DW_ATE_unsigned)
>>>>> !21 = !{!22}
>>>>> !22 = !DILocalVariable(name: "bytes", scope: !23, file: !17, line: 2,
>>>>> type: !24)
>>>>> !23 = distinct !DILexicalBlock(scope: !16, file: !17, line: 1, column:
>>>>> 19)
>>>>> !24 = !DICompositeType(tag: DW_TAG_structure_type, name: "[]u8", size:
>>>>> 128, align: 64, elements: !25)
>>>>> !25 = !{!26, !29}
>>>>> !26 = !DIDerivedType...
2011 Mar 07
1
[LLVMdev] DW_TAG_lexical_block structure in debug information
...metadata,;; Reference to context descriptor
i32, ;; Line number
i32 ;; Column number
}
However, looking at the generated metadata, there are 2 extra fields
not documented here. From the source code it appears to be a link to
the function holding the block, and a unique integer ID:
DILexicalBlock DIBuilder::createLexicalBlock(DIDescriptor Scope, DIFile File,
unsigned Line, unsigned Col) {
// Defeat MDNode uniqing for lexical blocks by using unique id.
static unsigned int unique_id = 0;
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::...
2017 Nov 15
2
workaround for debug info bug?
...usize", size: 64, encoding: DW_ATE_unsigned)
!17 = !{!18}
!18 = !DILocalVariable(name: "msg", arg: 1, scope: !4, file: !5, line: 10,
type: !10)
!19 = !DIExpression()
!20 = !DILocation(line: 10, column: 14, scope: !4)
!21 = !DILocation(line: 10, column: 45, scope: !22)
!22 = distinct !DILexicalBlock(scope: !23, file: !5, line: 10, column: 43)
!23 = distinct !DILexicalBlock(scope: !4, file: !5, line: 10, column: 14)
!24 = distinct !DISubprogram(name: "entry", scope: !5, file: !5, line: 6,
type: !25, isLocal: false, isDefinition: true, scopeLine: 6, isOptimized:
false, unit: !1, variab...
2011 May 01
0
[LLVMdev] DWARF not being generated for local variable, though MD looks right(?)
...e IR looks generally right. However, if I run dwarfdump on my object file, I'm not seeing any DIE information for the local variables. I'm wondering what might be going wrong along the way.
[...]
To follow up after some debugging and more digging, it turns out that I hadn't created a DILexicalBlock for my function and then the variables were getting silently dropped; I had assumed that the DISubprogram would be enough and that the DILexicalBlock was only necessary for inner scopes. With that, it all works swimmingly so far.
Thanks,
-matt
2012 Jan 19
2
[LLVMdev] context/scope of instruction
Hello,
I need to know how I get the LLVM::IDScope object of an instruction.
My program contains:
call void (...)* @commit(), !dbg !16
!16 = metadata !{i32 16, i32 5, metadata !8, null}
!8 = metadata !{i32 589835, metadata !4, i32 10, i32 1, metadata !2, i32 0} ; [ DW_TAG_lexical_block ]
LLVM::Instruction.hasMetadata() is 0
I got LLVM::Scope for variables over DIGlobalVariable.getContext()
2012 Jan 20
0
[LLVMdev] context/scope of instruction
...uction.
>
> My program contains:
> call void (...)* @commit(), !dbg !16
>
> !16 = metadata !{i32 16, i32 5, metadata !8, null}
>
> !8 = metadata !{i32 589835, metadata !4, i32 10, i32 1, metadata !2, i32 0} ; [ DW_TAG_lexical_block ]
>
!8 is DIScope here (actually it is DILexicalBlock, which is derived from DIScope).
-
Devang
2012 Jan 20
1
[LLVMdev] context/scope of instruction
...ains:
>> call void (...)* @commit(), !dbg !16
>>
>> !16 = metadata !{i32 16, i32 5, metadata !8, null}
>>
>> !8 = metadata !{i32 589835, metadata !4, i32 10, i32 1, metadata !2, i32 0} ; [ DW_TAG_lexical_block ]
>>
>
> !8 is DIScope here (actually it is DILexicalBlock, which is derived from DIScope).
I know. I am writing an LLVM pass and I do not know how I get a hand on the DIScope object.
Which method(s) of the LLVM C++ API do I have to call to get a pointer or reference (!8) to the LLVM::DIScope of an LLVM::Instruction?
Christian
2019 Feb 08
2
Scope for DILocalVariables describing parameters?
...IBuilder::createParameterVariable() that verify this. This resulted in
one test case, DebugInfo/X86/double-declare.ll, failing when running
check-all:
parameter requires subprogram scope
!7 = !DILocalVariable(name: "aRect", arg: 1, scope: !8, file: !1, line:
38, type: !11)
!8 = distinct !DILexicalBlock(scope: !9, file: !1, line: 38)
However, if I rerun the clang command mentioned in the referenced PR
(PR33157), the parameter's scope becomes the subprogram:
!68 = !DILocalVariable(name: "aRect", arg: 1, scope: !63, file: !5,
line: 27, type: !66
!63 = distinct !DISubprogram(name: &qu...
2012 Aug 21
1
[LLVMdev] Dwarf debug info misses while clang codegen
...w I can't get all information form
ir code . So I add some manual info as test data. After executing my pass, I can
find debug info metadata in my generated bitcode. Those metadata include
"DICompileUnit" , "DIFile", "DIVariable" ,"DISubprogram", "DILexicalBlock".
Just like
------------------------------------------------------------------------------
84 !0 = metadata !{i32 786449, i32 0, i32 4, metadata !"hello.cpp", metadata
!"/proj/mtk04456", metadata !"clang version", i1 true, i1 true, metadata
!"flag&quo...
2011 Apr 27
1
[LLVMdev] LLVM internal getDirectory() for LexicalBlock debug information returns filename?
...llvm/Analysis/DebugInfo.h, I see some exception code in
DISubProgram for LLVMDebugVersion7:
StringRef getDirectory() const {
if (getVersion() == llvm::LLVMDebugVersion7)
return getCompileUnit().getFilename();
return getFieldAs<DIFile>(6).getDirectory();
}
The DILexicalBlock code does not include such exceptions, but even if
I try to add such code, the result is still the filename iso
directory.
I am at a loss how to address this. Any help would be greatly appreciated!
Regards,
Martijn Rutten
2009 Dec 02
0
[LLVMdev] A few more source level debugging questions
...; <--- Code from
A:21 is copied at B:41
...
!31 = metadata !{i32 51, i32 0, metadata !3, null } ; <--- source
location in file B
!32 = metadata !{i32 21, i32 0, metadata !1, !31 } ; <--- Code from
A:21 is copied at C:51
[ Here !1, !2 and !3 may refer to appropriate DISubprogram or DILexicalBlock. ]
-
Devang
> Alternatively, passing
> in the compile unit makes sense, except that now there's no way to tell the
> IRBuilder about regions.
> Also, even though my code now assembles correctly, gdb gets very unhappy
> when I try to debug it - it prints
> "/build/buildd/...
2016 Mar 23
7
[RFC] Lazy-loading of debug info metadata
...h (still working on testcase update script logic I
believe (probably other details, don't let me oversell it)).
3. Create a special `METADATA_SUBPROGRAM_BLOCK` for each `DISubprogram`
in the global metadata block. Store the relevant `DISubprogram` and
all of the subprogram's `DILexicalBlock`s and `DILocalVariable`s.
The block can be lazy-loaded on an all-or-nothing basis.
In combination with (2), this addresses (a) and (b) in cases that
(1) doesn't catch. A lazy-loading module will only load the
subprogram blocks that get referenced.
(I have a basic design f...
2016 Mar 23
0
[RFC] Lazy-loading of debug info metadata
...case update script logic I
> believe (probably other details, don't let me oversell it)).
>
> 3. Create a special `METADATA_SUBPROGRAM_BLOCK` for each `DISubprogram`
> in the global metadata block. Store the relevant `DISubprogram` and
> all of the subprogram's `DILexicalBlock`s and `DILocalVariable`s.
> The block can be lazy-loaded on an all-or-nothing basis.
>
> In combination with (2), this addresses (a) and (b) in cases that
> (1) doesn't catch. A lazy-loading module will only load the
> subprogram blocks that get referenced.
>...