jmorse wrote:

There's precedent for splitting the debug-info into fragments early, we do 
something similar for C++ structured-bindings in SROA and a very similar 
process happens when the i128 argument is split up in instruction-selection.

Split-up locations become brittle to optimisations though: any 
source-expression that gets salvaged into a DIExpression can't be decomposed 
into two fragments, and we have to mark them optimised out. Any salvaging into 
DIExpression for an i128 will almost certainly fail when the value gets split 
up in isel. Plus I believe DWARF doesn't support values on the expression stack 
larger than the machine-address-size, but that's an assumption that can be bent.

Presumably the desire here is to improve the variable availability of 
parameters rather than fully supporting i128's through LLVM debug-info? If so, 
the least invasive approach may be to teach SROA to decompose into fragments 
similar to structured-bindings for the first variable location in the function. 
Or, passing an i128 instead works alright, I have no opinion on ABI matters.

(Paging @OCHyams as he worked on structured bindings; and @slinder1 as this is 
another scenario that might be easier with a typed expression stack)

https://github.com/llvm/llvm-project/pull/135230
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to