-
Notifications
You must be signed in to change notification settings - Fork 246
added missing implementation of getPassName for SPIRVLowerOCLBlocks #543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AlexeySachkov
merged 2 commits into
KhronosGroup:master
from
aparshin-intel:cosmetics_missing_pass_name
May 20, 2020
Merged
added missing implementation of getPassName for SPIRVLowerOCLBlocks #543
AlexeySachkov
merged 2 commits into
KhronosGroup:master
from
aparshin-intel:cosmetics_missing_pass_name
May 20, 2020
Conversation
This file contains hidden or 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
AlexeySachkov
approved these changes
May 20, 2020
svenvh
reviewed
May 20, 2020
Co-authored-by: Sven van Haastregt <[email protected]>
svenvh
approved these changes
May 20, 2020
zahiraam
pushed a commit
to zahiraam/SPIRV-LLVM-Translator
that referenced
this pull request
May 26, 2020
…roup#539) Enable strict rules to set ContractionOFF (KhronosGroup#521) This patch makes several improvements to enable correct setting for ContractionOFF: 1) Plain `fadd' or `fsub' instruction trigger ContractionOFF to avoid optimizations that may fold them to an FMA. 2) `contract' flag is recognized on `fadd' and `fsub', and it allows to suppress (1). 3) Undefined (external) functions, function pointers and inline asm calls force ContractionOFF flag. 4) Contraction information is now propagated up the call stack until an entry point. Signed-off-by: Andrew Savonichev <[email protected]> Add missing implementation of getPassName for SPIRVLowerOCLBlocks (KhronosGroup#543) [NFC] 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. Improve handling of OpMemoryBarrier Added support for non-constant 'Semantics' operand Clang, due to some ABI constraints needs to generate llvm.trap intrinsics. According to the LangRef documentation a trap instruction is lowered to a target's trap instruction or to an abort() function if the target doesn't have a trap instruction. SPIRV has neither a trap nor an abort instruction and no current opcode has the semantics of an abort/trap. Currently the IR to SPIRV translator is crashing when it finds an llvm.trap intrinsic. The solution will require some thoughts on the SPIRV side to decide how to implement an abort instruction. This patch changes the translator so it doesn't crash. This will be revised when a decision is taken. NOTE: clang could eventually not generate an llvm.trap instruction in the current case (non-base destructor of an abstract class needs to be emmitted) but keep in mind that clang might generate an llvm.trap intrinsic some other ways and we might stumble into this issue again. An alternative to this, could be to add an LLVM pass that will get rid of the llvm.trap intrisincs in the code before the SPIRV translator. But having the translator solve this issue is a preferred solution. The translator crashes when it find an llvm trap instruction. Clang, due to some ABI constraints needs to generate llvm.trap intrinsics. According to the LangRef documentation a trap instruction is lowered to a target's trap instruction or to an abort() function if the target doesn't have a trap instruction. SPIRV has neither a trap nor an abort instruction and no current opcode has the semantics of an abort/trap. Currently the IR to SPIRV translator is crashing when it finds an llvm.trap intrinsic. The solution will require some thoughts on the SPIRV side to decide how to implement an abort instruction. This patch changes the translator so it doesn't crash. This will be revised when a decision is taken. NOTE: clang could eventually not generate an llvm.trap instruction in the current case (non-base destructor of an abstract class needs to be emmitted) but keep in mind that clang might generate an llvm.trap intrinsic some other ways and we might stumble into this issue again. An alternative to this, could be to add an LLVM pass that will get rid of the llvm.trap intrisincs in the code before the SPIRV translator. But having the translator solve this issue is a preferred solution. Signed-off-by: Zahira Ammarguellat <[email protected]> The translator crashes when it find an llvm trap instruction. Clang, due to some ABI constraints needs to generate llvm.trap intrinsics. According to the LangRef documentation a trap instruction is lowered to a target's trap instruction or to an abort() function if the target doesn't have a trap instruction. SPIRV has neither a trap nor an abort instruction and no current opcode has the semantics of an abort/trap. Currently the IR to SPIRV translator is crashing when it finds an llvm.trap intrinsic. The solution will require some thoughts on the SPIRV side to decide how to implement an abort instruction. This patch changes the translator so it doesn't crash. This will be revised when a decision is taken. NOTE: clang could eventually not generate an llvm.trap instruction in the current case (non-base destructor of an abstract class needs to be emmitted) but keep in mind that clang might generate an llvm.trap intrinsic some other ways and we might stumble into this issue again. An alternative to this, could be to add an LLVM pass that will get rid of the llvm.trap intrisincs in the code before the SPIRV translator. But having the translator solve this issue is a preferred solution. Signed-off-by: Zahira Ammarguellat <[email protected]> Clang, due to some ABI constraints needs to generate llvm.trap intrinsics. According to the LangRef documentation a trap instruction is lowered to a target's trap instruction or to an abort() function if the target doesn't have a trap instruction. SPIRV has neither a trap nor an abort instruction and no current opcode has the semantics of an abort/trap. Currently the IR to SPIRV translator is crashing when it finds an llvm.trap intrinsic. The solution will require some thoughts on the SPIRV side to decide how to implement an abort instruction. This patch changes the translator so it doesn't crash. This will be revised when a decision is taken. NOTE: clang could eventually not generate an llvm.trap instruction in the current case (non-base destructor of an abstract class needs to be emmitted) but keep in mind that clang might generate an llvm.trap intrinsic some other ways and we might stumble into this issue again. An alternative to this, could be to add an LLVM pass that will get rid of the llvm.trap intrisincs in the code before the SPIRV translator. But having the translator solve this issue is a preferred solution.
AlexeySotkin
pushed a commit
that referenced
this pull request
Jun 26, 2020
Change-Id: I4292aa2126a11986958f15afd8dddfe73eaae249
AlexeySotkin
pushed a commit
that referenced
this pull request
Jul 8, 2020
AlexeySotkin
pushed a commit
that referenced
this pull request
Jul 17, 2020
AlexeySotkin
pushed a commit
that referenced
this pull request
Jul 17, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SPIRV Lower OCL blocks pass does not have getPassName implementation. This commit adds one