https://bugs.llvm.org/show_bug.cgi?id=34136

            Bug ID: 34136
           Summary: Improve optimized debug info for escaped variables
                    that live in memory
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedb...@nondot.org
          Reporter: r...@google.com
                CC: llvm-bugs@lists.llvm.org

Consider:

int getint(void);
void alias(char *);
void crash(void);
void f() {
  int x = getint();
  int y = getint();
  int z = getint();
  alias((char*)&x);
  alias((char*)&y);
  alias((char*)&z);
  crash();
}

InstCombine runs LowerDbgDeclares on this code, and we end up with very poor
debug info. We basically say that x, y, and z live in EAX after each call to
getint, and they are immediately clobbered, never to be available again.

Those casts to char* also prevent the transform from adding more dbg.values
that would extend the range.

This was reduced from http://crbug.com/753934

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to