Skip to content

Commit 97c6b65

Browse files
authored
Merge pull request intel#64 from frasercrmck/replace-tgt-ext-tys-pass
[compiler] Add a pass to replace target extension types
2 parents 5d025d4 + e99f31b commit 97c6b65

File tree

1 file changed

+28
-0
lines changed
  • llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_pipeline/docs

1 file changed

+28
-0
lines changed

llvm/lib/SYCLNativeCPUUtils/compiler_passes/compiler_pipeline/docs/utils.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,6 +1084,34 @@ with a required sub-group size and checks whether the vectorizer was able to
10841084
satisfy that requirement. As such, it should be run after vectorization. A
10851085
compiler diagnostic is raised for each kernel for which this does not hold.
10861086

1087+
ReplaceTargetExtTysPass
1088+
-----------------------
1089+
1090+
The ``ReplaceTargetExtTysPass`` pass replaces certain `target extension types
1091+
<https://llvm.org/docs/LangRef.html#target-extension-type>`_ found in the
1092+
initial compiler IR. It replaces them with new types reported by the
1093+
``BuiltinInfo::getRemappedTargetExtTy`` analysis function. This is conceptually
1094+
replacing abstract and target-agnostic opaque types with concrete ones ready
1095+
for the target.
1096+
1097+
This pass can replace any of the following types:
1098+
1099+
* ``spirv.Image``
1100+
* ``spirv.Event``
1101+
* ``spirv.Sampler``
1102+
1103+
It replaces any of the above types across the module, replacing any functions
1104+
with any of these target extension types as function parameters or return types
1105+
*in-place*, i.e., with a new function with the updated function signature.
1106+
1107+
If the target's compiler backend is able to handle any of the above types
1108+
natively then the target **may** opt out of this process completely. Note
1109+
however that some aspects of the ComputeMux compiler **may** make assumptions
1110+
about some of the above types, such as the type of images passed to any of the
1111+
:doc:`/modules/builtins/libimg` functions. This means that in such a situation,
1112+
it may be required to skip other passes such as the
1113+
``compiler::ImageArgumentSubstitutionPass``.
1114+
10871115
Metadata Utilities
10881116
------------------
10891117

0 commit comments

Comments
 (0)