search for: dbg

Displaying 20 results from an estimated 1692 matches for "dbg".

Did you mean: db
2009 Sep 24
3
[LLVMdev] Is line number in DbgStopPointInst in LLVM accurate?
Dear developers, When I try to map line numbers in source code back to LLVM basicblocks, I meet some problems: there is a source file with 1500 lines of code, but when I use BasicBlockPass to collect all DbgStopPoint instructions in this file, I can only get 500 lines of code. The source code and the collected results are both attached. Is there any way to map line numbers in source code back to an LLVM basicblock precisely? Can LLVM-2.6 do this? Thanks, Heming -------------- next part -...
2015 Sep 20
2
simplifycfg not happening?
...uble f(double *a) { for (int i = 0; i < 1000; i++) a[i] *= 2; for (int i = 0; i < 1000; i++) a[i] *= 2; return a[0] + a[1]; } ; Function Attrs: nounwind uwtable define double @"\01?f@@YANPEAN at Z"(double* nocapture %a) #1 { overflow.checked: br label %vector.body, !dbg !18 vector.body: ; preds = %vector.body, %overflow.checked %index = phi i64 [ 0, %overflow.checked ], [ %index.next.1, %vector.body ], !dbg !18 %0 = getelementptr inbounds double, double* %a, i64 %index, !dbg !19 %1 = bitcast double* %0 to <2 x double&...
2018 Jun 27
2
can debug info for coroutines be improved?
...locals bar = <optimized out> blah = <optimized out> _anon = 0x0 _anon = 368 _anon = 0x23a028 <global_fixed_allocator> _anon = <optimized out> (gdb) quit Here is the LLVM IR generated for the function in the coroutines case. You can see that it has full debug info and @llvm.dbg.declare just like in the "normal function" case. ; Function Attrs: nobuiltin noinline nounwind optnone define internal fastcc i8* @testAsyncSeq(%StackTrace* nonnull, %Allocator*, i16*) unnamed_addr #5 !dbg !1163 { Entry: %3 = alloca %"[]usize", align 8 %4 = alloca i8*, alig...
2013 Apr 26
0
[LLVMdev] 'LowerDbgDeclare' in Instruction combining affects scope information
...&& dv_sn){ r = -r;}   else if (d_sn) { d = -d; r = -r; }   else if (dv_sn) { d = -d; };     if (rm) { *rm = (signed int)r; }   return (signed int)d; } My observations for the generated .ll are (I am using llvm3.1): 1. Due to 'instruction combining' optimization which does 'LowerDbgDeclare' call, I get a lot of 'llvm.dbg.value' instruction for r inserted, which converts 'load with llvm.dbg.declare' to addition of llvm.dbg.value.  Is it ok to get such a behavior or I am wrong in my analysis? Please correct me.   2. I referred a link below, which talks of a p...
2012 Mar 02
2
[LLVMdev] Question on debug information
...str587 = internal constant [61 x i8] c"---- %3d tests completed. %d tests passed. %d tests FAILED.\0a\00" define void @check(i32* %result, i32* %expect, i32 %n) { L.entry: %tests_passed = alloca i32 %tests_failed = alloca i32 %i = alloca i32 call void @llvm.dbg.value (metadata !{i32* %result}, i64 0, metadata !9), !dbg !4 call void @llvm.dbg.value (metadata !{i32* %expect}, i64 0, metadata !10), !dbg !4 call void @llvm.dbg.value (metadata !{i32 %n}, i64 0, metadata !11), !dbg !4 call void @llvm.dbg.declare (metadata !{i32* %tests_p...
2018 Nov 23
2
is this a bug in an optimization pass?
...u" %Bar = type { i32, i32 } %"[]u8" = type { i8*, i64 } %StackTrace = type { i64, %"[]usize" } %"[]usize" = type { i64*, i64 } @0 = internal unnamed_addr constant %Bar { i32 3, i32 4 }, align 4 ; Function Attrs: nounwind readnone speculatable declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nobuiltin nounwind define void @entry() #2 !dbg !41 { Entry: %array = alloca [10 x %Bar], align 4 %x = alloca %Bar, align 4 %for_index = alloca i64, align 8 %0 = bitcast [10 x %Bar]* %array to i8*, !dbg !60 call void @llvm.memset...
2012 Mar 06
0
[LLVMdev] Question on debug information
...] c"---- %3d tests completed. %d > tests passed. %d tests FAILED.\0a\00" > define void @check(i32* %result, i32* %expect, i32 %n) { > L.entry: > %tests_passed = alloca i32 > %tests_failed = alloca i32 > %i = alloca i32 > call void @llvm.dbg.value (metadata !{i32* %result}, i64 0, > metadata !9), !dbg !4 > call void @llvm.dbg.value (metadata !{i32* %expect}, i64 0, > metadata !10), !dbg !4 > call void @llvm.dbg.value (metadata !{i32 %n}, i64 0, metadata > !11), !dbg !4 > call void @llvm.dbg.dec...
2010 Dec 08
0
[LLVMdev] Bad gcc versions
On Wed, 08 Dec 2010 12:09:27 -0600 greened at obbligato.org (David A. Greene) wrote: > Török Edwin <edwintorok at gmail.com> writes: > > > What are we left with then? Only 4.2 and 4.3? > > On SLES 10.1 at least. I think it is highly platform dependent. Also keep in mind that llvm-gcc uses the 4.2 unwinder, so if you are seeing EH failures maybe the EH info generated by
2012 Mar 06
2
[LLVMdev] Question on debug information
...x i8] c"---- %3d tests completed. %d tests passed. %d tests FAILED.\0a\00" > define void @check(i32* %result, i32* %expect, i32 %n) { > L.entry: > %tests_passed = alloca i32 > %tests_failed = alloca i32 > %i = alloca i32 > call void @llvm.dbg.value (metadata !{i32* %result}, i64 0, metadata !9), !dbg !4 > call void @llvm.dbg.value (metadata !{i32* %expect}, i64 0, metadata !10), !dbg !4 > call void @llvm.dbg.value (metadata !{i32 %n}, i64 0, metadata !11), !dbg !4 > call void @llvm.dbg.declare (metadata...
2010 Dec 08
2
[LLVMdev] Bad gcc versions
Török Edwin <edwintorok at gmail.com> writes: > What are we left with then? Only 4.2 and 4.3? On SLES 10.1 at least. I think it is highly platform dependent. > I only use 4.4 since a while, and it works fairly well. On what platform? > Are you sure it is not a bug in the regression tests themselves > (strict-aliasing bugs, etc.)? No, I'm not sure. > Which
2010 Dec 09
2
[LLVMdev] Bad gcc versions
...ucture writes something to the source directories or some common temp directory? That could confuse things when doing parallel build/test and would explain all these failures. When I don't run in parallel, things seem to work much better. -Dave [x86_64-off-dbg]: FAIL: Clang :: Driver/hello.c (1160 of 8402) [x86_64-off-dbg]: ******************** TEST 'Clang :: Driver/hello.c' FAILED ******************** [x86_64-off-dbg]: Script: [x86_64-off-dbg]: -- [x86_64-off-dbg]: /ptmp/dag/build.llvm.trunk.official.debug/x86_64-unknown-linux-gnu/Debug+Asserts/...
2018 Feb 26
0
problem with moveSpillUsesAfterCoroBegin
...y and then the LLVM IR): const std = @import("std"); export fn entry() void { const p = (async(std.debug.global_allocator) amain()) catch unreachable; cancel p; } async fn amain() error { return error.Failure; } ; Function Attrs: nobuiltin nounwind define void @entry() #0 !dbg !220 { Entry: %0 = alloca { i16, i8* }, align 8 %1 = alloca { i16, i8* }, align 8 %p = alloca i8*, align 8 %2 = getelementptr inbounds { i16, i8* }, { i16, i8* }* %0, i32 0, i32 0, !dbg !226 store i16 0, i16* %2, !dbg !226 %3 = call fastcc i8* @amain(%Allocator* getelementptr inbounds (...
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 = call fastcc float @ceil32(float %1) #8, !dbg !656 ret float %2, !dbg !657 } Test case:...
2017 Jun 19
2
LLVM behavior different depending on function symbol name
...m-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 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 = call fastcc float @ceil32(f...
2016 Jul 29
3
IR @llvm.dbg.value entries for variables when a phi node has been created
I have been investigating missing variables / incorrect variable values when debugging code compiled at -O1 (and above) and believe that I have tracked the issue down to the interaction of the generation of IR @llvm.dbg.value entries and phi nodes. I would welcome someone who is more familiar with the generation of debug information to help me determine if what I think is going wrong is correct and guidance on the best/correct way of fixing the issue. [I was using the ARM and AArch64 targets in my investigation,...
2017 Sep 18
5
Interleaved debug info on arm
...0 0 is_stmt 0x00000000000595c4 25 7 1 0 0 is_stmt <<< 0x00000000000595c8 26 7 1 0 0 is_stmt but the code only has 1 reference to line 25 and the references to line 22 all precede that: ; Function Attrs: uwtable define hidden void @ms_t1d_ConsoleApplication479.Program4_Testni32(i32) #0 !dbg !34 { %2 = alloca i32 store i32 %0, i32* %2 call void @llvm.dbg.declare(metadata i32* %2, metadata !61, metadata !19), !dbg !63 %3 = alloca double, !dbg !63 store double 0.000000e+00, double* %3, !dbg !63 %4 = alloca %WriteLineObject*, !dbg !63 store %WriteLineObject* null, %WriteLine...
2011 Dec 08
2
[LLVMdev] Implementing devirtualization
...}; int main() { A* a = new A(1); B* b = new B(2); int y = a->foo() + b->goo() + a->hoo() + b->hoo() + (*a + *b); delete a; delete b; return y; } Clang with -O4 -S -emit-llvm emits the following for main(): define i32 @main() { %1 = tail call noalias i8* @_Znwm(i64 16), !dbg !70 %2 = bitcast i8* %1 to %class.A*, !dbg !70 tail call void @llvm.dbg.value(metadata !{%class.A* %2}, i64 0, metadata !68) tail call void @llvm.dbg.value(metadata !71, i64 0, metadata !69) tail call void @llvm.dbg.value(metadata !{%class.A* %2}, i64 0, metadata !66) tail call void @llvm...
2012 Mar 07
0
[LLVMdev] Question on debug information
...leted. %d >> tests passed. %d tests FAILED.\0a\00" >> define void @check(i32* %result, i32* %expect, i32 %n) { >> L.entry: >> %tests_passed = alloca i32 >> %tests_failed = alloca i32 >> %i = alloca i32 >> call void @llvm.dbg.value (metadata !{i32* %result}, i64 0, >> metadata !9), !dbg !4 >> call void @llvm.dbg.value (metadata !{i32* %expect}, i64 0, >> metadata !10), !dbg !4 >> call void @llvm.dbg.value (metadata !{i32 %n}, i64 0, metadata >> !11), !dbg !4 >>...
2015 Sep 20
2
simplifycfg not happening?
...for (int i = 0; i < 1000; i++) >> a[i] *= 2; >> return a[0] + a[1]; >> } >> >> ; Function Attrs: nounwind uwtable >> define double @"\01?f@@YANPEAN at Z"(double* nocapture %a) #1 { >> overflow.checked: >> br label %vector.body, !dbg !18 >> >> vector.body: ; preds = %vector.body, >> %overflow.checked >> %index = phi i64 [ 0, %overflow.checked ], [ %index.next.1, >> %vector.body ], !dbg !18 >> %0 = getelementptr inbounds double, double* %a, i64 %index,...
2017 Jun 19
2
LLVM behavior different depending on function symbol name
...orrect from EarlyCSE to do that. -- Mehdi 2017-06-19 9:27 GMT-07:00 Andrew Kelley <superjoe30 at gmail.com>: > Oops. Pressed send on accident. > > With -O3, the module gets rewritten to: > ; Function Attrs: nobuiltin nounwind > define i1 @do_test() local_unnamed_addr #0 !dbg !16 { > Entry: > %x.sroa.0.i.i = alloca i32, align 4 > %x.sroa.0.i.i.i = alloca i32, align 4 > tail call void @llvm.dbg.value(metadata float 0.000000e+00, i64 0, > metadata !21, metadata !28) #3, !dbg !29 > tail call void @llvm.dbg.value(metadata float 0.000000e+00, i64 0,...