Skip to content

Conversation

MrSidims
Copy link
Contributor

Signed-off-by: Dmitry Sidorov dmitry.sidorov@intel.com

@MrSidims MrSidims requested a review from a team as a code owner March 26, 2021 14:10
Comment on lines 154 to 160
scope. When evaluating an aliasing query if two memory access instructions that
have _AliasScopeMaskINTEL_ and _NoAliasMaskINTEL_ memory operands or decorated
with _AliasScopeINTEL_ and _NoAliasINTEL_ decorations and if for some domain,
the set of scopes with that domain in one instruction’s aliasing scope list is a
subset of (or equal to) the set of scopes for that domain in another
instruction’s noalias list, then the two memory accesses are assumed not to
alias.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a pretty generic description of the overall mechanism/idea, should it be moved somewhere else, like overview?

Also,

if two memory access instructions that have AliasScopeMaskINTEL and NoAliasMaskINTEL memory operands

Does this spelling assume that those memory instructions have both of those operands at the same time? Or one has the first one and another the second one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have moved this text to overview and explicitly specify "Or one has the first one and another the second one?".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this spelling assume that those memory instructions have both of those operands at the same time? Or one has the first one and another the second one?

Yes, a single instruction can have both memory operands simultaneously in case if they have different scope, like

%var = OpLoad %type %ptr1 (noalias 1, alias 2)
OpStore %ptr2 %var (noalias 1)
OpStore %ptr3 %var (alias 2)



Optional <id> _Name_ parameter is used to specify an unique domain in global
scope. If this rule is violated in runtime - behaviour is undefined.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which rule?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved it to overview.

@MrSidims
Copy link
Contributor Author

Thanks for the suggestions! I'll apply them a bit later. For now I answer the most important one, that affects the actual implementation.

MrSidims added a commit to MrSidims/SPIRV-LLVM-Translator that referenced this pull request Mar 31, 2021
This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

This patch also casually adds OpDecorateId in the translator flow.
Spec: intel/llvm#3426

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
AlexeySotkin pushed a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Apr 8, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
vmaksimo pushed a commit to vmaksimo/llvm that referenced this pull request Apr 12, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@974749c
Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
@MrSidims MrSidims force-pushed the private/MrSidims/MemAccessDoc branch from c7cf02d to 2431e36 Compare April 13, 2021 09:41
@MrSidims
Copy link
Contributor Author

Resolved comments with a simple fix, answered others.

@bader bader added spec extension All issues/PRs related to extensions specifications SPIR-V Issues related to SPIRV-LLVM-Translator labels Apr 29, 2021
It should be a valid case if alias.scope and noalias mask/decoration
be applied to the same instruction.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
DmitryBushev pushed a commit to DmitryBushev/SPIRV-LLVM-Translator that referenced this pull request Aug 27, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
DmitryBushev pushed a commit to DmitryBushev/SPIRV-LLVM-Translator that referenced this pull request Aug 27, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
DmitryBushev pushed a commit to DmitryBushev/SPIRV-LLVM-Translator that referenced this pull request Aug 27, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
DmitryBushev pushed a commit to DmitryBushev/SPIRV-LLVM-Translator that referenced this pull request Aug 27, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 1, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 1, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 1, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
MrSidims added a commit to KhronosGroup/SPIRV-LLVM-Translator that referenced this pull request Sep 1, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
DmitryBushev pushed a commit to DmitryBushev/SPIRV-LLVM-Translator that referenced this pull request Sep 1, 2021
* Implement SPV_INTEL_memory_access_aliasing extension

This extension adds analogs of alias.scope and noalias metadata
in SPIR-V. These metadata is being used to annotate non-aliasing
memory accesses and being generated, for example, during inlining
of functions with restrict pointer parameters.

Spec: intel/llvm#3426

This patch also casually adds OpDecorateId in the translator flow.

Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
@MrSidims MrSidims changed the title Add extension doc for SPV_INTEL_memory_access_aliasing [SPIR-V][DOC]Add extension doc for SPV_INTEL_memory_access_aliasing Oct 13, 2021
@AlexeySotkin
Copy link
Contributor

@MrSidims any plans finishing this PR?

@MrSidims
Copy link
Contributor Author

@MrSidims any plans finishing this PR?

I was thinking, that everything is in place. Let me double check/resolve comments.

@MrSidims MrSidims requested a review from a team as a code owner January 24, 2022 10:31
DmitryBushev added a commit to DmitryBushev/SPIRV-Headers that referenced this pull request Feb 3, 2022
Modify headers to include declarations of tokens described
by this spec:

   intel/llvm#3426
NikitaRudenkoIntel pushed a commit to KhronosGroup/SPIRV-Headers that referenced this pull request Feb 8, 2022
Modify headers to include declarations of tokens described
by this spec:

   intel/llvm#3426
@github-actions github-actions bot added the Stale label Jul 24, 2022
@github-actions github-actions bot closed this Aug 23, 2022
@MrSidims MrSidims reopened this Aug 23, 2022
@github-actions github-actions bot closed this Sep 23, 2022
@MrSidims MrSidims reopened this Sep 23, 2022
This extension adds *AliasDomainDeclINTEL*, *AliasScopeINTEL* and
*AliasScopeListDeclINTEL* instructions that serve a purpose to
specify aliasing scopes within which annotated memory accesses don't alias.
Results of these instructios are used by *AliasScopeINTEL* and *NoAliasINTEL*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Results of these instructios are used by *AliasScopeINTEL* and *NoAliasINTEL*
Results of these instructions are used by *AliasScopeINTEL* and *NoAliasINTEL*

[width="40%",cols="25,25"]
|========================================
| Last Modified Date | 2021-02-15
| Revision | A
Copy link
Contributor Author

@MrSidims MrSidims Oct 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Revision | A
| Revision | 2

@github-actions github-actions bot closed this Nov 14, 2022
@MrSidims MrSidims reopened this Nov 17, 2022
@github-actions github-actions bot closed this Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec extension All issues/PRs related to extensions specifications SPIR-V Issues related to SPIRV-LLVM-Translator Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants