[all-commits] [llvm/llvm-project] 948235: [DebugInfo][SROA] Correct debug info for global va...
Alok Kumar Sharma via All-commits
all-commits at lists.llvm.org
Wed Mar 9 11:12:53 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 94823500a7288a61c6d68becf2cc82e853a80e52
https://github.com/llvm/llvm-project/commit/94823500a7288a61c6d68becf2cc82e853a80e52
Author: Alok Kumar Sharma <AlokKumar.Sharma at amd.com>
Date: 2022-03-10 (Thu, 10 Mar 2022)
Changed paths:
M llvm/lib/Transforms/IPO/GlobalOpt.cpp
A llvm/test/DebugInfo/X86/global-sra-struct-fit-segment.ll
Log Message:
-----------
[DebugInfo][SROA] Correct debug info for global variables in case of SROA
The existing handling produced crash for test case (attached with patch).
Now the function transferSRADebugInfo is modified to
- Ignore the current variable if it starts after the current Fragment.
- Ignore the current variable if it ends before the current Fragment.
- Generate (!DIExpression()) if current variable completely fits the
current Fragment.
- Otherwise (as earlier), generate the DW_OP_LLVM_fragment in IR if current
Fragment partially defines current variable.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D121107
More information about the All-commits
mailing list