[PATCH] Consider the frame base isn't moving in calculateDbgValueHistory.

Frederic Riss friss at apple.com
Tue Sep 16 05:29:58 PDT 2014


Hi echristo, dblaikie, samsonov, aprantl,

This is a pragmatic hack to allow calculateDbgValueHistory to do its job
in the presence of call instructions clobbering the stack pointer register.
FrameIndex references have been removed when we arrive in
calculateDbgValueHistory, but the MachineFrameInfo is still there and contains
the information that helped build the frame. The only information that interests
us is the register used as frame base for the current function (which might
vary from function to function btw). We can consider that the frame base won't
ever be really clobbered during a function's lifetime.
We thus interrogate the MFI about the location of a (random) valid stack object
and remove the base register used to address it from the set of changing
registers for the function.
This patch makes debugging ASAN instrumented code without optimizations
possible (the added testcase uses ASAN instumented code).

Fixes <rdar://17904418>

http://reviews.llvm.org/D5366

Files:
  lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp
  test/DebugInfo/X86/asan.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5366.13743.patch
Type: text/x-patch
Size: 44634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140916/18c700e0/attachment.bin>


More information about the llvm-commits mailing list