From: Jacob Lifshay Date: Tue, 15 Aug 2017 23:22:30 +0000 (-0700) Subject: allow multiple execution modes per entry point X-Git-Tag: gsoc-2017~48 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58231d2756592ba4be091cb9087237cb6e0ab8af;p=kazan.git allow multiple execution modes per entry point --- diff --git a/src/spirv_to_llvm/spirv_to_llvm.cpp b/src/spirv_to_llvm/spirv_to_llvm.cpp index d23c946..8ea497b 100644 --- a/src/spirv_to_llvm/spirv_to_llvm.cpp +++ b/src/spirv_to_llvm/spirv_to_llvm.cpp @@ -473,7 +473,7 @@ private: { Op_entry_point entry_point; std::size_t instruction_start_index; - util::optional execution_mode; + std::vector execution_modes; }; struct Name { @@ -2846,10 +2846,7 @@ void Spirv_to_llvm::handle_instruction_op_execution_mode(Op_execution_mode instr throw Parser_error(instruction_start_index, instruction_start_index, "entry point not defined in OpExecutionMode"); - if(state.op_entry_points.back().execution_mode) - throw Parser_error( - instruction_start_index, instruction_start_index, "execution mode already set"); - state.op_entry_points.back().execution_mode = std::move(instruction.mode); + state.op_entry_points.back().execution_modes.push_back(std::move(instruction.mode)); } }