[PATCH] D108787: [CUDA] Pass ExecConfig through BuildCallToMemberFunction

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 14 10:15:10 PDT 2021


tra added a comment.

In D108787#2999943 <https://reviews.llvm.org/D108787#2999943>, @yaxunl wrote:

> I am concerned that there may be more places which need handling, and passing exec config expr by function arguments may not scale. 
> Is it possible to represent the kernel call expr by a derived class of call expr and add the exec config expr as member to it?

I don't think it's worth it.

This config pass-through code has been around from the very early days of attempting to implement CUDA and we're already passing it around during call resolution.
AFAICT, this particular place was a relatively new addition which didn't implement the pass-through of the config.

While there may be other places where a similar issue may happen in the future (or exists as a corner case we didn't find yet), it/when we run into it, it will be diagnosed, as it was in this case.
It took us few years until we ran into this one. I'm pretty sure that this particular code path is pretty rare and  the patch is not going to have a measurable impact on compiler performance.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108787



More information about the cfe-commits mailing list