[PATCH] D121107: [DebugInfo][SROA] Correct debug info for global variables in case of SROA
Alok Kumar Sharma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 8 21:04:59 PST 2022
alok added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:411
+
+ // Calculate the offset
+ if (Expr->getNumElements() == 2 &&
----------------
aprantl wrote:
> nit: can you end each sentence with a `.` for consistency?
Thanks. I'll do that.
================
Comment at: llvm/lib/Transforms/IPO/GlobalOpt.cpp:414
+ Expr->getElement(0) == dwarf::DW_OP_plus_uconst) {
+ CurVarOffset = 8 * Expr->getElement(1);
+ }
----------------
aprantl wrote:
> This hardcoded 8 looks suspicious. What is it derived from and why is it a constant?
This is byte to bit conversion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121107/new/
https://reviews.llvm.org/D121107
More information about the llvm-commits
mailing list