[libclc] [libclc] only check filename part of the source for avoiding duplication (PR #135710)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 21 02:01:25 PDT 2025


frasercrmck wrote:

I don't mind this.

Given the current naming scheme, files are named after specific builtins so you're unlikely to want to include two `cos.cl`, for instance. I don't think the directory name is or should be significant in deciding what to override. I suppose you could currently have `fp32/cos.cl` and `fp16/cos.cl` whereas this change would prevent that. You could just have `cos_fp32.cl` and `cos_fp16.cl`, of course.

I would like to further investigate weak linkage as another means of overriding specific builtins down to a finer granularity. That approach might warrant another method of file discovery.

https://github.com/llvm/llvm-project/pull/135710


More information about the cfe-commits mailing list