brintos

brintos / llvm-project-archived public Read only

0
0
Text · 765 B · ca9d864 Raw
27 lines · bash
1#!/bin/bash2 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-exception6 7# Script for defining a new enum attr using SPIR-V spec from the Internet.8#9# Run as:10# ./define_enum.sh <enum-class-name>11#12# The 'operand_kinds' dict of spirv.core.grammar.json contains all supported13# SPIR-V enum classes.14#15# If <enum-class-name> is missing, this script updates existing ones.16 17set -e18 19new_enum=$120 21current_file="$(readlink -f "$0")"22current_dir="$(dirname "$current_file")"23 24python3 ${current_dir}/gen_spirv_dialect.py \25  --base-td-path ${current_dir}/../../include/mlir/Dialect/SPIRV/IR/SPIRVBase.td \26  --new-enum "${new_enum}"27