2 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3 # See https://llvm.org/LICENSE.txt for license information.
4 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 # Script for refreshing all defined SPIR-V ops using SPIR-V spec from the
12 current_file
="$(readlink -f "$0")"
13 current_dir
="$(dirname "$current_file")"
15 spirv_ir_include_dir
="${current_dir}/../../include/mlir/Dialect/SPIRV/IR/"
17 for file in "${spirv_ir_include_dir}"/*; do
18 file_name
="$(basename $file)"
19 if [[ $file_name == "SPIRVOps.td" ||
20 $file_name == "SPIRVCLOps.td" ||
21 $file_name == "SPIRVGLOps.td" ]]; then
24 if [[ $file_name =~ SPIRV.
*Ops.td
]]; then
25 echo "--- refreshing $file_name ---"
26 "${current_dir}/define_inst.sh" ${file_name} Op