AlexVlx wrote:

> I don't fully understand the background here, so bear with me. What stops us 
> from using the SPIR-V backend? Is that why we're setting up this pipeline in 
> clang instead of LLVM?

This is orthogonal to the BE - SPIR-V generation still goes through the BE, 
these would run before. There's two (and a half) reasons for not running these 
in the BE (I did have it like that before):

1. The BE is still on the OldPM, and a large portion of these have been ported 
to the NewPM,
   with the legacy variant removed;
   - (the half) It is painful to enable these in the BE, because it is 
difficult to pipe
     arguments / set `cl::opt`s with how we currently invoke the be, as the 
linker-wrapper
     either parses and sets them too early, or does not forward them at all; 
special casing
     `-mllvm` forwarding just for that seemed less than ideal;
2. These are target agnostic(-ish), and we have some more context (e.g. 
linguistic) here
   than we would when we reach the BE.

TL;DR, part of this pipeline could be set up in the SPIR-V BE, but it would be 
a bit ugly and ergonomics would be less than ideal.

https://github.com/llvm/llvm-project/pull/228188
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to