-
Notifications
You must be signed in to change notification settings - Fork 747
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] [ESIMD] Aggressively inline every function called by ESIMD ker…
…nel (#3261) This patch is created to overcome a current limitation of Intel GPU vector backend that requires kernel functions to be inlined into the kernel itself. I removed later inlining passes since AlwaysInline pass is supposed to inline everything that's possible.
- Loading branch information
1 parent
59ceaf4
commit 65b459d
Showing
3 changed files
with
51 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
; RUN: opt -LowerESIMD -S < %s | FileCheck %s | ||
|
||
; This test checks that LowerESIMD pass sets the 'alwaysinline' | ||
; attribute for all non-kernel functions. | ||
|
||
define spir_kernel void @EsimdKernel1() { | ||
; CHECK: @EsimdKernel1( | ||
; CHECK-NEXT: call void @foo() | ||
; CHECK-NEXT: call void @bar() | ||
call void @foo() | ||
call void @bar() | ||
ret void | ||
} | ||
|
||
define spir_kernel void @EsimdKernel2() { | ||
; CHECK: @EsimdKernel2( | ||
; CHECK-NEXT: call void @foobar() | ||
call void @foobar() | ||
ret void | ||
} | ||
|
||
define spir_func void @foo() { | ||
; CHECK: @foo() #[[ATTR:[0-9]+]] | ||
ret void | ||
} | ||
|
||
define spir_func void @bar() { | ||
; CHECK: @bar() #[[ATTR]] | ||
; CHECK-NEXT: call void @foobar | ||
call void @foobar() | ||
ret void | ||
} | ||
|
||
define spir_func void @foobar() { | ||
; CHECK: @foobar() #[[ATTR]] | ||
ret void | ||
} | ||
|
||
; CHECK: attributes #[[ATTR]] = { alwaysinline } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters