Displaying 20 results from an estimated 2000 matches similar to: "StripDeadDebugInfo for static inline functions."
2018 Jan 12
2
StripDeadDebugInfo for static inline functions.
Hi Paul,
Thanks for your response.
Let me actually post more details visualizing my case. Assuming that can
help.
so the IR before the opt tool is running is:
; Function Attrs: nounwind
define i16 @main() #0 !dbg !13 {
entry:
%retval = alloca i16, align 1
...
}
; Function Attrs: inlinehint nounwind
define internal void @delay(i16 %d) #4 !dbg !69 {
entry:
%d.addr = alloca i16,
2018 Jan 12
2
StripDeadDebugInfo for static inline functions.
Hi Arsen, we are beyond what I understand about how metadata operates. Maybe Adrian or David knows.
--paulr
From: Arsen Hakobyan [mailto:hakobyan.ars at gmail.com]
Sent: Friday, January 12, 2018 12:16 PM
To: Robinson, Paul
Cc: llvm-dev at lists.llvm.org; David Blaikie
Subject: Re: [llvm-dev] StripDeadDebugInfo for static inline functions.
Just one update:
the function causing the segmentation
2018 Jan 12
0
StripDeadDebugInfo for static inline functions.
I'm not as familiar with all the ins and outs of metadata as maybe I should be, but ultimately the inlined function should have a DWARF description contained within the description of the caller (which is why you're seeing the call to constructAbstractSubprogramScopeDIE). That suggests that the DISubprogram for the inlined function ought to remain, and its scope should be the
2018 Jan 12
0
StripDeadDebugInfo for static inline functions.
Just one update:
the function causing the segmentation fault is the following:
359 void DwarfDebug::constructAbstractSubprogramScopeDIE(LexicalScope
*Scope) {
360 assert(Scope && Scope->getScopeNode());
361 assert(Scope->isAbstractScope());
362 assert(!Scope->getInlinedAt());
363
364 const MDNode *SP = Scope->getScopeNode();
365
366
2018 Jan 14
0
StripDeadDebugInfo for static inline functions.
Thanks Paul,
Hi Adrian and David I would really appreciate any comments, thoughts
assumptions.
If additional information is needed please let me know.
Regards,
Arsen
On Sat, Jan 13, 2018 at 2:54 AM, Robinson, Paul <paul.robinson at sony.com>
wrote:
> Hi Arsen, we are beyond what I understand about how metadata operates.
> Maybe Adrian or David knows.
>
> --paulr
>
>
2018 Jan 15
1
StripDeadDebugInfo for static inline functions.
+ Adrian
+ David
Hi Arsen,
This sounds like a bug to me. Have you tried reproducing it on trunk? For instance, I see that the relation between DICompileUnit and DISubprogram was changed in the meantime (https://reviews.llvm.org/D19034 <https://reviews.llvm.org/D19034>).
If this no longer occurs on master you could bisect the compiler to find the commit(s) that fix this and consider
2017 Jun 15
4
CloneFunctionInto produces invalid debug info
Hi!
We are currently working on a science project and implemented a
FunctionPass that clones a function (more precisely a constructor of a
struct/class) and adds a parameter.
First, we create a new function with a new function type, which includes
the newly added parameter:
Function *NF = Function::Create(NewFTy, F.getLinkage(), F.getName() +
"Cloned", F.getParent());
and after
2017 Jun 15
3
CloneFunctionInto produces invalid debug info
Can you send me a patch with instructions to reproduce? I can take a look.
-- adrian
> On Jun 15, 2017, at 2:23 PM, Sergei Larin <slarin at codeaurora.org> wrote:
>
> Yes, it does for us. My tree is couple days off the tip, and I see it there.
>
> Sergei
>
> From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Keno Fischer via llvm-dev
> Sent:
2017 Jun 19
2
LLVM behavior different depending on function symbol name
On Mon, Jun 19, 2017 at 12:06 PM, Mehdi AMINI <joker.eph at gmail.com> wrote:
> Hi,
>
> 2017-06-19 8:45 GMT-07:00 Andrew Kelley via llvm-dev <
> llvm-dev at lists.llvm.org>:
>
>> Greetings,
>>
>> I have a Zig implementation of ceil which is emitted into LLVM IR like
>> this:
>>
>> ; Function Attrs: nobuiltin nounwind
>> define
2017 Jun 16
2
CloneFunctionInto produces invalid debug info
The if you are cloning into the same LLVM module the CU should not cloned. If don't mind sharing your code, I can try to help diagnose why the CU gets cloned... just send me a patch that applies to trunk and instructions.
-- adrian
> On Jun 16, 2017, at 1:54 PM, Sergei Larin <slarin at codeaurora.org> wrote:
>
> Sorry… It takes a pass that was not accepted for upstreaming….
2017 Jun 19
2
CloneFunctionInto produces invalid debug info
- old Keno
+current Keno
> On Jun 19, 2017, at 2:59 PM, Adrian Prantl <aprantl at apple.com> wrote:
>
> In your example the instructions in the cloned function have debug locations belonging to a different function, and the function itself is missing a DISubprogram metadata attachment.
>
>> (lldb) p OldFunc->dump()
>>
>> ; Function Attrs: nounwind optsize
2017 Oct 01
2
load with alignment of 1 crashes from being unaligned
Below is attached a full IR module that can reproduce this issue, but the
part to notice is this:
%Foo96Bits = type <{ i24, i24, i24, i24 }>
define internal fastcc i16 @main.0.1() unnamed_addr #2 !dbg !113 {
Entry:
%value = alloca %Foo96Bits, align 1
%b = alloca i24, align 4
%0 = bitcast %Foo96Bits* %value to i8*, !dbg !129
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* bitcast
2020 Apr 30
2
Mapping a retained DILocalVariable back to its Function
Hi all,
I'm dealing with LLVM's debug information metadata, and have run into
an interesting edge case.
Under normal circumstances, every `DILocalVariable` has a `User` in
the form of the `llvm.dbg.*` intrinsic that produced it. Knowing this,
I can go from `DILocalVariable` to `MetadataAsValue`, grab the users,
and end up at the corresponding instruction + function.
In some cases,
2017 Jun 20
2
CloneFunctionInto produces invalid debug info
I was just going to say: With well-formed debug info it should create a deep copy up until the DISubprogram, but no further. But because the DISubprogram linked to the Function is missing the special handling of the DISubprogram (that would prohibit cloning the DICompileUnit is side-stepped).
But then I remembered the discussion we had in
2019 Jan 19
2
What does "preds" mean in a .ll file?
Hi,
I see things like this. What does it mean? Is it documented somewhere? Thanks.
; preds = %for.body
https://llvm.org/docs/LangRef.html
; <label>:91: ; preds = %88
%92 = load i8**, i8*** @glob_complete_word.matches, align 8, !dbg !99798
%93 = load i32, i32* @glob_complete_word.ind, align 4, !dbg !99799
%94 = sext i32 %93 to i64, !dbg !99798
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 Jun 15
2
CloneFunctionInto produces invalid debug info
This all looks very similar to a bug in the cloning stuff I fixed recently,
so would be indeed good to know if this is still happening on master.
On Thu, Jun 15, 2017 at 2:23 PM, Adrian Prantl via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> If you are doing this work based off LLVM trunk, could you send me your
> patch to reproduce the problem?
>
> -- adrian
>
> On
2016 May 08
2
Debug info scope of explicit casting type does not seem correct
That happens because we create the subprogram below as a context to the “DW_TAG_typedef” that was created as a type to “DW_TAG_pointer_type” that was added to the retained type list because of the explicit cast to (T*).
This is the code that creates DW_TAG_subprogram:
DIE *DwarfUnit::getOrCreateSubprogramDIE(const DISubprogram *SP, bool Minimal) {
...
// DW_TAG_inlined_subroutine may refer
2016 Apr 30
2
Debug info scope of explicit casting type does not seem correct
Hi,
I am wondering if this behavior of creating debug info is correct.
A type in compile unit entry is pointing to a type under subprogram entry?!
This is the root cause of https://llvm.org/bugs/show_bug.cgi?id=27579
0x0000000b: DW_TAG_compile_unit [1] *
0x00000026: DW_TAG_pointer_type [2]
DW_AT_type [DW_FORM_ref4] (cu + 0x002c => {0x0000002c})
2018 Feb 02
2
Debug info error on bitcode inline modification
Hi,
I'm trying to inline function defined in another bitcode module via bitcode
modification.
I'm linking multiple bitcode modules, setting inline related attributes,
applying -always-inline pass, but then debug info error occurs.
It seems debug info metadata isn't properly updated on inlining. How can I
fix it?
I'm using LLVM 3.8.1 on OS X (On below example target is Android but