diff options
author | Devang Patel <dpatel@apple.com> | 2009-04-13 18:13:16 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-04-13 18:13:16 +0000 |
commit | 0431504fb2ec74b7f45f6dfcee08a84a8a12c2b8 (patch) | |
tree | bf138ebd8070ba4c61a17b61a09e85e1a4c60021 /llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp | |
parent | f3d0dccfffd53334e1799fb4ddea4e74549f71dd (diff) | |
download | bcm5719-llvm-0431504fb2ec74b7f45f6dfcee08a84a8a12c2b8.tar.gz bcm5719-llvm-0431504fb2ec74b7f45f6dfcee08a84a8a12c2b8.zip |
Right now, Debugging information to encode scopes (DW_TAG_lexical_block) relies on DBG_LABEL. Unfortunately this intefers with the quality of optimized code.
This patch updates dwarf writer to encode scoping information in DWARF only in FastISel mode.
llvm-svn: 68973
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index c619bc57482..c4191e523ce 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -3296,7 +3296,7 @@ public: } /// ValidDebugInfo - Return true if V represents valid debug info value. - bool ValidDebugInfo(Value *V) { + bool ValidDebugInfo(Value *V, bool FastISel) { if (!V) return false; @@ -3335,6 +3335,11 @@ public: case DW_TAG_subprogram: assert(DISubprogram(GV).Verify() && "Invalid DebugInfo value"); break; + case DW_TAG_lexical_block: + /// FIXME. This interfers with the qualitfy of generated code when + /// during optimization. + if (FastISel == false) + return false; default: break; } @@ -4621,8 +4626,8 @@ void DwarfWriter::EndFunction(MachineFunction *MF) { } /// ValidDebugInfo - Return true if V represents valid debug info value. -bool DwarfWriter::ValidDebugInfo(Value *V) { - return DD && DD->ValidDebugInfo(V); +bool DwarfWriter::ValidDebugInfo(Value *V, bool FastISel) { + return DD && DD->ValidDebugInfo(V, FastISel); } /// RecordSourceLine - Records location information and associates it with a |