Skip to content

Conversation

aelovikov-intel
Copy link
Contributor

Before this changes we had regCGFunc implement the following dispatch logic:

auto Out = [](){if constexpr (Cond) ... else ...}();
// ...
   if constexpr (cond)
     impl1(Out)
   else
     impl2(Out)
 else
   if constexpr (cond)
     impl3(Out)
   else
     impl4(Out)

which means that the Out is very tightly coupled with particular "impl" used. As such, it makes sense to sink it down to its usage.

Before this changes we had regCGFunc implement the following dispatch
logic:

  ````
  auto Out = [](){if constexpr (Cond) ... else ...}();
  // ...
     if constexpr (cond)
       impl1(Out)
     else
       impl2(Out)
   else
     if constexpr (cond)
       impl3(Out)
     else
       impl4(Out)
  ````

which means that the `Out` is very tightly coupled with particular
"impl" used. As such, it makes sense to sink it down to its usage.
@aelovikov-intel
Copy link
Contributor Author

@intel/llvm-gatekeepers , this PR is ready.

@pvchupin pvchupin merged commit bc1b306 into intel:sycl Oct 28, 2022
@aelovikov-intel aelovikov-intel deleted the red-move-out branch November 8, 2022 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants