https://github.com/efriedma-quic commented:

I'm not really happy with the way the code is organized for "coerced" 
load/store involving scalable types.

At the point where we're analyzing the calling convention; we have a bunch of 
information: exactly what kind of coercion we're doing, whether the sizes 
match, whether there are any unusual types involved.  We're throwing away that 
information, and then trying to re-derive it later.

So I think:

- The target code should compute whether the sizes are guaranteed to match.  If 
they do, "coerced" load/store simplifies to just a plain load/store, and we can 
skip all these complicated computations involving the sizes of the 
source/destination.
- If some types need target-specific code to lower arguments, that should be 
its own ABIArgInfo::Kind, and the target-independent code should call into a 
target-specific implementation in clang/lib/CodeGen/Targets/RISCV.cpp.

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

Reply via email to