[PATCH] Add a new pass to compute DWARF path discriminators.
Diego Novillo
dnovillo at google.com
Tue Feb 4 12:21:33 PST 2014
Hi echristo,
DWARF discriminators are used to distinguish multiple control flow paths
on the same source location. When this happens, instructions across
basic block boundaries will share the same debug location.
This pass detects this situation and adds a new discriminator value to
one of the two instructions so that their debug location has a different
discriminator value.
Discriminators are associated with the lexical scope of the instruction.
This is then emitted to the object file in DwarfDebug::recordSourceLine.
NOTE: This still does not work fully. It ICEs the compiler in certain
cases and I don't think it's emitting discriminators everywhere
I need them. I mostly want to know if I'm on the right path.
http://llvm-reviews.chandlerc.com/D2691
Files:
include/llvm/DebugInfo.h
include/llvm/InitializePasses.h
include/llvm/Transforms/Scalar.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/IR/DebugInfo.cpp
lib/IR/LLVMContextImpl.h
lib/MC/MCObjectStreamer.cpp
lib/Transforms/Scalar/SampleProfile.cpp
lib/Transforms/Utils/AddDiscriminators.cpp
lib/Transforms/Utils/CMakeLists.txt
lib/Transforms/Utils/Utils.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2691.1.patch
Type: text/x-patch
Size: 12906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140204/001c965f/attachment.bin>
More information about the llvm-commits
mailing list