[llvm] [DebugInfo][LoopUnroll] Preserve DebugLocs on optimized cond branches (PR #110276)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 08:49:42 PDT 2024


dwblaikie wrote:

> 感謝補丁的提交!保留優化條件分支中的 DebugLocs 對於調試信息的完整性至關重要。我認為這個修復將極大改善循環展開過程中調試信息的跟蹤。
> 
> 不過,我有一個小建議:在無條件分支上保留原始條件分支的 DebugLocs 是正確的,但也許我們可以考慮在生成這些優化時增加更多調試日誌或註釋,以便開發者更直觀地理解這一優化過程。如果有可能,是否可以在文檔中也補充一些關於此修復對調試工具鏈影響的描述?
> 
> 總體來說,這個補丁在保持源代碼可追蹤性方面非常有幫助,期待看到它的更多應用!

Thanks for contributing your feedback on this patch! Though the LLVM community uses English in shared spaces like this (there's some regional/language-specific parts of the LLVM discourse, though!) - could you use English here in the future?

Here's Google Translate's attempt at translating the above:

> Thanks for submitting the patch! Preserving DebugLocs in optimization condition branches is critical for the integrity of debugging information. I think this fix will greatly improve the tracing of debug information during loop unrolling.
> 
> However, I have a small suggestion: it is correct to keep the DebugLocs of the original conditional branch on the unconditional branch, but maybe we can consider adding more debug logs or comments when generating these optimizations so that developers can understand this optimization more intuitively process. If possible, could you also add some description in the documentation about the impact of this fix on the debugging toolchain?
> 
> Overall, this patch has been very helpful in maintaining source code traceability, and I look forward to seeing more applications of it!


https://github.com/llvm/llvm-project/pull/110276


More information about the llvm-commits mailing list