JonChesterfield added a comment.

In D156928#4562412 <https://reviews.llvm.org/D156928#4562412>, @yaxunl wrote:

> Some control variables are per-module. Clang cannot emit control variables 
> that have different values for different modules. Intrinsics should work 
> since it can take an argument as its value.

Sure it can. In the most limited case, we could exactly replace the variables 
imported from source IR in the device libs based on command line variables with 
the same globals with the same flags. That would be NFC except it would no 
longer matter if the devicertl source was present.

There's just also other better things to be done as well, like not burning ABI 
decisions in the front end, or not using magic variables at all. But it's 
definitely not necessary to write constants in IR files that encode the same 
information as the command line flag. That's a whole indirect no-op that 
doesn't need to be there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156928/new/

https://reviews.llvm.org/D156928

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to