-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor logic of memory scopes, orders and flags translation
There are several OpenCL built-ins which accept cl_mem_fence_flags, memory_scope and memory_order arguments (like barriers, fences or atomics) and representation of that info is different between OpenCL and SPIR-V: different values for enumerations and bitmasks, different arguments for OpenCL built-ins and SPIR-V instructions. To avoid code duplication, refactored all common code for translation aforementioned entities into helper functions. Simplified interface of getOrCreateSwithFunc helper: `llvm::Module` argument is now infered from `InsertPoint` argument.
- Loading branch information
1 parent
c1ef179
commit 36ee939
Showing
6 changed files
with
208 additions
and
118 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
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
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
Oops, something went wrong.