3 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 # See https://llvm.org/LICENSE.txt for license information.
5 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 # Script for defining map for opname to opcode using SPIR-V spec from the
11 # ./define_opcode.sh (<op-name>)*
14 # ./define_opcode.sh OpTypeVoid OpTypeFunction
16 # If no op-name is specified, the existing opcodes are updated
18 # The 'instructions' list of spirv.core.grammar.json contains all instructions
23 current_file
="$(readlink -f "$0")"
24 current_dir
="$(dirname "$current_file")"
26 python3
${current_dir}/gen_spirv_dialect.py \
27 --base-td-path ${current_dir}/..
/..
/include
/mlir
/Dialect
/SPIRV
/IR
/SPIRVBase.td \