[SYCL] Avoid redundant deep device type checks - #23062
Conversation
Skip types that cannot contain zero-length arrays, use an inline visited set, and cache successfully validated complete record definitions. This reduces temporary allocations from repeated SYCL type validation while preserving diagnostics for invalid and incomplete records. Assisted-by: GPT-5.6 Terra <noreply@openai.com>
|
This change reduces the number of memory allocation calls in the frontend by ~8%, when compiling a simple SYCL free function kernel test case for device. |
tahonermann
left a comment
There was a problem hiding this comment.
A couple of comments. I think the CanonicalDeclPtr change is worth making. There is another bit of code that I'm confused by.
…non-canonical declarations
tahonermann
left a comment
There was a problem hiding this comment.
I think this looks fine. I added one suggestion that might help to avoid spending time on dependent types; I think deepTypeCheckForDevice() shouldn't be called on dependent types in the first place so the new added check for a dependent type is surprising to me.
|
@intel/llvm-gatekeepers , PR is all approved and green. Please, merge. |
Skip types that cannot contain zero-length arrays, use an inline visited
set, and cache successfully validated complete record definitions. This
reduces temporary allocations from repeated SYCL type validation while
preserving diagnostics for invalid and incomplete records.
Assisted-by: GPT-5.6 Terra noreply@openai.com