Name Strings

SPV_INTEL_unstructured_loop_controls

Contact

To report problems with this extension, please open a new issue at:

Contributors

  • Joe Garvey, Intel

  • Michael Kinsner, Intel

  • Ben Ashbaugh, Intel

  • Alexey Sotkin, Intel

Notice

Copyright (c) 2019 Intel Corporation. All rights reserved.

Status

Final draft

Version

Last Modified Date

2019-06-12

Revision

1

Dependencies

This extension is written against the SPIR-V Specification, Version 1.4 Revision 1.

This extension requires SPIR-V 1.0.

Overview

This extension introduces a new instruction that allows loop control parameters to be applied to unstructured loops. This instruction can be used in place of an OpLoopMerge on such loops. As both must be the second-to-last instruction in a loop header block, they can’t co-exist and there can’t be multiple instances of either in the same loop.

Extension Name

To use this extension within a SPIR-V module, the following OpExtension must be present in the module:

OpExtension "SPV_INTEL_unstructured_loop_controls"

New Capabilities

This extension introduces a new capability:

UnstructuredLoopControlsINTEL

New Instructions

Instructions added under the UnstructuredLoopControlsINTEL capability:

OpLoopControlINTEL

Token Number Assignments

UnstructuredLoopControlsINTEL

5886

OpLoopControlINTEL

5887

Modifications to the SPIR-V Specification, Version 1.4

Loop Control

In Section 3.23, Loop Control, add OpLoopControlINTEL to the set of instructions that can use Loop Controls:

Used by OpLoopMerge and OpLoopControlINTEL.

Capability

Modify Section 3.31, Capability, adding a row to the Capability table:

Capability Implicitly Declares

5886

UnstructuredLoopControlsINTEL

Instructions

In section 3.32.17, Control-Flow Instructions, add a new instruction, OpLoopControlINTEL, as follows:

OpLoopControlINTEL

Declare a loop.

This instruction must be in a block that is the target of a back edge and that block must dominate the back-edge block from which that edge originated.

This instruction must immediately precede either an OpBranch or OpBranchConditional instruction. That is, it must be the second-to-last instruction in its block.

Loop Control Parameters appear in Loop Control-table order for any Loop Control setting that requires such a parameter.

Capability: UnstructuredLoopControlsINTEL

2 + variable

5887

Loop Control

Literal, Literal, …​
Loop Control Parameters

Issues

None.

Revision History

Rev Date Author Changes

1

2019-06-12

Joe Garvey

Initial public release