[PATCH] D41762: [DWARF] Incorrect prologue end line record.

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 06:41:02 PST 2018


CarlosAlbertoEnciso added a comment.

Hi Adrian & Quentin,

For the below test

  extern int doSomething(int a,int *b);
  
  int foo(int a,int b)
  {
    int tmp4 = a;
    if (a < b) {
      int tmp = a;
      tmp4 = doSomething(0,&tmp);
    }
  
    return tmp4;
  }

that generates similar IR as the first test case from

  llvm/test/CodeGen/X86/x86-shrink-wrapping.ll

and generating only debug line table

  define i32 @_Z3fooii(i32 %a, i32 %b) !dbg !7 {
  entry:
    %tmp = alloca i32, align 4
    %cmp = icmp slt i32 %a, %b, !dbg !9
    br i1 %cmp, label %if.then, label %if.end, !dbg !10
  
  if.then:                                          ; preds = %entry
    store i32 %a, i32* %tmp, align 4, !dbg !11
    %call = call i32 @_Z11doSomethingiPi(i32 0, i32* %tmp), !dbg !12
    br label %if.end, !dbg !13
  
  if.end:                                           ; preds = %if.then, %entry
    %tmp4.0 = phi i32 [ %call, %if.then ], [ %a, %entry ]
    ret i32 %tmp4.0, !dbg !14
  }
  
  declare i32 @_Z11doSomethingiPi(i32, i32*)
  ...

The line records generated with '-enable-shrink-wrap=false/true' are the same.


https://reviews.llvm.org/D41762





More information about the llvm-commits mailing list