<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 26, 2009, at 3:47 PM, Devang Patel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 26, 2009, at 3:34 PM, Evan Cheng wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 26, 2009, at 1:57 PM, Devang Patel wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div><br></div>Why not use SourceLineInfo directly instead of introducing DebugLocTuple ? </div></div></blockquote><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div><div>//===----------------------------------------------------------------------===//                 </div><div>/// SourceLineInfo - This class is used to record source line correspondence.                    </div><div>///                                                                                              </div><div>class SourceLineInfo {</div><div>  unsigned Line;                        // Source line number.                                   </div><div>  unsigned Column;                      // Source column.                                        </div><div>  unsigned SourceID;                    // Source ID number.                                     </div><div>  unsigned LabelID;                     // Label in code ID number.                              </div><div>public</div><div>...</div><div><br></div><div>SourceLineInfo is managed using UniqueVector in DwarfWriter. Is there a known reason to use DenseMap ? I'm just curious<span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: 13px; white-space: pre; "><span class="Apple-style-span" style="font-family: Verdana; font-size: 11px; white-space: normal; ">. </span></span></div></div></div></blockquote><div><br></div><div><br></div><div>Is there a way to look up the id given line, column, sourceid? It looks like DwarfWrite is just keeping a list of source lines so it can be dumped out at the end. </div></div></div></blockquote><div><br></div>It does not need to query, so no it does not have a way to look up the id given line, column, sourceid. It has a way to look up sourceid based on file name and directory, which can be reused.</div></div></blockquote><div><br></div>It is.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>There are obvious duplicates we need to get rid. </div></div></div></blockquote><div><br></div><div>Now, SourceLineInfo is nearly identical to newly added DebugLocTuple.</div></div></div></blockquote><div><br></div>Yes, stuff in MachineModuleInfo should be eliminated or moved elsewhere.</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>I don't particularly care the way we use DwarfWriter to track debug info. It should be used to print dwarf, not managing debug info like it's doing right now.</div></div></div></blockquote><div><br></div>I am not sure I understand here. AFAIU, DwarfWriter's DwarfDebug does not try to manage debug info. </div></div></blockquote><div><br></div>There are basically 2 parts of debug info (in codegen). There is the actually dwarf writing, which obviously DwarfWriter should do. Then there is code that validate debug info (e.g. ValidDebugInfo), track file name to id mapping, map labels, etc. Some of it is in dwarf writer, some in machine module info. These probably should go to a separate class. Then we can merge DebugLoc in it. Does that make sense?</div><div><br></div><div>Evan<br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>-</div><div>Devang</div></div>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote></div><br></body></html>