[PATCH] D58224: [DebugInfo] Adjust fragment offset for big endian targets when splitting alloca in SROA
Karl-Johan Karlsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 15 04:58:09 PST 2019
Ka-Ka added inline comments.
Comment at: lib/Transforms/Scalar/SROA.cpp:4279
+ Offset += std::max(AllocaSize, P.size() * SizeOfByte) - Size;
+ Fragments.push_back(Fragment(NewAI, Offset, Size));
> Since there are many places in the compiler where we create fragments, would it be an option to adapt the semantics of DW_OP_LLVM_fragment in a way that allows us to defer the special handling of big endian targets to AsmPrinter/DwarfExpression.cpp ?
> Or, if that doesn't work create an API for creating new fragments that force users to think about what to do on big-endian targets?
If I interpret you correctly you suggest to extend DW_OP_LLVM_fragment to hold additional information about the hole (the undescribed bits between this and the next fragment) that might follow the fragment. That would be a larger change, but it might be worth it.
CHANGES SINCE LAST ACTION
More information about the llvm-commits