JonChesterfield wrote:

[inline-then-fold-variadics.cpp](https://github.com/llvm/llvm-project/pull/92850/commits/15061bfbc2dc06de5bac32628389386cadaa5632#diff-0a9893e04ae7e0a5692ad93dfb73d6efa992953f7e9eebb68c1a3f4acd457e1e)
 is the motivating example for optimisation - simple variadic functions are 
removed entirely. Variadic logging wrappers around vfprintf and similar are 
similarly inlined.

Wasm might choose to use a call to this to replace the backend handling, they 
should each build the same frame passed by pointer. That would help offset the 
increase in compiler complexity from this patch. AMDGPU has a requirement for 
variadic function lowering, at least sufficient for libc. It is much easier to 
debug in wasm or x64 than on the GPU so I'm hoping this can land as a target 
independent pass and not end up in a GPU backend.

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

Reply via email to