2 * Copyright 2017 Jacob Lifshay
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in all
12 * copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 #include "spirv_to_llvm.h"
24 #include "util/optional.h"
25 #include "util/variant.h"
26 #include "util/enum.h"
33 namespace spirv_to_llvm
35 using namespace spirv
;
39 constexpr bool is_power_of_2(std::uint64_t v
) noexcept
41 return (v
& (v
- 1)) == 0 && v
!= 0;
44 constexpr std::size_t get_padding_size(std::size_t current_position
,
45 std::size_t needed_alignment
) noexcept
47 assert(is_power_of_2(needed_alignment
));
48 return -current_position
& (needed_alignment
- 1);
52 void Struct_type_descriptor::complete_type()
54 for(auto &decoration
: decorations
)
56 switch(decoration
.value
)
58 case Decoration::relaxed_precision
:
59 #warning finish implementing Decoration::relaxed_precision
61 case Decoration::spec_id
:
62 #warning finish implementing Decoration::spec_id
64 case Decoration::block
:
65 #warning finish implementing Decoration::block
67 case Decoration::buffer_block
:
68 #warning finish implementing Decoration::buffer_block
70 case Decoration::row_major
:
71 #warning finish implementing Decoration::row_major
73 case Decoration::col_major
:
74 #warning finish implementing Decoration::col_major
76 case Decoration::array_stride
:
77 #warning finish implementing Decoration::array_stride
79 case Decoration::matrix_stride
:
80 #warning finish implementing Decoration::matrix_stride
82 case Decoration::glsl_shared
:
83 #warning finish implementing Decoration::glsl_shared
85 case Decoration::glsl_packed
:
86 #warning finish implementing Decoration::glsl_packed
88 case Decoration::c_packed
:
89 #warning finish implementing Decoration::c_packed
91 case Decoration::built_in
:
92 #warning finish implementing Decoration::built_in
94 case Decoration::no_perspective
:
95 #warning finish implementing Decoration::no_perspective
97 case Decoration::flat
:
98 #warning finish implementing Decoration::flat
100 case Decoration::patch
:
101 #warning finish implementing Decoration::patch
103 case Decoration::centroid
:
104 #warning finish implementing Decoration::centroid
106 case Decoration::sample
:
107 #warning finish implementing Decoration::sample
109 case Decoration::invariant
:
110 #warning finish implementing Decoration::invariant
112 case Decoration::restrict
:
113 #warning finish implementing Decoration::restrict
115 case Decoration::aliased
:
116 #warning finish implementing Decoration::aliased
118 case Decoration::volatile_
:
119 #warning finish implementing Decoration::volatile_
121 case Decoration::constant
:
122 #warning finish implementing Decoration::constant
124 case Decoration::coherent
:
125 #warning finish implementing Decoration::coherent
127 case Decoration::non_writable
:
128 #warning finish implementing Decoration::non_writable
130 case Decoration::non_readable
:
131 #warning finish implementing Decoration::non_readable
133 case Decoration::uniform
:
134 #warning finish implementing Decoration::uniform
136 case Decoration::saturated_conversion
:
137 #warning finish implementing Decoration::saturated_conversion
139 case Decoration::stream
:
140 #warning finish implementing Decoration::stream
142 case Decoration::location
:
143 #warning finish implementing Decoration::location
145 case Decoration::component
:
146 #warning finish implementing Decoration::component
148 case Decoration::index
:
149 #warning finish implementing Decoration::index
151 case Decoration::binding
:
152 #warning finish implementing Decoration::binding
154 case Decoration::descriptor_set
:
155 #warning finish implementing Decoration::descriptor_set
157 case Decoration::offset
:
158 #warning finish implementing Decoration::offset
160 case Decoration::xfb_buffer
:
161 #warning finish implementing Decoration::xfb_buffer
163 case Decoration::xfb_stride
:
164 #warning finish implementing Decoration::xfb_stride
166 case Decoration::func_param_attr
:
167 #warning finish implementing Decoration::func_param_attr
169 case Decoration::fp_rounding_mode
:
170 #warning finish implementing Decoration::fp_rounding_mode
172 case Decoration::fp_fast_math_mode
:
173 #warning finish implementing Decoration::fp_fast_math_mode
175 case Decoration::linkage_attributes
:
176 #warning finish implementing Decoration::linkage_attributes
178 case Decoration::no_contraction
:
179 #warning finish implementing Decoration::no_contraction
181 case Decoration::input_attachment_index
:
182 #warning finish implementing Decoration::input_attachment_index
184 case Decoration::alignment
:
185 #warning finish implementing Decoration::alignment
187 case Decoration::max_byte_offset
:
188 #warning finish implementing Decoration::max_byte_offset
190 case Decoration::alignment_id
:
191 #warning finish implementing Decoration::alignment_id
193 case Decoration::max_byte_offset_id
:
194 #warning finish implementing Decoration::max_byte_offset_id
196 case Decoration::override_coverage_nv
:
197 #warning finish implementing Decoration::override_coverage_nv
199 case Decoration::passthrough_nv
:
200 #warning finish implementing Decoration::passthrough_nv
202 case Decoration::viewport_relative_nv
:
203 #warning finish implementing Decoration::viewport_relative_nv
205 case Decoration::secondary_viewport_relative_nv
:
206 #warning finish implementing Decoration::secondary_viewport_relative_nv
209 throw Parser_error(instruction_start_index
,
210 instruction_start_index
,
211 "unimplemented decoration on OpTypeStruct: "
212 + std::string(get_enumerant_name(decoration
.value
)));
214 struct Member_descriptor
216 std::size_t alignment
;
219 explicit Member_descriptor(std::size_t alignment
,
221 ::LLVMTypeRef type
) noexcept
: alignment(alignment
),
227 std::vector
<Member_descriptor
> member_descriptors
;
228 member_descriptors
.reserve(members
.size());
229 std::size_t total_alignment
= 1;
230 for(auto &member
: members
)
232 for(auto &decoration
: member
.decorations
)
234 switch(decoration
.value
)
236 case Decoration::relaxed_precision
:
237 #warning finish implementing Decoration::relaxed_precision
239 case Decoration::spec_id
:
240 #warning finish implementing Decoration::spec_id
242 case Decoration::block
:
243 #warning finish implementing Decoration::block
245 case Decoration::buffer_block
:
246 #warning finish implementing Decoration::buffer_block
248 case Decoration::row_major
:
249 #warning finish implementing Decoration::row_major
251 case Decoration::col_major
:
252 #warning finish implementing Decoration::col_major
254 case Decoration::array_stride
:
255 #warning finish implementing Decoration::array_stride
257 case Decoration::matrix_stride
:
258 #warning finish implementing Decoration::matrix_stride
260 case Decoration::glsl_shared
:
261 #warning finish implementing Decoration::glsl_shared
263 case Decoration::glsl_packed
:
264 #warning finish implementing Decoration::glsl_packed
266 case Decoration::c_packed
:
267 #warning finish implementing Decoration::c_packed
269 case Decoration::built_in
:
270 #warning finish implementing Decoration::built_in
272 case Decoration::no_perspective
:
273 #warning finish implementing Decoration::no_perspective
275 case Decoration::flat
:
276 #warning finish implementing Decoration::flat
278 case Decoration::patch
:
279 #warning finish implementing Decoration::patch
281 case Decoration::centroid
:
282 #warning finish implementing Decoration::centroid
284 case Decoration::sample
:
285 #warning finish implementing Decoration::sample
287 case Decoration::invariant
:
288 #warning finish implementing Decoration::invariant
290 case Decoration::restrict
:
291 #warning finish implementing Decoration::restrict
293 case Decoration::aliased
:
294 #warning finish implementing Decoration::aliased
296 case Decoration::volatile_
:
297 #warning finish implementing Decoration::volatile_
299 case Decoration::constant
:
300 #warning finish implementing Decoration::constant
302 case Decoration::coherent
:
303 #warning finish implementing Decoration::coherent
305 case Decoration::non_writable
:
306 #warning finish implementing Decoration::non_writable
308 case Decoration::non_readable
:
309 #warning finish implementing Decoration::non_readable
311 case Decoration::uniform
:
312 #warning finish implementing Decoration::uniform
314 case Decoration::saturated_conversion
:
315 #warning finish implementing Decoration::saturated_conversion
317 case Decoration::stream
:
318 #warning finish implementing Decoration::stream
320 case Decoration::location
:
322 case Decoration::component
:
323 #warning finish implementing Decoration::component
325 case Decoration::index
:
326 #warning finish implementing Decoration::index
328 case Decoration::binding
:
329 #warning finish implementing Decoration::binding
331 case Decoration::descriptor_set
:
332 #warning finish implementing Decoration::descriptor_set
334 case Decoration::offset
:
335 #warning finish implementing Decoration::offset
337 case Decoration::xfb_buffer
:
338 #warning finish implementing Decoration::xfb_buffer
340 case Decoration::xfb_stride
:
341 #warning finish implementing Decoration::xfb_stride
343 case Decoration::func_param_attr
:
344 #warning finish implementing Decoration::func_param_attr
346 case Decoration::fp_rounding_mode
:
347 #warning finish implementing Decoration::fp_rounding_mode
349 case Decoration::fp_fast_math_mode
:
350 #warning finish implementing Decoration::fp_fast_math_mode
352 case Decoration::linkage_attributes
:
353 #warning finish implementing Decoration::linkage_attributes
355 case Decoration::no_contraction
:
356 #warning finish implementing Decoration::no_contraction
358 case Decoration::input_attachment_index
:
359 #warning finish implementing Decoration::input_attachment_index
361 case Decoration::alignment
:
362 #warning finish implementing Decoration::alignment
364 case Decoration::max_byte_offset
:
365 #warning finish implementing Decoration::max_byte_offset
367 case Decoration::alignment_id
:
368 #warning finish implementing Decoration::alignment_id
370 case Decoration::max_byte_offset_id
:
371 #warning finish implementing Decoration::max_byte_offset_id
373 case Decoration::override_coverage_nv
:
374 #warning finish implementing Decoration::override_coverage_nv
376 case Decoration::passthrough_nv
:
377 #warning finish implementing Decoration::passthrough_nv
379 case Decoration::viewport_relative_nv
:
380 #warning finish implementing Decoration::viewport_relative_nv
382 case Decoration::secondary_viewport_relative_nv
:
383 #warning finish implementing Decoration::secondary_viewport_relative_nv
386 throw Parser_error(instruction_start_index
,
387 instruction_start_index
,
388 "unimplemented member decoration on OpTypeStruct: "
389 + std::string(get_enumerant_name(decoration
.value
)));
391 auto member_type
= member
.type
->get_or_make_type();
392 if(::LLVMGetTypeKind(member_type
.type
) == ::LLVMStructTypeKind
393 && ::LLVMIsOpaqueStruct(member_type
.type
))
395 if(dynamic_cast<const Struct_type_descriptor
*>(member
.type
.get()))
396 throw Parser_error(instruction_start_index
,
397 instruction_start_index
,
398 "recursive struct has infinite size");
399 throw Parser_error(instruction_start_index
,
400 instruction_start_index
,
401 "struct can't have opaque struct members");
403 assert(is_power_of_2(member_type
.alignment
));
404 std::size_t size
= ::LLVMABISizeOfType(target_data
, member_type
.type
);
405 if(member_type
.alignment
> total_alignment
)
406 total_alignment
= member_type
.alignment
;
407 member_descriptors
.push_back(
408 Member_descriptor(member_type
.alignment
, size
, member_type
.type
));
410 assert(member_descriptors
.size() == members
.size());
411 assert(is_power_of_2(total_alignment
));
412 std::size_t current_offset
= 0;
413 std::vector
<::LLVMTypeRef
> member_types
;
414 member_types
.reserve(members
.size() * 2);
417 for(std::size_t member_index
= 0; member_index
< members
.size(); member_index
++)
419 members
[member_index
].llvm_member_index
= member_types
.size();
420 #warning finish Struct_type_descriptor::complete_type
421 member_types
.push_back(member_descriptors
[member_index
].type
);
422 current_offset
+= member_descriptors
[member_index
].size
;
423 std::size_t next_alignment
= member_index
+ 1 < members
.size() ?
424 member_descriptors
[member_index
+ 1].alignment
:
426 auto padding_size
= get_padding_size(current_offset
, next_alignment
);
427 if(padding_size
!= 0)
429 member_types
.push_back(
430 ::LLVMArrayType(::LLVMInt8TypeInContext(context
), padding_size
));
431 current_offset
+= padding_size
;
437 member_types
.push_back(::LLVMInt8TypeInContext(context
)); // so it isn't empty
439 constexpr bool is_packed
= true;
440 ::LLVMStructSetBody(type
.type
, member_types
.data(), member_types
.size(), is_packed
);
441 type
.alignment
= total_alignment
;
453 vulkan_cpu_util_generate_enum_traits(Stage
, Stage::calculate_types
, Stage::generate_code
);
455 static_assert(util::Enum_traits
<Stage
>::is_compact
, "");
458 class Spirv_to_llvm
: public Parser_callbacks
460 Spirv_to_llvm(const Spirv_to_llvm
&) = delete;
461 Spirv_to_llvm
&operator=(const Spirv_to_llvm
&) = delete;
464 struct Op_string_state
466 Literal_string value
;
468 struct Op_ext_inst_import_state
471 struct Op_entry_point_state
473 Op_entry_point entry_point
;
474 std::size_t instruction_start_index
;
475 util::optional
<Execution_mode_with_parameters
> execution_mode
;
481 struct Input_variable_state
483 std::shared_ptr
<Type_descriptor
> type
;
484 std::size_t member_index
;
486 struct Output_variable_state
488 std::shared_ptr
<Type_descriptor
> type
;
489 std::size_t member_index
;
491 typedef util::variant
<util::monostate
, Input_variable_state
, Output_variable_state
>
493 struct Function_state
497 ::LLVMBasicBlockRef entry_block
;
498 ::LLVMValueRef io_struct
;
499 ::LLVMValueRef inputs_struct
;
500 ::LLVMValueRef outputs_struct
;
501 explicit Entry_block(::LLVMBasicBlockRef entry_block
,
502 ::LLVMValueRef io_struct
,
503 ::LLVMValueRef inputs_struct
,
504 ::LLVMValueRef outputs_struct
) noexcept
505 : entry_block(entry_block
),
506 io_struct(io_struct
),
507 inputs_struct(inputs_struct
),
508 outputs_struct(outputs_struct
)
512 std::shared_ptr
<Function_type_descriptor
> type
;
513 ::LLVMValueRef function
;
514 util::optional
<Entry_block
> entry_block
;
515 std::string output_function_name
;
516 explicit Function_state(std::shared_ptr
<Function_type_descriptor
> type
,
517 ::LLVMValueRef function
,
518 std::string output_function_name
) noexcept
519 : type(std::move(type
)),
522 output_function_name(std::move(output_function_name
))
528 ::LLVMBasicBlockRef basic_block
;
529 explicit Label_state(::LLVMBasicBlockRef basic_block
) noexcept
: basic_block(basic_block
)
535 ::LLVMValueRef value
;
536 std::shared_ptr
<Type_descriptor
> type
;
537 explicit Value(::LLVMValueRef value
, std::shared_ptr
<Type_descriptor
> type
) noexcept
539 type(std::move(type
))
545 util::optional
<Op_string_state
> op_string
;
546 util::optional
<Op_ext_inst_import_state
> op_ext_inst_import
;
547 util::optional
<Name
> name
;
548 std::shared_ptr
<Type_descriptor
> type
;
549 std::vector
<Op_entry_point_state
> op_entry_points
;
550 std::vector
<Decoration_with_parameters
> decorations
;
551 std::vector
<Op_member_decorate
> member_decorations
;
552 std::vector
<Op_member_name
> member_names
;
553 Variable_state variable
;
554 std::shared_ptr
<Constant_descriptor
> constant
;
555 util::optional
<Function_state
> function
;
556 util::optional
<Label_state
> label
;
557 util::optional
<Value
> value
;
560 template <typename Fn
>
561 struct Variant_visit_helper
564 void operator()(util::monostate
&) noexcept
567 template <typename T
>
568 void operator()(T
&&v
)
570 fn(std::forward
<T
>(v
));
575 template <typename Fn
>
580 if(op_ext_inst_import
)
581 fn(*op_ext_inst_import
);
586 for(auto &i
: op_entry_points
)
588 for(auto &i
: decorations
)
590 for(auto &i
: member_decorations
)
592 for(auto &i
: member_names
)
594 util::visit(Variant_visit_helper
<Fn
>{fn
}, variable
);
602 struct Last_merge_instruction
604 typedef util::variant
<Op_selection_merge
, Op_loop_merge
> Instruction_variant
;
605 Instruction_variant instruction
;
606 std::size_t instruction_start_index
;
607 explicit Last_merge_instruction(Instruction_variant instruction
,
608 std::size_t instruction_start_index
)
609 : instruction(std::move(instruction
)), instruction_start_index(instruction_start_index
)
615 std::uint64_t next_name_index
= 0;
616 std::vector
<Id_state
> id_states
;
617 unsigned input_version_number_major
= 0;
618 unsigned input_version_number_minor
= 0;
619 Word input_generator_magic_number
= 0;
620 util::Enum_set
<Capability
> enabled_capabilities
;
621 ::LLVMContextRef context
;
622 ::LLVMTargetMachineRef target_machine
;
623 ::LLVMTargetDataRef target_data
;
624 [[gnu::unused
]] const std::uint64_t shader_id
;
625 std::string name_prefix_string
;
626 llvm_wrapper::Module module
;
627 std::shared_ptr
<Struct_type_descriptor
> io_struct
;
628 static constexpr std::size_t io_struct_argument_index
= 0;
629 std::array
<std::shared_ptr
<Type_descriptor
>, 1> implicit_function_arguments
;
630 std::size_t inputs_member
;
631 std::shared_ptr
<Struct_type_descriptor
> inputs_struct
;
632 std::size_t outputs_member
;
633 std::shared_ptr
<Struct_type_descriptor
> outputs_struct
;
635 Id current_function_id
= 0;
636 Id current_basic_block_id
= 0;
637 llvm_wrapper::Builder builder
;
638 util::optional
<Last_merge_instruction
> last_merge_instruction
;
639 std::list
<std::function
<void()>> function_entry_block_handlers
;
642 Id_state
&get_id_state(Id id
)
644 assert(id
!= 0 && id
<= id_states
.size());
645 return id_states
[id
- 1];
647 template <typename T
= Type_descriptor
>
648 std::shared_ptr
<T
> get_type(Id id
, std::size_t instruction_start_index
)
650 auto &state
= get_id_state(id
);
651 auto retval
= std::dynamic_pointer_cast
<T
>(state
.type
);
654 instruction_start_index
, instruction_start_index
, "id is not a type");
656 throw Parser_error(instruction_start_index
, instruction_start_index
, "type mismatch");
659 unsigned long long get_unsigned_integer_constant(Id id
, std::size_t instruction_start_index
)
661 auto &constant
= get_id_state(id
).constant
;
664 instruction_start_index
, instruction_start_index
, "id is not a constant integer");
665 if(auto *type
= dynamic_cast<Simple_type_descriptor
*>(constant
->type
.get()))
667 auto llvm_type
= type
->get_or_make_type();
668 if(::LLVMGetTypeKind(llvm_type
.type
) != ::LLVMIntegerTypeKind
)
669 throw Parser_error(instruction_start_index
,
670 instruction_start_index
,
671 "id is not a constant integer");
676 instruction_start_index
, instruction_start_index
, "id is not a constant integer");
678 return ::LLVMConstIntGetZExtValue(constant
->get_or_make_value());
680 long long get_signed_integer_constant(Id id
, std::size_t instruction_start_index
)
682 auto &constant
= get_id_state(id
).constant
;
685 instruction_start_index
, instruction_start_index
, "id is not a constant integer");
686 if(auto *type
= dynamic_cast<Simple_type_descriptor
*>(constant
->type
.get()))
688 auto llvm_type
= type
->get_or_make_type();
689 if(::LLVMGetTypeKind(llvm_type
.type
) != ::LLVMIntegerTypeKind
)
690 throw Parser_error(instruction_start_index
,
691 instruction_start_index
,
692 "id is not a constant integer");
697 instruction_start_index
, instruction_start_index
, "id is not a constant integer");
699 return ::LLVMConstIntGetSExtValue(constant
->get_or_make_value());
701 std::string
get_name(Id id
)
703 auto &name
= get_id_state(id
).name
;
708 ::LLVMBasicBlockRef
get_or_make_label(Id id
)
710 auto &state
= get_id_state(id
);
713 auto &function
= get_id_state(current_function_id
).function
.value();
714 state
.label
= Label_state(::LLVMAppendBasicBlockInContext(
715 context
, function
.function
, get_prefixed_name(get_name(id
)).c_str()));
717 return state
.label
->basic_block
;
719 std::string
get_prefixed_name(std::string name
) const
723 std::size_t first_non_underline
= name
.find_first_not_of('_');
724 if(first_non_underline
!= std::string::npos
&& name
[first_non_underline
] >= '0'
725 && name
[first_non_underline
] <= '9')
727 // ensure name doesn't conflict with names generated by get_or_make_prefixed_name
730 return name_prefix_string
+ std::move(name
);
734 std::string
get_or_make_prefixed_name(std::string name
)
738 std::ostringstream ss
;
739 ss
<< name_prefix_string
<< next_name_index
++;
742 return get_prefixed_name(std::move(name
));
746 explicit Spirv_to_llvm(::LLVMContextRef context
,
747 ::LLVMTargetMachineRef target_machine
,
748 std::uint64_t shader_id
)
749 : context(context
), target_machine(target_machine
), shader_id(shader_id
), stage()
752 std::ostringstream ss
;
753 ss
<< "shader_" << shader_id
<< "_";
754 name_prefix_string
= ss
.str();
756 module
= llvm_wrapper::Module::create_with_target_machine(
757 get_prefixed_name("module").c_str(), context
, target_machine
);
758 target_data
= ::LLVMGetModuleDataLayout(module
.get());
759 builder
= llvm_wrapper::Builder::create(context
);
760 constexpr std::size_t no_instruction_index
= 0;
762 std::make_shared
<Struct_type_descriptor
>(std::vector
<Decoration_with_parameters
>{},
765 get_prefixed_name("Io_struct").c_str(),
766 no_instruction_index
);
767 assert(implicit_function_arguments
.size() == 1);
768 static_assert(io_struct_argument_index
== 0, "");
769 implicit_function_arguments
[io_struct_argument_index
] =
770 std::make_shared
<Pointer_type_descriptor
>(std::vector
<Decoration_with_parameters
>{},
772 no_instruction_index
,
775 std::make_shared
<Struct_type_descriptor
>(std::vector
<Decoration_with_parameters
>{},
778 get_prefixed_name("Inputs").c_str(),
779 no_instruction_index
);
780 inputs_member
= io_struct
->add_member(Struct_type_descriptor::Member({}, inputs_struct
));
782 std::make_shared
<Struct_type_descriptor
>(std::vector
<Decoration_with_parameters
>{},
785 get_prefixed_name("Outputs").c_str(),
786 no_instruction_index
);
787 outputs_member
= io_struct
->add_member(Struct_type_descriptor::Member({}, outputs_struct
));
789 Converted_module
run(const Word
*shader_words
, std::size_t shader_size
)
791 stage
= Stage::calculate_types
;
792 spirv::parse(*this, shader_words
, shader_size
);
793 for(auto &id_state
: id_states
)
795 id_state
.type
->get_or_make_type();
796 for(auto &arg
: implicit_function_arguments
)
797 arg
->get_or_make_type();
798 #warning finish Spirv_to_llvm::run
799 stage
= Stage::generate_code
;
800 spirv::parse(*this, shader_words
, shader_size
);
801 std::vector
<Converted_module::Entry_point
> entry_points
;
802 for(auto &id_state
: id_states
)
804 for(auto &entry_point
: id_state
.op_entry_points
)
806 if(!id_state
.function
)
807 throw Parser_error(entry_point
.instruction_start_index
,
808 entry_point
.instruction_start_index
,
809 "No definition for function referenced in OpEntryPoint");
810 entry_points
.push_back(
811 Converted_module::Entry_point(std::string(entry_point
.entry_point
.name
),
812 id_state
.function
->output_function_name
));
815 Converted_module
retval(std::move(module
),
816 std::move(entry_points
),
817 std::move(io_struct
),
819 std::move(inputs_struct
),
821 std::move(outputs_struct
));
824 virtual void handle_header(unsigned version_number_major
,
825 unsigned version_number_minor
,
826 Word generator_magic_number
,
828 Word instruction_schema
) override
;
829 virtual void handle_instruction_op_nop(Op_nop instruction
,
830 std::size_t instruction_start_index
) override
;
831 virtual void handle_instruction_op_undef(Op_undef instruction
,
832 std::size_t instruction_start_index
) override
;
833 virtual void handle_instruction_op_source_continued(
834 Op_source_continued instruction
, std::size_t instruction_start_index
) override
;
835 virtual void handle_instruction_op_source(Op_source instruction
,
836 std::size_t instruction_start_index
) override
;
837 virtual void handle_instruction_op_source_extension(
838 Op_source_extension instruction
, std::size_t instruction_start_index
) override
;
839 virtual void handle_instruction_op_name(Op_name instruction
,
840 std::size_t instruction_start_index
) override
;
841 virtual void handle_instruction_op_member_name(Op_member_name instruction
,
842 std::size_t instruction_start_index
) override
;
843 virtual void handle_instruction_op_string(Op_string instruction
,
844 std::size_t instruction_start_index
) override
;
845 virtual void handle_instruction_op_line(Op_line instruction
,
846 std::size_t instruction_start_index
) override
;
847 virtual void handle_instruction_op_extension(Op_extension instruction
,
848 std::size_t instruction_start_index
) override
;
849 virtual void handle_instruction_op_ext_inst_import(
850 Op_ext_inst_import instruction
, std::size_t instruction_start_index
) override
;
851 virtual void handle_instruction_op_ext_inst(Op_ext_inst instruction
,
852 std::size_t instruction_start_index
) override
;
853 virtual void handle_instruction_op_memory_model(Op_memory_model instruction
,
854 std::size_t instruction_start_index
) override
;
855 virtual void handle_instruction_op_entry_point(Op_entry_point instruction
,
856 std::size_t instruction_start_index
) override
;
857 virtual void handle_instruction_op_execution_mode(Op_execution_mode instruction
,
858 std::size_t instruction_start_index
) override
;
859 virtual void handle_instruction_op_capability(Op_capability instruction
,
860 std::size_t instruction_start_index
) override
;
861 virtual void handle_instruction_op_type_void(Op_type_void instruction
,
862 std::size_t instruction_start_index
) override
;
863 virtual void handle_instruction_op_type_bool(Op_type_bool instruction
,
864 std::size_t instruction_start_index
) override
;
865 virtual void handle_instruction_op_type_int(Op_type_int instruction
,
866 std::size_t instruction_start_index
) override
;
867 virtual void handle_instruction_op_type_float(Op_type_float instruction
,
868 std::size_t instruction_start_index
) override
;
869 virtual void handle_instruction_op_type_vector(Op_type_vector instruction
,
870 std::size_t instruction_start_index
) override
;
871 virtual void handle_instruction_op_type_matrix(Op_type_matrix instruction
,
872 std::size_t instruction_start_index
) override
;
873 virtual void handle_instruction_op_type_image(Op_type_image instruction
,
874 std::size_t instruction_start_index
) override
;
875 virtual void handle_instruction_op_type_sampler(Op_type_sampler instruction
,
876 std::size_t instruction_start_index
) override
;
877 virtual void handle_instruction_op_type_sampled_image(
878 Op_type_sampled_image instruction
, std::size_t instruction_start_index
) override
;
879 virtual void handle_instruction_op_type_array(Op_type_array instruction
,
880 std::size_t instruction_start_index
) override
;
881 virtual void handle_instruction_op_type_runtime_array(
882 Op_type_runtime_array instruction
, std::size_t instruction_start_index
) override
;
883 virtual void handle_instruction_op_type_struct(Op_type_struct instruction
,
884 std::size_t instruction_start_index
) override
;
885 virtual void handle_instruction_op_type_opaque(Op_type_opaque instruction
,
886 std::size_t instruction_start_index
) override
;
887 virtual void handle_instruction_op_type_pointer(Op_type_pointer instruction
,
888 std::size_t instruction_start_index
) override
;
889 virtual void handle_instruction_op_type_function(Op_type_function instruction
,
890 std::size_t instruction_start_index
) override
;
891 virtual void handle_instruction_op_type_event(Op_type_event instruction
,
892 std::size_t instruction_start_index
) override
;
893 virtual void handle_instruction_op_type_device_event(
894 Op_type_device_event instruction
, std::size_t instruction_start_index
) override
;
895 virtual void handle_instruction_op_type_reserve_id(
896 Op_type_reserve_id instruction
, std::size_t instruction_start_index
) override
;
897 virtual void handle_instruction_op_type_queue(Op_type_queue instruction
,
898 std::size_t instruction_start_index
) override
;
899 virtual void handle_instruction_op_type_pipe(Op_type_pipe instruction
,
900 std::size_t instruction_start_index
) override
;
901 virtual void handle_instruction_op_type_forward_pointer(
902 Op_type_forward_pointer instruction
, std::size_t instruction_start_index
) override
;
903 virtual void handle_instruction_op_constant_true(Op_constant_true instruction
,
904 std::size_t instruction_start_index
) override
;
905 virtual void handle_instruction_op_constant_false(Op_constant_false instruction
,
906 std::size_t instruction_start_index
) override
;
907 virtual void handle_instruction_op_constant(Op_constant instruction
,
908 std::size_t instruction_start_index
) override
;
909 virtual void handle_instruction_op_constant_composite(
910 Op_constant_composite instruction
, std::size_t instruction_start_index
) override
;
911 virtual void handle_instruction_op_constant_sampler(
912 Op_constant_sampler instruction
, std::size_t instruction_start_index
) override
;
913 virtual void handle_instruction_op_constant_null(Op_constant_null instruction
,
914 std::size_t instruction_start_index
) override
;
915 virtual void handle_instruction_op_spec_constant_true(
916 Op_spec_constant_true instruction
, std::size_t instruction_start_index
) override
;
917 virtual void handle_instruction_op_spec_constant_false(
918 Op_spec_constant_false instruction
, std::size_t instruction_start_index
) override
;
919 virtual void handle_instruction_op_spec_constant(Op_spec_constant instruction
,
920 std::size_t instruction_start_index
) override
;
921 virtual void handle_instruction_op_spec_constant_composite(
922 Op_spec_constant_composite instruction
, std::size_t instruction_start_index
) override
;
923 virtual void handle_instruction_op_spec_constant_op(
924 Op_spec_constant_op instruction
, std::size_t instruction_start_index
) override
;
925 virtual void handle_instruction_op_function(Op_function instruction
,
926 std::size_t instruction_start_index
) override
;
927 virtual void handle_instruction_op_function_parameter(
928 Op_function_parameter instruction
, std::size_t instruction_start_index
) override
;
929 virtual void handle_instruction_op_function_end(Op_function_end instruction
,
930 std::size_t instruction_start_index
) override
;
931 virtual void handle_instruction_op_function_call(Op_function_call instruction
,
932 std::size_t instruction_start_index
) override
;
933 virtual void handle_instruction_op_variable(Op_variable instruction
,
934 std::size_t instruction_start_index
) override
;
935 virtual void handle_instruction_op_image_texel_pointer(
936 Op_image_texel_pointer instruction
, std::size_t instruction_start_index
) override
;
937 virtual void handle_instruction_op_load(Op_load instruction
,
938 std::size_t instruction_start_index
) override
;
939 virtual void handle_instruction_op_store(Op_store instruction
,
940 std::size_t instruction_start_index
) override
;
941 virtual void handle_instruction_op_copy_memory(Op_copy_memory instruction
,
942 std::size_t instruction_start_index
) override
;
943 virtual void handle_instruction_op_copy_memory_sized(
944 Op_copy_memory_sized instruction
, std::size_t instruction_start_index
) override
;
945 virtual void handle_instruction_op_access_chain(Op_access_chain instruction
,
946 std::size_t instruction_start_index
) override
;
947 virtual void handle_instruction_op_in_bounds_access_chain(
948 Op_in_bounds_access_chain instruction
, std::size_t instruction_start_index
) override
;
949 virtual void handle_instruction_op_ptr_access_chain(
950 Op_ptr_access_chain instruction
, std::size_t instruction_start_index
) override
;
951 virtual void handle_instruction_op_array_length(Op_array_length instruction
,
952 std::size_t instruction_start_index
) override
;
953 virtual void handle_instruction_op_generic_ptr_mem_semantics(
954 Op_generic_ptr_mem_semantics instruction
, std::size_t instruction_start_index
) override
;
955 virtual void handle_instruction_op_in_bounds_ptr_access_chain(
956 Op_in_bounds_ptr_access_chain instruction
, std::size_t instruction_start_index
) override
;
957 virtual void handle_instruction_op_decorate(Op_decorate instruction
,
958 std::size_t instruction_start_index
) override
;
959 virtual void handle_instruction_op_member_decorate(
960 Op_member_decorate instruction
, std::size_t instruction_start_index
) override
;
961 virtual void handle_instruction_op_decoration_group(
962 Op_decoration_group instruction
, std::size_t instruction_start_index
) override
;
963 virtual void handle_instruction_op_group_decorate(Op_group_decorate instruction
,
964 std::size_t instruction_start_index
) override
;
965 virtual void handle_instruction_op_group_member_decorate(
966 Op_group_member_decorate instruction
, std::size_t instruction_start_index
) override
;
967 virtual void handle_instruction_op_vector_extract_dynamic(
968 Op_vector_extract_dynamic instruction
, std::size_t instruction_start_index
) override
;
969 virtual void handle_instruction_op_vector_insert_dynamic(
970 Op_vector_insert_dynamic instruction
, std::size_t instruction_start_index
) override
;
971 virtual void handle_instruction_op_vector_shuffle(Op_vector_shuffle instruction
,
972 std::size_t instruction_start_index
) override
;
973 virtual void handle_instruction_op_composite_construct(
974 Op_composite_construct instruction
, std::size_t instruction_start_index
) override
;
975 virtual void handle_instruction_op_composite_extract(
976 Op_composite_extract instruction
, std::size_t instruction_start_index
) override
;
977 virtual void handle_instruction_op_composite_insert(
978 Op_composite_insert instruction
, std::size_t instruction_start_index
) override
;
979 virtual void handle_instruction_op_copy_object(Op_copy_object instruction
,
980 std::size_t instruction_start_index
) override
;
981 virtual void handle_instruction_op_transpose(Op_transpose instruction
,
982 std::size_t instruction_start_index
) override
;
983 virtual void handle_instruction_op_sampled_image(Op_sampled_image instruction
,
984 std::size_t instruction_start_index
) override
;
985 virtual void handle_instruction_op_image_sample_implicit_lod(
986 Op_image_sample_implicit_lod instruction
, std::size_t instruction_start_index
) override
;
987 virtual void handle_instruction_op_image_sample_explicit_lod(
988 Op_image_sample_explicit_lod instruction
, std::size_t instruction_start_index
) override
;
989 virtual void handle_instruction_op_image_sample_dref_implicit_lod(
990 Op_image_sample_dref_implicit_lod instruction
,
991 std::size_t instruction_start_index
) override
;
992 virtual void handle_instruction_op_image_sample_dref_explicit_lod(
993 Op_image_sample_dref_explicit_lod instruction
,
994 std::size_t instruction_start_index
) override
;
995 virtual void handle_instruction_op_image_sample_proj_implicit_lod(
996 Op_image_sample_proj_implicit_lod instruction
,
997 std::size_t instruction_start_index
) override
;
998 virtual void handle_instruction_op_image_sample_proj_explicit_lod(
999 Op_image_sample_proj_explicit_lod instruction
,
1000 std::size_t instruction_start_index
) override
;
1001 virtual void handle_instruction_op_image_sample_proj_dref_implicit_lod(
1002 Op_image_sample_proj_dref_implicit_lod instruction
,
1003 std::size_t instruction_start_index
) override
;
1004 virtual void handle_instruction_op_image_sample_proj_dref_explicit_lod(
1005 Op_image_sample_proj_dref_explicit_lod instruction
,
1006 std::size_t instruction_start_index
) override
;
1007 virtual void handle_instruction_op_image_fetch(Op_image_fetch instruction
,
1008 std::size_t instruction_start_index
) override
;
1009 virtual void handle_instruction_op_image_gather(Op_image_gather instruction
,
1010 std::size_t instruction_start_index
) override
;
1011 virtual void handle_instruction_op_image_dref_gather(
1012 Op_image_dref_gather instruction
, std::size_t instruction_start_index
) override
;
1013 virtual void handle_instruction_op_image_read(Op_image_read instruction
,
1014 std::size_t instruction_start_index
) override
;
1015 virtual void handle_instruction_op_image_write(Op_image_write instruction
,
1016 std::size_t instruction_start_index
) override
;
1017 virtual void handle_instruction_op_image(Op_image instruction
,
1018 std::size_t instruction_start_index
) override
;
1019 virtual void handle_instruction_op_image_query_format(
1020 Op_image_query_format instruction
, std::size_t instruction_start_index
) override
;
1021 virtual void handle_instruction_op_image_query_order(
1022 Op_image_query_order instruction
, std::size_t instruction_start_index
) override
;
1023 virtual void handle_instruction_op_image_query_size_lod(
1024 Op_image_query_size_lod instruction
, std::size_t instruction_start_index
) override
;
1025 virtual void handle_instruction_op_image_query_size(
1026 Op_image_query_size instruction
, std::size_t instruction_start_index
) override
;
1027 virtual void handle_instruction_op_image_query_lod(
1028 Op_image_query_lod instruction
, std::size_t instruction_start_index
) override
;
1029 virtual void handle_instruction_op_image_query_levels(
1030 Op_image_query_levels instruction
, std::size_t instruction_start_index
) override
;
1031 virtual void handle_instruction_op_image_query_samples(
1032 Op_image_query_samples instruction
, std::size_t instruction_start_index
) override
;
1033 virtual void handle_instruction_op_convert_f_to_u(Op_convert_f_to_u instruction
,
1034 std::size_t instruction_start_index
) override
;
1035 virtual void handle_instruction_op_convert_f_to_s(Op_convert_f_to_s instruction
,
1036 std::size_t instruction_start_index
) override
;
1037 virtual void handle_instruction_op_convert_s_to_f(Op_convert_s_to_f instruction
,
1038 std::size_t instruction_start_index
) override
;
1039 virtual void handle_instruction_op_convert_u_to_f(Op_convert_u_to_f instruction
,
1040 std::size_t instruction_start_index
) override
;
1041 virtual void handle_instruction_op_u_convert(Op_u_convert instruction
,
1042 std::size_t instruction_start_index
) override
;
1043 virtual void handle_instruction_op_s_convert(Op_s_convert instruction
,
1044 std::size_t instruction_start_index
) override
;
1045 virtual void handle_instruction_op_f_convert(Op_f_convert instruction
,
1046 std::size_t instruction_start_index
) override
;
1047 virtual void handle_instruction_op_quantize_to_f16(
1048 Op_quantize_to_f16 instruction
, std::size_t instruction_start_index
) override
;
1049 virtual void handle_instruction_op_convert_ptr_to_u(
1050 Op_convert_ptr_to_u instruction
, std::size_t instruction_start_index
) override
;
1051 virtual void handle_instruction_op_sat_convert_s_to_u(
1052 Op_sat_convert_s_to_u instruction
, std::size_t instruction_start_index
) override
;
1053 virtual void handle_instruction_op_sat_convert_u_to_s(
1054 Op_sat_convert_u_to_s instruction
, std::size_t instruction_start_index
) override
;
1055 virtual void handle_instruction_op_convert_u_to_ptr(
1056 Op_convert_u_to_ptr instruction
, std::size_t instruction_start_index
) override
;
1057 virtual void handle_instruction_op_ptr_cast_to_generic(
1058 Op_ptr_cast_to_generic instruction
, std::size_t instruction_start_index
) override
;
1059 virtual void handle_instruction_op_generic_cast_to_ptr(
1060 Op_generic_cast_to_ptr instruction
, std::size_t instruction_start_index
) override
;
1061 virtual void handle_instruction_op_generic_cast_to_ptr_explicit(
1062 Op_generic_cast_to_ptr_explicit instruction
, std::size_t instruction_start_index
) override
;
1063 virtual void handle_instruction_op_bitcast(Op_bitcast instruction
,
1064 std::size_t instruction_start_index
) override
;
1065 virtual void handle_instruction_op_s_negate(Op_s_negate instruction
,
1066 std::size_t instruction_start_index
) override
;
1067 virtual void handle_instruction_op_f_negate(Op_f_negate instruction
,
1068 std::size_t instruction_start_index
) override
;
1069 virtual void handle_instruction_op_i_add(Op_i_add instruction
,
1070 std::size_t instruction_start_index
) override
;
1071 virtual void handle_instruction_op_f_add(Op_f_add instruction
,
1072 std::size_t instruction_start_index
) override
;
1073 virtual void handle_instruction_op_i_sub(Op_i_sub instruction
,
1074 std::size_t instruction_start_index
) override
;
1075 virtual void handle_instruction_op_f_sub(Op_f_sub instruction
,
1076 std::size_t instruction_start_index
) override
;
1077 virtual void handle_instruction_op_i_mul(Op_i_mul instruction
,
1078 std::size_t instruction_start_index
) override
;
1079 virtual void handle_instruction_op_f_mul(Op_f_mul instruction
,
1080 std::size_t instruction_start_index
) override
;
1081 virtual void handle_instruction_op_u_div(Op_u_div instruction
,
1082 std::size_t instruction_start_index
) override
;
1083 virtual void handle_instruction_op_s_div(Op_s_div instruction
,
1084 std::size_t instruction_start_index
) override
;
1085 virtual void handle_instruction_op_f_div(Op_f_div instruction
,
1086 std::size_t instruction_start_index
) override
;
1087 virtual void handle_instruction_op_u_mod(Op_u_mod instruction
,
1088 std::size_t instruction_start_index
) override
;
1089 virtual void handle_instruction_op_s_rem(Op_s_rem instruction
,
1090 std::size_t instruction_start_index
) override
;
1091 virtual void handle_instruction_op_s_mod(Op_s_mod instruction
,
1092 std::size_t instruction_start_index
) override
;
1093 virtual void handle_instruction_op_f_rem(Op_f_rem instruction
,
1094 std::size_t instruction_start_index
) override
;
1095 virtual void handle_instruction_op_f_mod(Op_f_mod instruction
,
1096 std::size_t instruction_start_index
) override
;
1097 virtual void handle_instruction_op_vector_times_scalar(
1098 Op_vector_times_scalar instruction
, std::size_t instruction_start_index
) override
;
1099 virtual void handle_instruction_op_matrix_times_scalar(
1100 Op_matrix_times_scalar instruction
, std::size_t instruction_start_index
) override
;
1101 virtual void handle_instruction_op_vector_times_matrix(
1102 Op_vector_times_matrix instruction
, std::size_t instruction_start_index
) override
;
1103 virtual void handle_instruction_op_matrix_times_vector(
1104 Op_matrix_times_vector instruction
, std::size_t instruction_start_index
) override
;
1105 virtual void handle_instruction_op_matrix_times_matrix(
1106 Op_matrix_times_matrix instruction
, std::size_t instruction_start_index
) override
;
1107 virtual void handle_instruction_op_outer_product(Op_outer_product instruction
,
1108 std::size_t instruction_start_index
) override
;
1109 virtual void handle_instruction_op_dot(Op_dot instruction
,
1110 std::size_t instruction_start_index
) override
;
1111 virtual void handle_instruction_op_i_add_carry(Op_i_add_carry instruction
,
1112 std::size_t instruction_start_index
) override
;
1113 virtual void handle_instruction_op_i_sub_borrow(Op_i_sub_borrow instruction
,
1114 std::size_t instruction_start_index
) override
;
1115 virtual void handle_instruction_op_u_mul_extended(Op_u_mul_extended instruction
,
1116 std::size_t instruction_start_index
) override
;
1117 virtual void handle_instruction_op_s_mul_extended(Op_s_mul_extended instruction
,
1118 std::size_t instruction_start_index
) override
;
1119 virtual void handle_instruction_op_any(Op_any instruction
,
1120 std::size_t instruction_start_index
) override
;
1121 virtual void handle_instruction_op_all(Op_all instruction
,
1122 std::size_t instruction_start_index
) override
;
1123 virtual void handle_instruction_op_is_nan(Op_is_nan instruction
,
1124 std::size_t instruction_start_index
) override
;
1125 virtual void handle_instruction_op_is_inf(Op_is_inf instruction
,
1126 std::size_t instruction_start_index
) override
;
1127 virtual void handle_instruction_op_is_finite(Op_is_finite instruction
,
1128 std::size_t instruction_start_index
) override
;
1129 virtual void handle_instruction_op_is_normal(Op_is_normal instruction
,
1130 std::size_t instruction_start_index
) override
;
1131 virtual void handle_instruction_op_sign_bit_set(Op_sign_bit_set instruction
,
1132 std::size_t instruction_start_index
) override
;
1133 virtual void handle_instruction_op_less_or_greater(
1134 Op_less_or_greater instruction
, std::size_t instruction_start_index
) override
;
1135 virtual void handle_instruction_op_ordered(Op_ordered instruction
,
1136 std::size_t instruction_start_index
) override
;
1137 virtual void handle_instruction_op_unordered(Op_unordered instruction
,
1138 std::size_t instruction_start_index
) override
;
1139 virtual void handle_instruction_op_logical_equal(Op_logical_equal instruction
,
1140 std::size_t instruction_start_index
) override
;
1141 virtual void handle_instruction_op_logical_not_equal(
1142 Op_logical_not_equal instruction
, std::size_t instruction_start_index
) override
;
1143 virtual void handle_instruction_op_logical_or(Op_logical_or instruction
,
1144 std::size_t instruction_start_index
) override
;
1145 virtual void handle_instruction_op_logical_and(Op_logical_and instruction
,
1146 std::size_t instruction_start_index
) override
;
1147 virtual void handle_instruction_op_logical_not(Op_logical_not instruction
,
1148 std::size_t instruction_start_index
) override
;
1149 virtual void handle_instruction_op_select(Op_select instruction
,
1150 std::size_t instruction_start_index
) override
;
1151 virtual void handle_instruction_op_i_equal(Op_i_equal instruction
,
1152 std::size_t instruction_start_index
) override
;
1153 virtual void handle_instruction_op_i_not_equal(Op_i_not_equal instruction
,
1154 std::size_t instruction_start_index
) override
;
1155 virtual void handle_instruction_op_u_greater_than(Op_u_greater_than instruction
,
1156 std::size_t instruction_start_index
) override
;
1157 virtual void handle_instruction_op_s_greater_than(Op_s_greater_than instruction
,
1158 std::size_t instruction_start_index
) override
;
1159 virtual void handle_instruction_op_u_greater_than_equal(
1160 Op_u_greater_than_equal instruction
, std::size_t instruction_start_index
) override
;
1161 virtual void handle_instruction_op_s_greater_than_equal(
1162 Op_s_greater_than_equal instruction
, std::size_t instruction_start_index
) override
;
1163 virtual void handle_instruction_op_u_less_than(Op_u_less_than instruction
,
1164 std::size_t instruction_start_index
) override
;
1165 virtual void handle_instruction_op_s_less_than(Op_s_less_than instruction
,
1166 std::size_t instruction_start_index
) override
;
1167 virtual void handle_instruction_op_u_less_than_equal(
1168 Op_u_less_than_equal instruction
, std::size_t instruction_start_index
) override
;
1169 virtual void handle_instruction_op_s_less_than_equal(
1170 Op_s_less_than_equal instruction
, std::size_t instruction_start_index
) override
;
1171 virtual void handle_instruction_op_f_ord_equal(Op_f_ord_equal instruction
,
1172 std::size_t instruction_start_index
) override
;
1173 virtual void handle_instruction_op_f_unord_equal(Op_f_unord_equal instruction
,
1174 std::size_t instruction_start_index
) override
;
1175 virtual void handle_instruction_op_f_ord_not_equal(
1176 Op_f_ord_not_equal instruction
, std::size_t instruction_start_index
) override
;
1177 virtual void handle_instruction_op_f_unord_not_equal(
1178 Op_f_unord_not_equal instruction
, std::size_t instruction_start_index
) override
;
1179 virtual void handle_instruction_op_f_ord_less_than(
1180 Op_f_ord_less_than instruction
, std::size_t instruction_start_index
) override
;
1181 virtual void handle_instruction_op_f_unord_less_than(
1182 Op_f_unord_less_than instruction
, std::size_t instruction_start_index
) override
;
1183 virtual void handle_instruction_op_f_ord_greater_than(
1184 Op_f_ord_greater_than instruction
, std::size_t instruction_start_index
) override
;
1185 virtual void handle_instruction_op_f_unord_greater_than(
1186 Op_f_unord_greater_than instruction
, std::size_t instruction_start_index
) override
;
1187 virtual void handle_instruction_op_f_ord_less_than_equal(
1188 Op_f_ord_less_than_equal instruction
, std::size_t instruction_start_index
) override
;
1189 virtual void handle_instruction_op_f_unord_less_than_equal(
1190 Op_f_unord_less_than_equal instruction
, std::size_t instruction_start_index
) override
;
1191 virtual void handle_instruction_op_f_ord_greater_than_equal(
1192 Op_f_ord_greater_than_equal instruction
, std::size_t instruction_start_index
) override
;
1193 virtual void handle_instruction_op_f_unord_greater_than_equal(
1194 Op_f_unord_greater_than_equal instruction
, std::size_t instruction_start_index
) override
;
1195 virtual void handle_instruction_op_shift_right_logical(
1196 Op_shift_right_logical instruction
, std::size_t instruction_start_index
) override
;
1197 virtual void handle_instruction_op_shift_right_arithmetic(
1198 Op_shift_right_arithmetic instruction
, std::size_t instruction_start_index
) override
;
1199 virtual void handle_instruction_op_shift_left_logical(
1200 Op_shift_left_logical instruction
, std::size_t instruction_start_index
) override
;
1201 virtual void handle_instruction_op_bitwise_or(Op_bitwise_or instruction
,
1202 std::size_t instruction_start_index
) override
;
1203 virtual void handle_instruction_op_bitwise_xor(Op_bitwise_xor instruction
,
1204 std::size_t instruction_start_index
) override
;
1205 virtual void handle_instruction_op_bitwise_and(Op_bitwise_and instruction
,
1206 std::size_t instruction_start_index
) override
;
1207 virtual void handle_instruction_op_not(Op_not instruction
,
1208 std::size_t instruction_start_index
) override
;
1209 virtual void handle_instruction_op_bit_field_insert(
1210 Op_bit_field_insert instruction
, std::size_t instruction_start_index
) override
;
1211 virtual void handle_instruction_op_bit_field_s_extract(
1212 Op_bit_field_s_extract instruction
, std::size_t instruction_start_index
) override
;
1213 virtual void handle_instruction_op_bit_field_u_extract(
1214 Op_bit_field_u_extract instruction
, std::size_t instruction_start_index
) override
;
1215 virtual void handle_instruction_op_bit_reverse(Op_bit_reverse instruction
,
1216 std::size_t instruction_start_index
) override
;
1217 virtual void handle_instruction_op_bit_count(Op_bit_count instruction
,
1218 std::size_t instruction_start_index
) override
;
1219 virtual void handle_instruction_op_d_pdx(Op_d_pdx instruction
,
1220 std::size_t instruction_start_index
) override
;
1221 virtual void handle_instruction_op_d_pdy(Op_d_pdy instruction
,
1222 std::size_t instruction_start_index
) override
;
1223 virtual void handle_instruction_op_fwidth(Op_fwidth instruction
,
1224 std::size_t instruction_start_index
) override
;
1225 virtual void handle_instruction_op_d_pdx_fine(Op_d_pdx_fine instruction
,
1226 std::size_t instruction_start_index
) override
;
1227 virtual void handle_instruction_op_d_pdy_fine(Op_d_pdy_fine instruction
,
1228 std::size_t instruction_start_index
) override
;
1229 virtual void handle_instruction_op_fwidth_fine(Op_fwidth_fine instruction
,
1230 std::size_t instruction_start_index
) override
;
1231 virtual void handle_instruction_op_d_pdx_coarse(Op_d_pdx_coarse instruction
,
1232 std::size_t instruction_start_index
) override
;
1233 virtual void handle_instruction_op_d_pdy_coarse(Op_d_pdy_coarse instruction
,
1234 std::size_t instruction_start_index
) override
;
1235 virtual void handle_instruction_op_fwidth_coarse(Op_fwidth_coarse instruction
,
1236 std::size_t instruction_start_index
) override
;
1237 virtual void handle_instruction_op_emit_vertex(Op_emit_vertex instruction
,
1238 std::size_t instruction_start_index
) override
;
1239 virtual void handle_instruction_op_end_primitive(Op_end_primitive instruction
,
1240 std::size_t instruction_start_index
) override
;
1241 virtual void handle_instruction_op_emit_stream_vertex(
1242 Op_emit_stream_vertex instruction
, std::size_t instruction_start_index
) override
;
1243 virtual void handle_instruction_op_end_stream_primitive(
1244 Op_end_stream_primitive instruction
, std::size_t instruction_start_index
) override
;
1245 virtual void handle_instruction_op_control_barrier(
1246 Op_control_barrier instruction
, std::size_t instruction_start_index
) override
;
1247 virtual void handle_instruction_op_memory_barrier(Op_memory_barrier instruction
,
1248 std::size_t instruction_start_index
) override
;
1249 virtual void handle_instruction_op_atomic_load(Op_atomic_load instruction
,
1250 std::size_t instruction_start_index
) override
;
1251 virtual void handle_instruction_op_atomic_store(Op_atomic_store instruction
,
1252 std::size_t instruction_start_index
) override
;
1253 virtual void handle_instruction_op_atomic_exchange(
1254 Op_atomic_exchange instruction
, std::size_t instruction_start_index
) override
;
1255 virtual void handle_instruction_op_atomic_compare_exchange(
1256 Op_atomic_compare_exchange instruction
, std::size_t instruction_start_index
) override
;
1257 virtual void handle_instruction_op_atomic_compare_exchange_weak(
1258 Op_atomic_compare_exchange_weak instruction
, std::size_t instruction_start_index
) override
;
1259 virtual void handle_instruction_op_atomic_i_increment(
1260 Op_atomic_i_increment instruction
, std::size_t instruction_start_index
) override
;
1261 virtual void handle_instruction_op_atomic_i_decrement(
1262 Op_atomic_i_decrement instruction
, std::size_t instruction_start_index
) override
;
1263 virtual void handle_instruction_op_atomic_i_add(Op_atomic_i_add instruction
,
1264 std::size_t instruction_start_index
) override
;
1265 virtual void handle_instruction_op_atomic_i_sub(Op_atomic_i_sub instruction
,
1266 std::size_t instruction_start_index
) override
;
1267 virtual void handle_instruction_op_atomic_s_min(Op_atomic_s_min instruction
,
1268 std::size_t instruction_start_index
) override
;
1269 virtual void handle_instruction_op_atomic_u_min(Op_atomic_u_min instruction
,
1270 std::size_t instruction_start_index
) override
;
1271 virtual void handle_instruction_op_atomic_s_max(Op_atomic_s_max instruction
,
1272 std::size_t instruction_start_index
) override
;
1273 virtual void handle_instruction_op_atomic_u_max(Op_atomic_u_max instruction
,
1274 std::size_t instruction_start_index
) override
;
1275 virtual void handle_instruction_op_atomic_and(Op_atomic_and instruction
,
1276 std::size_t instruction_start_index
) override
;
1277 virtual void handle_instruction_op_atomic_or(Op_atomic_or instruction
,
1278 std::size_t instruction_start_index
) override
;
1279 virtual void handle_instruction_op_atomic_xor(Op_atomic_xor instruction
,
1280 std::size_t instruction_start_index
) override
;
1281 virtual void handle_instruction_op_phi(Op_phi instruction
,
1282 std::size_t instruction_start_index
) override
;
1283 virtual void handle_instruction_op_loop_merge(Op_loop_merge instruction
,
1284 std::size_t instruction_start_index
) override
;
1285 virtual void handle_instruction_op_selection_merge(
1286 Op_selection_merge instruction
, std::size_t instruction_start_index
) override
;
1287 virtual void handle_instruction_op_label(Op_label instruction
,
1288 std::size_t instruction_start_index
) override
;
1289 virtual void handle_instruction_op_branch(Op_branch instruction
,
1290 std::size_t instruction_start_index
) override
;
1291 virtual void handle_instruction_op_branch_conditional(
1292 Op_branch_conditional instruction
, std::size_t instruction_start_index
) override
;
1293 virtual void handle_instruction_op_switch(Op_switch instruction
,
1294 std::size_t instruction_start_index
) override
;
1295 virtual void handle_instruction_op_kill(Op_kill instruction
,
1296 std::size_t instruction_start_index
) override
;
1297 virtual void handle_instruction_op_return(Op_return instruction
,
1298 std::size_t instruction_start_index
) override
;
1299 virtual void handle_instruction_op_return_value(Op_return_value instruction
,
1300 std::size_t instruction_start_index
) override
;
1301 virtual void handle_instruction_op_unreachable(Op_unreachable instruction
,
1302 std::size_t instruction_start_index
) override
;
1303 virtual void handle_instruction_op_lifetime_start(Op_lifetime_start instruction
,
1304 std::size_t instruction_start_index
) override
;
1305 virtual void handle_instruction_op_lifetime_stop(Op_lifetime_stop instruction
,
1306 std::size_t instruction_start_index
) override
;
1307 virtual void handle_instruction_op_group_async_copy(
1308 Op_group_async_copy instruction
, std::size_t instruction_start_index
) override
;
1309 virtual void handle_instruction_op_group_wait_events(
1310 Op_group_wait_events instruction
, std::size_t instruction_start_index
) override
;
1311 virtual void handle_instruction_op_group_all(Op_group_all instruction
,
1312 std::size_t instruction_start_index
) override
;
1313 virtual void handle_instruction_op_group_any(Op_group_any instruction
,
1314 std::size_t instruction_start_index
) override
;
1315 virtual void handle_instruction_op_group_broadcast(
1316 Op_group_broadcast instruction
, std::size_t instruction_start_index
) override
;
1317 virtual void handle_instruction_op_group_i_add(Op_group_i_add instruction
,
1318 std::size_t instruction_start_index
) override
;
1319 virtual void handle_instruction_op_group_f_add(Op_group_f_add instruction
,
1320 std::size_t instruction_start_index
) override
;
1321 virtual void handle_instruction_op_group_f_min(Op_group_f_min instruction
,
1322 std::size_t instruction_start_index
) override
;
1323 virtual void handle_instruction_op_group_u_min(Op_group_u_min instruction
,
1324 std::size_t instruction_start_index
) override
;
1325 virtual void handle_instruction_op_group_s_min(Op_group_s_min instruction
,
1326 std::size_t instruction_start_index
) override
;
1327 virtual void handle_instruction_op_group_f_max(Op_group_f_max instruction
,
1328 std::size_t instruction_start_index
) override
;
1329 virtual void handle_instruction_op_group_u_max(Op_group_u_max instruction
,
1330 std::size_t instruction_start_index
) override
;
1331 virtual void handle_instruction_op_group_s_max(Op_group_s_max instruction
,
1332 std::size_t instruction_start_index
) override
;
1333 virtual void handle_instruction_op_read_pipe(Op_read_pipe instruction
,
1334 std::size_t instruction_start_index
) override
;
1335 virtual void handle_instruction_op_write_pipe(Op_write_pipe instruction
,
1336 std::size_t instruction_start_index
) override
;
1337 virtual void handle_instruction_op_reserved_read_pipe(
1338 Op_reserved_read_pipe instruction
, std::size_t instruction_start_index
) override
;
1339 virtual void handle_instruction_op_reserved_write_pipe(
1340 Op_reserved_write_pipe instruction
, std::size_t instruction_start_index
) override
;
1341 virtual void handle_instruction_op_reserve_read_pipe_packets(
1342 Op_reserve_read_pipe_packets instruction
, std::size_t instruction_start_index
) override
;
1343 virtual void handle_instruction_op_reserve_write_pipe_packets(
1344 Op_reserve_write_pipe_packets instruction
, std::size_t instruction_start_index
) override
;
1345 virtual void handle_instruction_op_commit_read_pipe(
1346 Op_commit_read_pipe instruction
, std::size_t instruction_start_index
) override
;
1347 virtual void handle_instruction_op_commit_write_pipe(
1348 Op_commit_write_pipe instruction
, std::size_t instruction_start_index
) override
;
1349 virtual void handle_instruction_op_is_valid_reserve_id(
1350 Op_is_valid_reserve_id instruction
, std::size_t instruction_start_index
) override
;
1351 virtual void handle_instruction_op_get_num_pipe_packets(
1352 Op_get_num_pipe_packets instruction
, std::size_t instruction_start_index
) override
;
1353 virtual void handle_instruction_op_get_max_pipe_packets(
1354 Op_get_max_pipe_packets instruction
, std::size_t instruction_start_index
) override
;
1355 virtual void handle_instruction_op_group_reserve_read_pipe_packets(
1356 Op_group_reserve_read_pipe_packets instruction
,
1357 std::size_t instruction_start_index
) override
;
1358 virtual void handle_instruction_op_group_reserve_write_pipe_packets(
1359 Op_group_reserve_write_pipe_packets instruction
,
1360 std::size_t instruction_start_index
) override
;
1361 virtual void handle_instruction_op_group_commit_read_pipe(
1362 Op_group_commit_read_pipe instruction
, std::size_t instruction_start_index
) override
;
1363 virtual void handle_instruction_op_group_commit_write_pipe(
1364 Op_group_commit_write_pipe instruction
, std::size_t instruction_start_index
) override
;
1365 virtual void handle_instruction_op_enqueue_marker(Op_enqueue_marker instruction
,
1366 std::size_t instruction_start_index
) override
;
1367 virtual void handle_instruction_op_enqueue_kernel(Op_enqueue_kernel instruction
,
1368 std::size_t instruction_start_index
) override
;
1369 virtual void handle_instruction_op_get_kernel_n_drange_sub_group_count(
1370 Op_get_kernel_n_drange_sub_group_count instruction
,
1371 std::size_t instruction_start_index
) override
;
1372 virtual void handle_instruction_op_get_kernel_n_drange_max_sub_group_size(
1373 Op_get_kernel_n_drange_max_sub_group_size instruction
,
1374 std::size_t instruction_start_index
) override
;
1375 virtual void handle_instruction_op_get_kernel_work_group_size(
1376 Op_get_kernel_work_group_size instruction
, std::size_t instruction_start_index
) override
;
1377 virtual void handle_instruction_op_get_kernel_preferred_work_group_size_multiple(
1378 Op_get_kernel_preferred_work_group_size_multiple instruction
,
1379 std::size_t instruction_start_index
) override
;
1380 virtual void handle_instruction_op_retain_event(Op_retain_event instruction
,
1381 std::size_t instruction_start_index
) override
;
1382 virtual void handle_instruction_op_release_event(Op_release_event instruction
,
1383 std::size_t instruction_start_index
) override
;
1384 virtual void handle_instruction_op_create_user_event(
1385 Op_create_user_event instruction
, std::size_t instruction_start_index
) override
;
1386 virtual void handle_instruction_op_is_valid_event(Op_is_valid_event instruction
,
1387 std::size_t instruction_start_index
) override
;
1388 virtual void handle_instruction_op_set_user_event_status(
1389 Op_set_user_event_status instruction
, std::size_t instruction_start_index
) override
;
1390 virtual void handle_instruction_op_capture_event_profiling_info(
1391 Op_capture_event_profiling_info instruction
, std::size_t instruction_start_index
) override
;
1392 virtual void handle_instruction_op_get_default_queue(
1393 Op_get_default_queue instruction
, std::size_t instruction_start_index
) override
;
1394 virtual void handle_instruction_op_build_nd_range(Op_build_nd_range instruction
,
1395 std::size_t instruction_start_index
) override
;
1396 virtual void handle_instruction_op_image_sparse_sample_implicit_lod(
1397 Op_image_sparse_sample_implicit_lod instruction
,
1398 std::size_t instruction_start_index
) override
;
1399 virtual void handle_instruction_op_image_sparse_sample_explicit_lod(
1400 Op_image_sparse_sample_explicit_lod instruction
,
1401 std::size_t instruction_start_index
) override
;
1402 virtual void handle_instruction_op_image_sparse_sample_dref_implicit_lod(
1403 Op_image_sparse_sample_dref_implicit_lod instruction
,
1404 std::size_t instruction_start_index
) override
;
1405 virtual void handle_instruction_op_image_sparse_sample_dref_explicit_lod(
1406 Op_image_sparse_sample_dref_explicit_lod instruction
,
1407 std::size_t instruction_start_index
) override
;
1408 virtual void handle_instruction_op_image_sparse_sample_proj_implicit_lod(
1409 Op_image_sparse_sample_proj_implicit_lod instruction
,
1410 std::size_t instruction_start_index
) override
;
1411 virtual void handle_instruction_op_image_sparse_sample_proj_explicit_lod(
1412 Op_image_sparse_sample_proj_explicit_lod instruction
,
1413 std::size_t instruction_start_index
) override
;
1414 virtual void handle_instruction_op_image_sparse_sample_proj_dref_implicit_lod(
1415 Op_image_sparse_sample_proj_dref_implicit_lod instruction
,
1416 std::size_t instruction_start_index
) override
;
1417 virtual void handle_instruction_op_image_sparse_sample_proj_dref_explicit_lod(
1418 Op_image_sparse_sample_proj_dref_explicit_lod instruction
,
1419 std::size_t instruction_start_index
) override
;
1420 virtual void handle_instruction_op_image_sparse_fetch(
1421 Op_image_sparse_fetch instruction
, std::size_t instruction_start_index
) override
;
1422 virtual void handle_instruction_op_image_sparse_gather(
1423 Op_image_sparse_gather instruction
, std::size_t instruction_start_index
) override
;
1424 virtual void handle_instruction_op_image_sparse_dref_gather(
1425 Op_image_sparse_dref_gather instruction
, std::size_t instruction_start_index
) override
;
1426 virtual void handle_instruction_op_image_sparse_texels_resident(
1427 Op_image_sparse_texels_resident instruction
, std::size_t instruction_start_index
) override
;
1428 virtual void handle_instruction_op_no_line(Op_no_line instruction
,
1429 std::size_t instruction_start_index
) override
;
1430 virtual void handle_instruction_op_atomic_flag_test_and_set(
1431 Op_atomic_flag_test_and_set instruction
, std::size_t instruction_start_index
) override
;
1432 virtual void handle_instruction_op_atomic_flag_clear(
1433 Op_atomic_flag_clear instruction
, std::size_t instruction_start_index
) override
;
1434 virtual void handle_instruction_op_image_sparse_read(
1435 Op_image_sparse_read instruction
, std::size_t instruction_start_index
) override
;
1436 virtual void handle_instruction_op_size_of(Op_size_of instruction
,
1437 std::size_t instruction_start_index
) override
;
1438 virtual void handle_instruction_op_type_pipe_storage(
1439 Op_type_pipe_storage instruction
, std::size_t instruction_start_index
) override
;
1440 virtual void handle_instruction_op_constant_pipe_storage(
1441 Op_constant_pipe_storage instruction
, std::size_t instruction_start_index
) override
;
1442 virtual void handle_instruction_op_create_pipe_from_pipe_storage(
1443 Op_create_pipe_from_pipe_storage instruction
, std::size_t instruction_start_index
) override
;
1444 virtual void handle_instruction_op_get_kernel_local_size_for_subgroup_count(
1445 Op_get_kernel_local_size_for_subgroup_count instruction
,
1446 std::size_t instruction_start_index
) override
;
1447 virtual void handle_instruction_op_get_kernel_max_num_subgroups(
1448 Op_get_kernel_max_num_subgroups instruction
, std::size_t instruction_start_index
) override
;
1449 virtual void handle_instruction_op_type_named_barrier(
1450 Op_type_named_barrier instruction
, std::size_t instruction_start_index
) override
;
1451 virtual void handle_instruction_op_named_barrier_initialize(
1452 Op_named_barrier_initialize instruction
, std::size_t instruction_start_index
) override
;
1453 virtual void handle_instruction_op_memory_named_barrier(
1454 Op_memory_named_barrier instruction
, std::size_t instruction_start_index
) override
;
1455 virtual void handle_instruction_op_module_processed(
1456 Op_module_processed instruction
, std::size_t instruction_start_index
) override
;
1457 virtual void handle_instruction_op_execution_mode_id(
1458 Op_execution_mode_id instruction
, std::size_t instruction_start_index
) override
;
1459 virtual void handle_instruction_op_decorate_id(Op_decorate_id instruction
,
1460 std::size_t instruction_start_index
) override
;
1461 virtual void handle_instruction_op_subgroup_ballot_khr(
1462 Op_subgroup_ballot_khr instruction
, std::size_t instruction_start_index
) override
;
1463 virtual void handle_instruction_op_subgroup_first_invocation_khr(
1464 Op_subgroup_first_invocation_khr instruction
, std::size_t instruction_start_index
) override
;
1465 virtual void handle_instruction_op_subgroup_all_khr(
1466 Op_subgroup_all_khr instruction
, std::size_t instruction_start_index
) override
;
1467 virtual void handle_instruction_op_subgroup_any_khr(
1468 Op_subgroup_any_khr instruction
, std::size_t instruction_start_index
) override
;
1469 virtual void handle_instruction_op_subgroup_all_equal_khr(
1470 Op_subgroup_all_equal_khr instruction
, std::size_t instruction_start_index
) override
;
1471 virtual void handle_instruction_op_subgroup_read_invocation_khr(
1472 Op_subgroup_read_invocation_khr instruction
, std::size_t instruction_start_index
) override
;
1473 virtual void handle_instruction_open_cl_std_op_acos(
1474 Open_cl_std_op_acos instruction
, std::size_t instruction_start_index
) override
;
1475 virtual void handle_instruction_open_cl_std_op_acosh(
1476 Open_cl_std_op_acosh instruction
, std::size_t instruction_start_index
) override
;
1477 virtual void handle_instruction_open_cl_std_op_acospi(
1478 Open_cl_std_op_acospi instruction
, std::size_t instruction_start_index
) override
;
1479 virtual void handle_instruction_open_cl_std_op_asin(
1480 Open_cl_std_op_asin instruction
, std::size_t instruction_start_index
) override
;
1481 virtual void handle_instruction_open_cl_std_op_asinh(
1482 Open_cl_std_op_asinh instruction
, std::size_t instruction_start_index
) override
;
1483 virtual void handle_instruction_open_cl_std_op_asinpi(
1484 Open_cl_std_op_asinpi instruction
, std::size_t instruction_start_index
) override
;
1485 virtual void handle_instruction_open_cl_std_op_atan(
1486 Open_cl_std_op_atan instruction
, std::size_t instruction_start_index
) override
;
1487 virtual void handle_instruction_open_cl_std_op_atan2(
1488 Open_cl_std_op_atan2 instruction
, std::size_t instruction_start_index
) override
;
1489 virtual void handle_instruction_open_cl_std_op_atanh(
1490 Open_cl_std_op_atanh instruction
, std::size_t instruction_start_index
) override
;
1491 virtual void handle_instruction_open_cl_std_op_atanpi(
1492 Open_cl_std_op_atanpi instruction
, std::size_t instruction_start_index
) override
;
1493 virtual void handle_instruction_open_cl_std_op_atan2pi(
1494 Open_cl_std_op_atan2pi instruction
, std::size_t instruction_start_index
) override
;
1495 virtual void handle_instruction_open_cl_std_op_cbrt(
1496 Open_cl_std_op_cbrt instruction
, std::size_t instruction_start_index
) override
;
1497 virtual void handle_instruction_open_cl_std_op_ceil(
1498 Open_cl_std_op_ceil instruction
, std::size_t instruction_start_index
) override
;
1499 virtual void handle_instruction_open_cl_std_op_copysign(
1500 Open_cl_std_op_copysign instruction
, std::size_t instruction_start_index
) override
;
1501 virtual void handle_instruction_open_cl_std_op_cos(
1502 Open_cl_std_op_cos instruction
, std::size_t instruction_start_index
) override
;
1503 virtual void handle_instruction_open_cl_std_op_cosh(
1504 Open_cl_std_op_cosh instruction
, std::size_t instruction_start_index
) override
;
1505 virtual void handle_instruction_open_cl_std_op_cospi(
1506 Open_cl_std_op_cospi instruction
, std::size_t instruction_start_index
) override
;
1507 virtual void handle_instruction_open_cl_std_op_erfc(
1508 Open_cl_std_op_erfc instruction
, std::size_t instruction_start_index
) override
;
1509 virtual void handle_instruction_open_cl_std_op_erf(
1510 Open_cl_std_op_erf instruction
, std::size_t instruction_start_index
) override
;
1511 virtual void handle_instruction_open_cl_std_op_exp(
1512 Open_cl_std_op_exp instruction
, std::size_t instruction_start_index
) override
;
1513 virtual void handle_instruction_open_cl_std_op_exp2(
1514 Open_cl_std_op_exp2 instruction
, std::size_t instruction_start_index
) override
;
1515 virtual void handle_instruction_open_cl_std_op_exp10(
1516 Open_cl_std_op_exp10 instruction
, std::size_t instruction_start_index
) override
;
1517 virtual void handle_instruction_open_cl_std_op_expm1(
1518 Open_cl_std_op_expm1 instruction
, std::size_t instruction_start_index
) override
;
1519 virtual void handle_instruction_open_cl_std_op_fabs(
1520 Open_cl_std_op_fabs instruction
, std::size_t instruction_start_index
) override
;
1521 virtual void handle_instruction_open_cl_std_op_fdim(
1522 Open_cl_std_op_fdim instruction
, std::size_t instruction_start_index
) override
;
1523 virtual void handle_instruction_open_cl_std_op_floor(
1524 Open_cl_std_op_floor instruction
, std::size_t instruction_start_index
) override
;
1525 virtual void handle_instruction_open_cl_std_op_fma(
1526 Open_cl_std_op_fma instruction
, std::size_t instruction_start_index
) override
;
1527 virtual void handle_instruction_open_cl_std_op_fmax(
1528 Open_cl_std_op_fmax instruction
, std::size_t instruction_start_index
) override
;
1529 virtual void handle_instruction_open_cl_std_op_fmin(
1530 Open_cl_std_op_fmin instruction
, std::size_t instruction_start_index
) override
;
1531 virtual void handle_instruction_open_cl_std_op_fmod(
1532 Open_cl_std_op_fmod instruction
, std::size_t instruction_start_index
) override
;
1533 virtual void handle_instruction_open_cl_std_op_fract(
1534 Open_cl_std_op_fract instruction
, std::size_t instruction_start_index
) override
;
1535 virtual void handle_instruction_open_cl_std_op_frexp(
1536 Open_cl_std_op_frexp instruction
, std::size_t instruction_start_index
) override
;
1537 virtual void handle_instruction_open_cl_std_op_hypot(
1538 Open_cl_std_op_hypot instruction
, std::size_t instruction_start_index
) override
;
1539 virtual void handle_instruction_open_cl_std_op_ilogb(
1540 Open_cl_std_op_ilogb instruction
, std::size_t instruction_start_index
) override
;
1541 virtual void handle_instruction_open_cl_std_op_ldexp(
1542 Open_cl_std_op_ldexp instruction
, std::size_t instruction_start_index
) override
;
1543 virtual void handle_instruction_open_cl_std_op_lgamma(
1544 Open_cl_std_op_lgamma instruction
, std::size_t instruction_start_index
) override
;
1545 virtual void handle_instruction_open_cl_std_op_lgamma_r(
1546 Open_cl_std_op_lgamma_r instruction
, std::size_t instruction_start_index
) override
;
1547 virtual void handle_instruction_open_cl_std_op_log(
1548 Open_cl_std_op_log instruction
, std::size_t instruction_start_index
) override
;
1549 virtual void handle_instruction_open_cl_std_op_log2(
1550 Open_cl_std_op_log2 instruction
, std::size_t instruction_start_index
) override
;
1551 virtual void handle_instruction_open_cl_std_op_log10(
1552 Open_cl_std_op_log10 instruction
, std::size_t instruction_start_index
) override
;
1553 virtual void handle_instruction_open_cl_std_op_log1p(
1554 Open_cl_std_op_log1p instruction
, std::size_t instruction_start_index
) override
;
1555 virtual void handle_instruction_open_cl_std_op_logb(
1556 Open_cl_std_op_logb instruction
, std::size_t instruction_start_index
) override
;
1557 virtual void handle_instruction_open_cl_std_op_mad(
1558 Open_cl_std_op_mad instruction
, std::size_t instruction_start_index
) override
;
1559 virtual void handle_instruction_open_cl_std_op_maxmag(
1560 Open_cl_std_op_maxmag instruction
, std::size_t instruction_start_index
) override
;
1561 virtual void handle_instruction_open_cl_std_op_minmag(
1562 Open_cl_std_op_minmag instruction
, std::size_t instruction_start_index
) override
;
1563 virtual void handle_instruction_open_cl_std_op_modf(
1564 Open_cl_std_op_modf instruction
, std::size_t instruction_start_index
) override
;
1565 virtual void handle_instruction_open_cl_std_op_nan(
1566 Open_cl_std_op_nan instruction
, std::size_t instruction_start_index
) override
;
1567 virtual void handle_instruction_open_cl_std_op_nextafter(
1568 Open_cl_std_op_nextafter instruction
, std::size_t instruction_start_index
) override
;
1569 virtual void handle_instruction_open_cl_std_op_pow(
1570 Open_cl_std_op_pow instruction
, std::size_t instruction_start_index
) override
;
1571 virtual void handle_instruction_open_cl_std_op_pown(
1572 Open_cl_std_op_pown instruction
, std::size_t instruction_start_index
) override
;
1573 virtual void handle_instruction_open_cl_std_op_powr(
1574 Open_cl_std_op_powr instruction
, std::size_t instruction_start_index
) override
;
1575 virtual void handle_instruction_open_cl_std_op_remainder(
1576 Open_cl_std_op_remainder instruction
, std::size_t instruction_start_index
) override
;
1577 virtual void handle_instruction_open_cl_std_op_remquo(
1578 Open_cl_std_op_remquo instruction
, std::size_t instruction_start_index
) override
;
1579 virtual void handle_instruction_open_cl_std_op_rint(
1580 Open_cl_std_op_rint instruction
, std::size_t instruction_start_index
) override
;
1581 virtual void handle_instruction_open_cl_std_op_rootn(
1582 Open_cl_std_op_rootn instruction
, std::size_t instruction_start_index
) override
;
1583 virtual void handle_instruction_open_cl_std_op_round(
1584 Open_cl_std_op_round instruction
, std::size_t instruction_start_index
) override
;
1585 virtual void handle_instruction_open_cl_std_op_rsqrt(
1586 Open_cl_std_op_rsqrt instruction
, std::size_t instruction_start_index
) override
;
1587 virtual void handle_instruction_open_cl_std_op_sin(
1588 Open_cl_std_op_sin instruction
, std::size_t instruction_start_index
) override
;
1589 virtual void handle_instruction_open_cl_std_op_sincos(
1590 Open_cl_std_op_sincos instruction
, std::size_t instruction_start_index
) override
;
1591 virtual void handle_instruction_open_cl_std_op_sinh(
1592 Open_cl_std_op_sinh instruction
, std::size_t instruction_start_index
) override
;
1593 virtual void handle_instruction_open_cl_std_op_sinpi(
1594 Open_cl_std_op_sinpi instruction
, std::size_t instruction_start_index
) override
;
1595 virtual void handle_instruction_open_cl_std_op_sqrt(
1596 Open_cl_std_op_sqrt instruction
, std::size_t instruction_start_index
) override
;
1597 virtual void handle_instruction_open_cl_std_op_tan(
1598 Open_cl_std_op_tan instruction
, std::size_t instruction_start_index
) override
;
1599 virtual void handle_instruction_open_cl_std_op_tanh(
1600 Open_cl_std_op_tanh instruction
, std::size_t instruction_start_index
) override
;
1601 virtual void handle_instruction_open_cl_std_op_tanpi(
1602 Open_cl_std_op_tanpi instruction
, std::size_t instruction_start_index
) override
;
1603 virtual void handle_instruction_open_cl_std_op_tgamma(
1604 Open_cl_std_op_tgamma instruction
, std::size_t instruction_start_index
) override
;
1605 virtual void handle_instruction_open_cl_std_op_trunc(
1606 Open_cl_std_op_trunc instruction
, std::size_t instruction_start_index
) override
;
1607 virtual void handle_instruction_open_cl_std_op_half_cos(
1608 Open_cl_std_op_half_cos instruction
, std::size_t instruction_start_index
) override
;
1609 virtual void handle_instruction_open_cl_std_op_half_divide(
1610 Open_cl_std_op_half_divide instruction
, std::size_t instruction_start_index
) override
;
1611 virtual void handle_instruction_open_cl_std_op_half_exp(
1612 Open_cl_std_op_half_exp instruction
, std::size_t instruction_start_index
) override
;
1613 virtual void handle_instruction_open_cl_std_op_half_exp2(
1614 Open_cl_std_op_half_exp2 instruction
, std::size_t instruction_start_index
) override
;
1615 virtual void handle_instruction_open_cl_std_op_half_exp10(
1616 Open_cl_std_op_half_exp10 instruction
, std::size_t instruction_start_index
) override
;
1617 virtual void handle_instruction_open_cl_std_op_half_log(
1618 Open_cl_std_op_half_log instruction
, std::size_t instruction_start_index
) override
;
1619 virtual void handle_instruction_open_cl_std_op_half_log2(
1620 Open_cl_std_op_half_log2 instruction
, std::size_t instruction_start_index
) override
;
1621 virtual void handle_instruction_open_cl_std_op_half_log10(
1622 Open_cl_std_op_half_log10 instruction
, std::size_t instruction_start_index
) override
;
1623 virtual void handle_instruction_open_cl_std_op_half_powr(
1624 Open_cl_std_op_half_powr instruction
, std::size_t instruction_start_index
) override
;
1625 virtual void handle_instruction_open_cl_std_op_half_recip(
1626 Open_cl_std_op_half_recip instruction
, std::size_t instruction_start_index
) override
;
1627 virtual void handle_instruction_open_cl_std_op_half_rsqrt(
1628 Open_cl_std_op_half_rsqrt instruction
, std::size_t instruction_start_index
) override
;
1629 virtual void handle_instruction_open_cl_std_op_half_sin(
1630 Open_cl_std_op_half_sin instruction
, std::size_t instruction_start_index
) override
;
1631 virtual void handle_instruction_open_cl_std_op_half_sqrt(
1632 Open_cl_std_op_half_sqrt instruction
, std::size_t instruction_start_index
) override
;
1633 virtual void handle_instruction_open_cl_std_op_half_tan(
1634 Open_cl_std_op_half_tan instruction
, std::size_t instruction_start_index
) override
;
1635 virtual void handle_instruction_open_cl_std_op_native_cos(
1636 Open_cl_std_op_native_cos instruction
, std::size_t instruction_start_index
) override
;
1637 virtual void handle_instruction_open_cl_std_op_native_divide(
1638 Open_cl_std_op_native_divide instruction
, std::size_t instruction_start_index
) override
;
1639 virtual void handle_instruction_open_cl_std_op_native_exp(
1640 Open_cl_std_op_native_exp instruction
, std::size_t instruction_start_index
) override
;
1641 virtual void handle_instruction_open_cl_std_op_native_exp2(
1642 Open_cl_std_op_native_exp2 instruction
, std::size_t instruction_start_index
) override
;
1643 virtual void handle_instruction_open_cl_std_op_native_exp10(
1644 Open_cl_std_op_native_exp10 instruction
, std::size_t instruction_start_index
) override
;
1645 virtual void handle_instruction_open_cl_std_op_native_log(
1646 Open_cl_std_op_native_log instruction
, std::size_t instruction_start_index
) override
;
1647 virtual void handle_instruction_open_cl_std_op_native_log2(
1648 Open_cl_std_op_native_log2 instruction
, std::size_t instruction_start_index
) override
;
1649 virtual void handle_instruction_open_cl_std_op_native_log10(
1650 Open_cl_std_op_native_log10 instruction
, std::size_t instruction_start_index
) override
;
1651 virtual void handle_instruction_open_cl_std_op_native_powr(
1652 Open_cl_std_op_native_powr instruction
, std::size_t instruction_start_index
) override
;
1653 virtual void handle_instruction_open_cl_std_op_native_recip(
1654 Open_cl_std_op_native_recip instruction
, std::size_t instruction_start_index
) override
;
1655 virtual void handle_instruction_open_cl_std_op_native_rsqrt(
1656 Open_cl_std_op_native_rsqrt instruction
, std::size_t instruction_start_index
) override
;
1657 virtual void handle_instruction_open_cl_std_op_native_sin(
1658 Open_cl_std_op_native_sin instruction
, std::size_t instruction_start_index
) override
;
1659 virtual void handle_instruction_open_cl_std_op_native_sqrt(
1660 Open_cl_std_op_native_sqrt instruction
, std::size_t instruction_start_index
) override
;
1661 virtual void handle_instruction_open_cl_std_op_native_tan(
1662 Open_cl_std_op_native_tan instruction
, std::size_t instruction_start_index
) override
;
1663 virtual void handle_instruction_open_cl_std_op_s_abs(
1664 Open_cl_std_op_s_abs instruction
, std::size_t instruction_start_index
) override
;
1665 virtual void handle_instruction_open_cl_std_op_s_abs_diff(
1666 Open_cl_std_op_s_abs_diff instruction
, std::size_t instruction_start_index
) override
;
1667 virtual void handle_instruction_open_cl_std_op_s_add_sat(
1668 Open_cl_std_op_s_add_sat instruction
, std::size_t instruction_start_index
) override
;
1669 virtual void handle_instruction_open_cl_std_op_u_add_sat(
1670 Open_cl_std_op_u_add_sat instruction
, std::size_t instruction_start_index
) override
;
1671 virtual void handle_instruction_open_cl_std_op_s_hadd(
1672 Open_cl_std_op_s_hadd instruction
, std::size_t instruction_start_index
) override
;
1673 virtual void handle_instruction_open_cl_std_op_u_hadd(
1674 Open_cl_std_op_u_hadd instruction
, std::size_t instruction_start_index
) override
;
1675 virtual void handle_instruction_open_cl_std_op_s_rhadd(
1676 Open_cl_std_op_s_rhadd instruction
, std::size_t instruction_start_index
) override
;
1677 virtual void handle_instruction_open_cl_std_op_u_rhadd(
1678 Open_cl_std_op_u_rhadd instruction
, std::size_t instruction_start_index
) override
;
1679 virtual void handle_instruction_open_cl_std_op_s_clamp(
1680 Open_cl_std_op_s_clamp instruction
, std::size_t instruction_start_index
) override
;
1681 virtual void handle_instruction_open_cl_std_op_u_clamp(
1682 Open_cl_std_op_u_clamp instruction
, std::size_t instruction_start_index
) override
;
1683 virtual void handle_instruction_open_cl_std_op_clz(
1684 Open_cl_std_op_clz instruction
, std::size_t instruction_start_index
) override
;
1685 virtual void handle_instruction_open_cl_std_op_ctz(
1686 Open_cl_std_op_ctz instruction
, std::size_t instruction_start_index
) override
;
1687 virtual void handle_instruction_open_cl_std_op_s_mad_hi(
1688 Open_cl_std_op_s_mad_hi instruction
, std::size_t instruction_start_index
) override
;
1689 virtual void handle_instruction_open_cl_std_op_u_mad_sat(
1690 Open_cl_std_op_u_mad_sat instruction
, std::size_t instruction_start_index
) override
;
1691 virtual void handle_instruction_open_cl_std_op_s_mad_sat(
1692 Open_cl_std_op_s_mad_sat instruction
, std::size_t instruction_start_index
) override
;
1693 virtual void handle_instruction_open_cl_std_op_s_max(
1694 Open_cl_std_op_s_max instruction
, std::size_t instruction_start_index
) override
;
1695 virtual void handle_instruction_open_cl_std_op_u_max(
1696 Open_cl_std_op_u_max instruction
, std::size_t instruction_start_index
) override
;
1697 virtual void handle_instruction_open_cl_std_op_s_min(
1698 Open_cl_std_op_s_min instruction
, std::size_t instruction_start_index
) override
;
1699 virtual void handle_instruction_open_cl_std_op_u_min(
1700 Open_cl_std_op_u_min instruction
, std::size_t instruction_start_index
) override
;
1701 virtual void handle_instruction_open_cl_std_op_s_mul_hi(
1702 Open_cl_std_op_s_mul_hi instruction
, std::size_t instruction_start_index
) override
;
1703 virtual void handle_instruction_open_cl_std_op_rotate(
1704 Open_cl_std_op_rotate instruction
, std::size_t instruction_start_index
) override
;
1705 virtual void handle_instruction_open_cl_std_op_s_sub_sat(
1706 Open_cl_std_op_s_sub_sat instruction
, std::size_t instruction_start_index
) override
;
1707 virtual void handle_instruction_open_cl_std_op_u_sub_sat(
1708 Open_cl_std_op_u_sub_sat instruction
, std::size_t instruction_start_index
) override
;
1709 virtual void handle_instruction_open_cl_std_op_u_upsample(
1710 Open_cl_std_op_u_upsample instruction
, std::size_t instruction_start_index
) override
;
1711 virtual void handle_instruction_open_cl_std_op_s_upsample(
1712 Open_cl_std_op_s_upsample instruction
, std::size_t instruction_start_index
) override
;
1713 virtual void handle_instruction_open_cl_std_op_popcount(
1714 Open_cl_std_op_popcount instruction
, std::size_t instruction_start_index
) override
;
1715 virtual void handle_instruction_open_cl_std_op_s_mad24(
1716 Open_cl_std_op_s_mad24 instruction
, std::size_t instruction_start_index
) override
;
1717 virtual void handle_instruction_open_cl_std_op_u_mad24(
1718 Open_cl_std_op_u_mad24 instruction
, std::size_t instruction_start_index
) override
;
1719 virtual void handle_instruction_open_cl_std_op_s_mul24(
1720 Open_cl_std_op_s_mul24 instruction
, std::size_t instruction_start_index
) override
;
1721 virtual void handle_instruction_open_cl_std_op_u_mul24(
1722 Open_cl_std_op_u_mul24 instruction
, std::size_t instruction_start_index
) override
;
1723 virtual void handle_instruction_open_cl_std_op_u_abs(
1724 Open_cl_std_op_u_abs instruction
, std::size_t instruction_start_index
) override
;
1725 virtual void handle_instruction_open_cl_std_op_u_abs_diff(
1726 Open_cl_std_op_u_abs_diff instruction
, std::size_t instruction_start_index
) override
;
1727 virtual void handle_instruction_open_cl_std_op_u_mul_hi(
1728 Open_cl_std_op_u_mul_hi instruction
, std::size_t instruction_start_index
) override
;
1729 virtual void handle_instruction_open_cl_std_op_u_mad_hi(
1730 Open_cl_std_op_u_mad_hi instruction
, std::size_t instruction_start_index
) override
;
1731 virtual void handle_instruction_open_cl_std_op_fclamp(
1732 Open_cl_std_op_fclamp instruction
, std::size_t instruction_start_index
) override
;
1733 virtual void handle_instruction_open_cl_std_op_degrees(
1734 Open_cl_std_op_degrees instruction
, std::size_t instruction_start_index
) override
;
1735 virtual void handle_instruction_open_cl_std_op_fmax_common(
1736 Open_cl_std_op_fmax_common instruction
, std::size_t instruction_start_index
) override
;
1737 virtual void handle_instruction_open_cl_std_op_fmin_common(
1738 Open_cl_std_op_fmin_common instruction
, std::size_t instruction_start_index
) override
;
1739 virtual void handle_instruction_open_cl_std_op_mix(
1740 Open_cl_std_op_mix instruction
, std::size_t instruction_start_index
) override
;
1741 virtual void handle_instruction_open_cl_std_op_radians(
1742 Open_cl_std_op_radians instruction
, std::size_t instruction_start_index
) override
;
1743 virtual void handle_instruction_open_cl_std_op_step(
1744 Open_cl_std_op_step instruction
, std::size_t instruction_start_index
) override
;
1745 virtual void handle_instruction_open_cl_std_op_smoothstep(
1746 Open_cl_std_op_smoothstep instruction
, std::size_t instruction_start_index
) override
;
1747 virtual void handle_instruction_open_cl_std_op_sign(
1748 Open_cl_std_op_sign instruction
, std::size_t instruction_start_index
) override
;
1749 virtual void handle_instruction_open_cl_std_op_cross(
1750 Open_cl_std_op_cross instruction
, std::size_t instruction_start_index
) override
;
1751 virtual void handle_instruction_open_cl_std_op_distance(
1752 Open_cl_std_op_distance instruction
, std::size_t instruction_start_index
) override
;
1753 virtual void handle_instruction_open_cl_std_op_length(
1754 Open_cl_std_op_length instruction
, std::size_t instruction_start_index
) override
;
1755 virtual void handle_instruction_open_cl_std_op_normalize(
1756 Open_cl_std_op_normalize instruction
, std::size_t instruction_start_index
) override
;
1757 virtual void handle_instruction_open_cl_std_op_fast_distance(
1758 Open_cl_std_op_fast_distance instruction
, std::size_t instruction_start_index
) override
;
1759 virtual void handle_instruction_open_cl_std_op_fast_length(
1760 Open_cl_std_op_fast_length instruction
, std::size_t instruction_start_index
) override
;
1761 virtual void handle_instruction_open_cl_std_op_fast_normalize(
1762 Open_cl_std_op_fast_normalize instruction
, std::size_t instruction_start_index
) override
;
1763 virtual void handle_instruction_open_cl_std_op_bitselect(
1764 Open_cl_std_op_bitselect instruction
, std::size_t instruction_start_index
) override
;
1765 virtual void handle_instruction_open_cl_std_op_select(
1766 Open_cl_std_op_select instruction
, std::size_t instruction_start_index
) override
;
1767 virtual void handle_instruction_open_cl_std_op_vloadn(
1768 Open_cl_std_op_vloadn instruction
, std::size_t instruction_start_index
) override
;
1769 virtual void handle_instruction_open_cl_std_op_vstoren(
1770 Open_cl_std_op_vstoren instruction
, std::size_t instruction_start_index
) override
;
1771 virtual void handle_instruction_open_cl_std_op_vload_half(
1772 Open_cl_std_op_vload_half instruction
, std::size_t instruction_start_index
) override
;
1773 virtual void handle_instruction_open_cl_std_op_vload_halfn(
1774 Open_cl_std_op_vload_halfn instruction
, std::size_t instruction_start_index
) override
;
1775 virtual void handle_instruction_open_cl_std_op_vstore_half(
1776 Open_cl_std_op_vstore_half instruction
, std::size_t instruction_start_index
) override
;
1777 virtual void handle_instruction_open_cl_std_op_vstore_half_r(
1778 Open_cl_std_op_vstore_half_r instruction
, std::size_t instruction_start_index
) override
;
1779 virtual void handle_instruction_open_cl_std_op_vstore_halfn(
1780 Open_cl_std_op_vstore_halfn instruction
, std::size_t instruction_start_index
) override
;
1781 virtual void handle_instruction_open_cl_std_op_vstore_halfn_r(
1782 Open_cl_std_op_vstore_halfn_r instruction
, std::size_t instruction_start_index
) override
;
1783 virtual void handle_instruction_open_cl_std_op_vloada_halfn(
1784 Open_cl_std_op_vloada_halfn instruction
, std::size_t instruction_start_index
) override
;
1785 virtual void handle_instruction_open_cl_std_op_vstorea_halfn(
1786 Open_cl_std_op_vstorea_halfn instruction
, std::size_t instruction_start_index
) override
;
1787 virtual void handle_instruction_open_cl_std_op_vstorea_halfn_r(
1788 Open_cl_std_op_vstorea_halfn_r instruction
, std::size_t instruction_start_index
) override
;
1789 virtual void handle_instruction_open_cl_std_op_shuffle(
1790 Open_cl_std_op_shuffle instruction
, std::size_t instruction_start_index
) override
;
1791 virtual void handle_instruction_open_cl_std_op_shuffle2(
1792 Open_cl_std_op_shuffle2 instruction
, std::size_t instruction_start_index
) override
;
1793 virtual void handle_instruction_open_cl_std_op_printf(
1794 Open_cl_std_op_printf instruction
, std::size_t instruction_start_index
) override
;
1795 virtual void handle_instruction_open_cl_std_op_prefetch(
1796 Open_cl_std_op_prefetch instruction
, std::size_t instruction_start_index
) override
;
1797 virtual void handle_instruction_glsl_std_450_op_round(
1798 Glsl_std_450_op_round instruction
, std::size_t instruction_start_index
) override
;
1799 virtual void handle_instruction_glsl_std_450_op_round_even(
1800 Glsl_std_450_op_round_even instruction
, std::size_t instruction_start_index
) override
;
1801 virtual void handle_instruction_glsl_std_450_op_trunc(
1802 Glsl_std_450_op_trunc instruction
, std::size_t instruction_start_index
) override
;
1803 virtual void handle_instruction_glsl_std_450_op_f_abs(
1804 Glsl_std_450_op_f_abs instruction
, std::size_t instruction_start_index
) override
;
1805 virtual void handle_instruction_glsl_std_450_op_s_abs(
1806 Glsl_std_450_op_s_abs instruction
, std::size_t instruction_start_index
) override
;
1807 virtual void handle_instruction_glsl_std_450_op_f_sign(
1808 Glsl_std_450_op_f_sign instruction
, std::size_t instruction_start_index
) override
;
1809 virtual void handle_instruction_glsl_std_450_op_s_sign(
1810 Glsl_std_450_op_s_sign instruction
, std::size_t instruction_start_index
) override
;
1811 virtual void handle_instruction_glsl_std_450_op_floor(
1812 Glsl_std_450_op_floor instruction
, std::size_t instruction_start_index
) override
;
1813 virtual void handle_instruction_glsl_std_450_op_ceil(
1814 Glsl_std_450_op_ceil instruction
, std::size_t instruction_start_index
) override
;
1815 virtual void handle_instruction_glsl_std_450_op_fract(
1816 Glsl_std_450_op_fract instruction
, std::size_t instruction_start_index
) override
;
1817 virtual void handle_instruction_glsl_std_450_op_radians(
1818 Glsl_std_450_op_radians instruction
, std::size_t instruction_start_index
) override
;
1819 virtual void handle_instruction_glsl_std_450_op_degrees(
1820 Glsl_std_450_op_degrees instruction
, std::size_t instruction_start_index
) override
;
1821 virtual void handle_instruction_glsl_std_450_op_sin(
1822 Glsl_std_450_op_sin instruction
, std::size_t instruction_start_index
) override
;
1823 virtual void handle_instruction_glsl_std_450_op_cos(
1824 Glsl_std_450_op_cos instruction
, std::size_t instruction_start_index
) override
;
1825 virtual void handle_instruction_glsl_std_450_op_tan(
1826 Glsl_std_450_op_tan instruction
, std::size_t instruction_start_index
) override
;
1827 virtual void handle_instruction_glsl_std_450_op_asin(
1828 Glsl_std_450_op_asin instruction
, std::size_t instruction_start_index
) override
;
1829 virtual void handle_instruction_glsl_std_450_op_acos(
1830 Glsl_std_450_op_acos instruction
, std::size_t instruction_start_index
) override
;
1831 virtual void handle_instruction_glsl_std_450_op_atan(
1832 Glsl_std_450_op_atan instruction
, std::size_t instruction_start_index
) override
;
1833 virtual void handle_instruction_glsl_std_450_op_sinh(
1834 Glsl_std_450_op_sinh instruction
, std::size_t instruction_start_index
) override
;
1835 virtual void handle_instruction_glsl_std_450_op_cosh(
1836 Glsl_std_450_op_cosh instruction
, std::size_t instruction_start_index
) override
;
1837 virtual void handle_instruction_glsl_std_450_op_tanh(
1838 Glsl_std_450_op_tanh instruction
, std::size_t instruction_start_index
) override
;
1839 virtual void handle_instruction_glsl_std_450_op_asinh(
1840 Glsl_std_450_op_asinh instruction
, std::size_t instruction_start_index
) override
;
1841 virtual void handle_instruction_glsl_std_450_op_acosh(
1842 Glsl_std_450_op_acosh instruction
, std::size_t instruction_start_index
) override
;
1843 virtual void handle_instruction_glsl_std_450_op_atanh(
1844 Glsl_std_450_op_atanh instruction
, std::size_t instruction_start_index
) override
;
1845 virtual void handle_instruction_glsl_std_450_op_atan2(
1846 Glsl_std_450_op_atan2 instruction
, std::size_t instruction_start_index
) override
;
1847 virtual void handle_instruction_glsl_std_450_op_pow(
1848 Glsl_std_450_op_pow instruction
, std::size_t instruction_start_index
) override
;
1849 virtual void handle_instruction_glsl_std_450_op_exp(
1850 Glsl_std_450_op_exp instruction
, std::size_t instruction_start_index
) override
;
1851 virtual void handle_instruction_glsl_std_450_op_log(
1852 Glsl_std_450_op_log instruction
, std::size_t instruction_start_index
) override
;
1853 virtual void handle_instruction_glsl_std_450_op_exp2(
1854 Glsl_std_450_op_exp2 instruction
, std::size_t instruction_start_index
) override
;
1855 virtual void handle_instruction_glsl_std_450_op_log2(
1856 Glsl_std_450_op_log2 instruction
, std::size_t instruction_start_index
) override
;
1857 virtual void handle_instruction_glsl_std_450_op_sqrt(
1858 Glsl_std_450_op_sqrt instruction
, std::size_t instruction_start_index
) override
;
1859 virtual void handle_instruction_glsl_std_450_op_inverse_sqrt(
1860 Glsl_std_450_op_inverse_sqrt instruction
, std::size_t instruction_start_index
) override
;
1861 virtual void handle_instruction_glsl_std_450_op_determinant(
1862 Glsl_std_450_op_determinant instruction
, std::size_t instruction_start_index
) override
;
1863 virtual void handle_instruction_glsl_std_450_op_matrix_inverse(
1864 Glsl_std_450_op_matrix_inverse instruction
, std::size_t instruction_start_index
) override
;
1865 virtual void handle_instruction_glsl_std_450_op_modf(
1866 Glsl_std_450_op_modf instruction
, std::size_t instruction_start_index
) override
;
1867 virtual void handle_instruction_glsl_std_450_op_modf_struct(
1868 Glsl_std_450_op_modf_struct instruction
, std::size_t instruction_start_index
) override
;
1869 virtual void handle_instruction_glsl_std_450_op_f_min(
1870 Glsl_std_450_op_f_min instruction
, std::size_t instruction_start_index
) override
;
1871 virtual void handle_instruction_glsl_std_450_op_u_min(
1872 Glsl_std_450_op_u_min instruction
, std::size_t instruction_start_index
) override
;
1873 virtual void handle_instruction_glsl_std_450_op_s_min(
1874 Glsl_std_450_op_s_min instruction
, std::size_t instruction_start_index
) override
;
1875 virtual void handle_instruction_glsl_std_450_op_f_max(
1876 Glsl_std_450_op_f_max instruction
, std::size_t instruction_start_index
) override
;
1877 virtual void handle_instruction_glsl_std_450_op_u_max(
1878 Glsl_std_450_op_u_max instruction
, std::size_t instruction_start_index
) override
;
1879 virtual void handle_instruction_glsl_std_450_op_s_max(
1880 Glsl_std_450_op_s_max instruction
, std::size_t instruction_start_index
) override
;
1881 virtual void handle_instruction_glsl_std_450_op_f_clamp(
1882 Glsl_std_450_op_f_clamp instruction
, std::size_t instruction_start_index
) override
;
1883 virtual void handle_instruction_glsl_std_450_op_u_clamp(
1884 Glsl_std_450_op_u_clamp instruction
, std::size_t instruction_start_index
) override
;
1885 virtual void handle_instruction_glsl_std_450_op_s_clamp(
1886 Glsl_std_450_op_s_clamp instruction
, std::size_t instruction_start_index
) override
;
1887 virtual void handle_instruction_glsl_std_450_op_f_mix(
1888 Glsl_std_450_op_f_mix instruction
, std::size_t instruction_start_index
) override
;
1889 virtual void handle_instruction_glsl_std_450_op_i_mix(
1890 Glsl_std_450_op_i_mix instruction
, std::size_t instruction_start_index
) override
;
1891 virtual void handle_instruction_glsl_std_450_op_step(
1892 Glsl_std_450_op_step instruction
, std::size_t instruction_start_index
) override
;
1893 virtual void handle_instruction_glsl_std_450_op_smooth_step(
1894 Glsl_std_450_op_smooth_step instruction
, std::size_t instruction_start_index
) override
;
1895 virtual void handle_instruction_glsl_std_450_op_fma(
1896 Glsl_std_450_op_fma instruction
, std::size_t instruction_start_index
) override
;
1897 virtual void handle_instruction_glsl_std_450_op_frexp(
1898 Glsl_std_450_op_frexp instruction
, std::size_t instruction_start_index
) override
;
1899 virtual void handle_instruction_glsl_std_450_op_frexp_struct(
1900 Glsl_std_450_op_frexp_struct instruction
, std::size_t instruction_start_index
) override
;
1901 virtual void handle_instruction_glsl_std_450_op_ldexp(
1902 Glsl_std_450_op_ldexp instruction
, std::size_t instruction_start_index
) override
;
1903 virtual void handle_instruction_glsl_std_450_op_pack_snorm4x8(
1904 Glsl_std_450_op_pack_snorm4x8 instruction
, std::size_t instruction_start_index
) override
;
1905 virtual void handle_instruction_glsl_std_450_op_pack_unorm4x8(
1906 Glsl_std_450_op_pack_unorm4x8 instruction
, std::size_t instruction_start_index
) override
;
1907 virtual void handle_instruction_glsl_std_450_op_pack_snorm2x16(
1908 Glsl_std_450_op_pack_snorm2x16 instruction
, std::size_t instruction_start_index
) override
;
1909 virtual void handle_instruction_glsl_std_450_op_pack_unorm2x16(
1910 Glsl_std_450_op_pack_unorm2x16 instruction
, std::size_t instruction_start_index
) override
;
1911 virtual void handle_instruction_glsl_std_450_op_pack_half2x16(
1912 Glsl_std_450_op_pack_half2x16 instruction
, std::size_t instruction_start_index
) override
;
1913 virtual void handle_instruction_glsl_std_450_op_pack_double2x32(
1914 Glsl_std_450_op_pack_double2x32 instruction
, std::size_t instruction_start_index
) override
;
1915 virtual void handle_instruction_glsl_std_450_op_unpack_snorm2x16(
1916 Glsl_std_450_op_unpack_snorm2x16 instruction
, std::size_t instruction_start_index
) override
;
1917 virtual void handle_instruction_glsl_std_450_op_unpack_unorm2x16(
1918 Glsl_std_450_op_unpack_unorm2x16 instruction
, std::size_t instruction_start_index
) override
;
1919 virtual void handle_instruction_glsl_std_450_op_unpack_half2x16(
1920 Glsl_std_450_op_unpack_half2x16 instruction
, std::size_t instruction_start_index
) override
;
1921 virtual void handle_instruction_glsl_std_450_op_unpack_snorm4x8(
1922 Glsl_std_450_op_unpack_snorm4x8 instruction
, std::size_t instruction_start_index
) override
;
1923 virtual void handle_instruction_glsl_std_450_op_unpack_unorm4x8(
1924 Glsl_std_450_op_unpack_unorm4x8 instruction
, std::size_t instruction_start_index
) override
;
1925 virtual void handle_instruction_glsl_std_450_op_unpack_double2x32(
1926 Glsl_std_450_op_unpack_double2x32 instruction
,
1927 std::size_t instruction_start_index
) override
;
1928 virtual void handle_instruction_glsl_std_450_op_length(
1929 Glsl_std_450_op_length instruction
, std::size_t instruction_start_index
) override
;
1930 virtual void handle_instruction_glsl_std_450_op_distance(
1931 Glsl_std_450_op_distance instruction
, std::size_t instruction_start_index
) override
;
1932 virtual void handle_instruction_glsl_std_450_op_cross(
1933 Glsl_std_450_op_cross instruction
, std::size_t instruction_start_index
) override
;
1934 virtual void handle_instruction_glsl_std_450_op_normalize(
1935 Glsl_std_450_op_normalize instruction
, std::size_t instruction_start_index
) override
;
1936 virtual void handle_instruction_glsl_std_450_op_face_forward(
1937 Glsl_std_450_op_face_forward instruction
, std::size_t instruction_start_index
) override
;
1938 virtual void handle_instruction_glsl_std_450_op_reflect(
1939 Glsl_std_450_op_reflect instruction
, std::size_t instruction_start_index
) override
;
1940 virtual void handle_instruction_glsl_std_450_op_refract(
1941 Glsl_std_450_op_refract instruction
, std::size_t instruction_start_index
) override
;
1942 virtual void handle_instruction_glsl_std_450_op_find_i_lsb(
1943 Glsl_std_450_op_find_i_lsb instruction
, std::size_t instruction_start_index
) override
;
1944 virtual void handle_instruction_glsl_std_450_op_find_s_msb(
1945 Glsl_std_450_op_find_s_msb instruction
, std::size_t instruction_start_index
) override
;
1946 virtual void handle_instruction_glsl_std_450_op_find_u_msb(
1947 Glsl_std_450_op_find_u_msb instruction
, std::size_t instruction_start_index
) override
;
1948 virtual void handle_instruction_glsl_std_450_op_interpolate_at_centroid(
1949 Glsl_std_450_op_interpolate_at_centroid instruction
,
1950 std::size_t instruction_start_index
) override
;
1951 virtual void handle_instruction_glsl_std_450_op_interpolate_at_sample(
1952 Glsl_std_450_op_interpolate_at_sample instruction
,
1953 std::size_t instruction_start_index
) override
;
1954 virtual void handle_instruction_glsl_std_450_op_interpolate_at_offset(
1955 Glsl_std_450_op_interpolate_at_offset instruction
,
1956 std::size_t instruction_start_index
) override
;
1957 virtual void handle_instruction_glsl_std_450_op_n_min(
1958 Glsl_std_450_op_n_min instruction
, std::size_t instruction_start_index
) override
;
1959 virtual void handle_instruction_glsl_std_450_op_n_max(
1960 Glsl_std_450_op_n_max instruction
, std::size_t instruction_start_index
) override
;
1961 virtual void handle_instruction_glsl_std_450_op_n_clamp(
1962 Glsl_std_450_op_n_clamp instruction
, std::size_t instruction_start_index
) override
;
1965 void Spirv_to_llvm::handle_header(unsigned version_number_major
,
1966 unsigned version_number_minor
,
1967 Word generator_magic_number
,
1969 [[gnu::unused
]] Word instruction_schema
)
1971 if(stage
== util::Enum_traits
<Stage
>::values
[0])
1973 input_version_number_major
= version_number_major
;
1974 input_version_number_minor
= version_number_minor
;
1975 input_generator_magic_number
= generator_magic_number
;
1976 id_states
.resize(id_bound
- 1);
1980 void Spirv_to_llvm::handle_instruction_op_nop([[gnu::unused
]] Op_nop instruction
,
1981 [[gnu::unused
]] std::size_t instruction_start_index
)
1985 void Spirv_to_llvm::handle_instruction_op_undef(Op_undef instruction
,
1986 std::size_t instruction_start_index
)
1989 throw Parser_error(instruction_start_index
,
1990 instruction_start_index
,
1991 "instruction not implemented: "
1992 + std::string(get_enumerant_name(instruction
.get_operation())));
1995 void Spirv_to_llvm::handle_instruction_op_source_continued(
1996 [[gnu::unused
]] Op_source_continued instruction
,
1997 [[gnu::unused
]] std::size_t instruction_start_index
)
2001 void Spirv_to_llvm::handle_instruction_op_source(
2002 Op_source instruction
, [[gnu::unused
]] std::size_t instruction_start_index
)
2004 if(stage
== util::Enum_traits
<Stage
>::values
[0] && instruction
.file
)
2006 std::string
filename(
2007 get_id_state(*instruction
.file
).op_string
.value_or(Op_string_state()).value
);
2008 ::LLVMSetModuleIdentifier(module
.get(), filename
.data(), filename
.size());
2012 void Spirv_to_llvm::handle_instruction_op_source_extension(
2013 [[gnu::unused
]] Op_source_extension instruction
,
2014 [[gnu::unused
]] std::size_t instruction_start_index
)
2018 void Spirv_to_llvm::handle_instruction_op_name(Op_name instruction
,
2019 [[gnu::unused
]] std::size_t instruction_start_index
)
2021 if(stage
== util::Enum_traits
<Stage
>::values
[0])
2022 get_id_state(instruction
.target
).name
= Name
{std::string(instruction
.name
)};
2025 void Spirv_to_llvm::handle_instruction_op_member_name(
2026 Op_member_name instruction
, [[gnu::unused
]] std::size_t instruction_start_index
)
2028 if(stage
== util::Enum_traits
<Stage
>::values
[0])
2030 auto &state
= get_id_state(instruction
.type
);
2031 state
.member_names
.push_back(std::move(instruction
));
2035 void Spirv_to_llvm::handle_instruction_op_string(
2036 Op_string instruction
, [[gnu::unused
]] std::size_t instruction_start_index
)
2038 if(stage
== util::Enum_traits
<Stage
>::values
[0])
2039 get_id_state(instruction
.result
).op_string
= Op_string_state
{instruction
.string
};
2042 void Spirv_to_llvm::handle_instruction_op_line(Op_line instruction
,
2043 std::size_t instruction_start_index
)
2046 throw Parser_error(instruction_start_index
,
2047 instruction_start_index
,
2048 "instruction not implemented: "
2049 + std::string(get_enumerant_name(instruction
.get_operation())));
2052 void Spirv_to_llvm::handle_instruction_op_extension(Op_extension instruction
,
2053 std::size_t instruction_start_index
)
2056 throw Parser_error(instruction_start_index
,
2057 instruction_start_index
,
2058 "instruction not implemented: "
2059 + std::string(get_enumerant_name(instruction
.get_operation())));
2062 void Spirv_to_llvm::handle_instruction_op_ext_inst_import(Op_ext_inst_import instruction
,
2063 std::size_t instruction_start_index
)
2065 if(stage
== util::Enum_traits
<Stage
>::values
[0])
2067 get_id_state(instruction
.result
).op_ext_inst_import
= Op_ext_inst_import_state
{};
2068 for(auto instruction_set
: util::Enum_traits
<Extension_instruction_set
>::values
)
2070 if(instruction_set
== Extension_instruction_set::unknown
)
2072 if(instruction
.name
== get_enumerant_name(instruction_set
))
2075 throw Parser_error(instruction_start_index
,
2076 instruction_start_index
,
2077 "unknown instruction set: \"" + std::string(instruction
.name
) + "\"");
2081 void Spirv_to_llvm::handle_instruction_op_ext_inst(Op_ext_inst instruction
,
2082 std::size_t instruction_start_index
)
2085 throw Parser_error(instruction_start_index
,
2086 instruction_start_index
,
2087 "instruction not implemented: "
2088 + std::string(get_enumerant_name(instruction
.get_operation())));
2091 void Spirv_to_llvm::handle_instruction_op_memory_model(Op_memory_model instruction
,
2092 std::size_t instruction_start_index
)
2094 if(instruction
.addressing_model
!= Addressing_model::logical
)
2095 throw Parser_error(instruction_start_index
,
2096 instruction_start_index
,
2097 "unsupported addressing model: "
2098 + std::string(get_enumerant_name(instruction
.addressing_model
)));
2099 switch(instruction
.memory_model
)
2101 case Memory_model::simple
:
2102 case Memory_model::glsl450
:
2105 throw Parser_error(instruction_start_index
,
2106 instruction_start_index
,
2107 "unsupported memory model: "
2108 + std::string(get_enumerant_name(instruction
.memory_model
)));
2112 void Spirv_to_llvm::handle_instruction_op_entry_point(Op_entry_point instruction
,
2113 std::size_t instruction_start_index
)
2115 if(stage
== util::Enum_traits
<Stage
>::values
[0])
2117 auto &state
= get_id_state(instruction
.entry_point
);
2118 state
.op_entry_points
.push_back(
2119 Op_entry_point_state
{std::move(instruction
), instruction_start_index
});
2123 void Spirv_to_llvm::handle_instruction_op_execution_mode(Op_execution_mode instruction
,
2124 std::size_t instruction_start_index
)
2126 if(stage
== util::Enum_traits
<Stage
>::values
[0])
2128 auto &state
= get_id_state(instruction
.entry_point
);
2129 if(state
.op_entry_points
.empty())
2130 throw Parser_error(instruction_start_index
,
2131 instruction_start_index
,
2132 "entry point not defined in OpExecutionMode");
2133 if(state
.op_entry_points
.back().execution_mode
)
2135 instruction_start_index
, instruction_start_index
, "execution mode already set");
2136 state
.op_entry_points
.back().execution_mode
= std::move(instruction
.mode
);
2140 void Spirv_to_llvm::handle_instruction_op_capability(Op_capability instruction
,
2141 std::size_t instruction_start_index
)
2143 if(stage
== util::Enum_traits
<Stage
>::values
[0])
2145 util::Enum_set
<Capability
> work_list
{instruction
.capability
};
2146 while(!work_list
.empty())
2148 auto capability
= *work_list
.begin();
2149 work_list
.erase(capability
);
2150 if(std::get
<1>(enabled_capabilities
.insert(capability
)))
2152 auto additional_capabilities
= get_directly_required_capabilities(capability
);
2153 work_list
.insert(additional_capabilities
.begin(), additional_capabilities
.end());
2156 constexpr util::Enum_set
<Capability
> implemented_capabilities
{
2159 Capability::input_attachment
,
2160 Capability::sampled1d
,
2161 Capability::image1d
,
2162 Capability::sampled_buffer
,
2163 Capability::image_buffer
,
2164 Capability::image_query
,
2165 Capability::derivative_control
,
2168 for(auto capability
: enabled_capabilities
)
2170 if(implemented_capabilities
.count(capability
) == 0)
2172 instruction_start_index
,
2173 instruction_start_index
,
2174 "capability not implemented: " + std::string(get_enumerant_name(capability
)));
2179 void Spirv_to_llvm::handle_instruction_op_type_void(
2180 Op_type_void instruction
, [[gnu::unused
]] std::size_t instruction_start_index
)
2184 case Stage::calculate_types
:
2186 auto &state
= get_id_state(instruction
.result
);
2187 if(!state
.decorations
.empty())
2188 throw Parser_error(instruction_start_index
,
2189 instruction_start_index
,
2190 "decorations on instruction not implemented: "
2191 + std::string(get_enumerant_name(instruction
.get_operation())));
2192 state
.type
= std::make_shared
<Simple_type_descriptor
>(
2193 state
.decorations
, LLVM_type_and_alignment(::LLVMVoidTypeInContext(context
), 1));
2196 case Stage::generate_code
:
2201 void Spirv_to_llvm::handle_instruction_op_type_bool(Op_type_bool instruction
,
2202 std::size_t instruction_start_index
)
2205 throw Parser_error(instruction_start_index
,
2206 instruction_start_index
,
2207 "instruction not implemented: "
2208 + std::string(get_enumerant_name(instruction
.get_operation())));
2211 void Spirv_to_llvm::handle_instruction_op_type_int(Op_type_int instruction
,
2212 std::size_t instruction_start_index
)
2216 case Stage::calculate_types
:
2218 auto &state
= get_id_state(instruction
.result
);
2219 if(!state
.decorations
.empty())
2220 throw Parser_error(instruction_start_index
,
2221 instruction_start_index
,
2222 "decorations on instruction not implemented: "
2223 + std::string(get_enumerant_name(instruction
.get_operation())));
2224 switch(instruction
.width
)
2231 auto type
= ::LLVMIntTypeInContext(context
, instruction
.width
);
2232 state
.type
= std::make_shared
<Simple_type_descriptor
>(
2234 LLVM_type_and_alignment(type
, ::LLVMPreferredAlignmentOfType(target_data
, type
)));
2239 instruction_start_index
, instruction_start_index
, "invalid int width");
2243 case Stage::generate_code
:
2248 void Spirv_to_llvm::handle_instruction_op_type_float(Op_type_float instruction
,
2249 std::size_t instruction_start_index
)
2253 case Stage::calculate_types
:
2255 auto &state
= get_id_state(instruction
.result
);
2256 if(!state
.decorations
.empty())
2257 throw Parser_error(instruction_start_index
,
2258 instruction_start_index
,
2259 "decorations on instruction not implemented: "
2260 + std::string(get_enumerant_name(instruction
.get_operation())));
2261 ::LLVMTypeRef type
= nullptr;
2262 switch(instruction
.width
)
2265 type
= ::LLVMHalfTypeInContext(context
);
2268 type
= ::LLVMFloatTypeInContext(context
);
2271 type
= ::LLVMDoubleTypeInContext(context
);
2275 instruction_start_index
, instruction_start_index
, "invalid float width");
2277 state
.type
= std::make_shared
<Simple_type_descriptor
>(
2279 LLVM_type_and_alignment(type
, ::LLVMPreferredAlignmentOfType(target_data
, type
)));
2282 case Stage::generate_code
:
2287 void Spirv_to_llvm::handle_instruction_op_type_vector(Op_type_vector instruction
,
2288 std::size_t instruction_start_index
)
2292 case Stage::calculate_types
:
2294 auto &state
= get_id_state(instruction
.result
);
2295 if(!state
.decorations
.empty())
2296 throw Parser_error(instruction_start_index
,
2297 instruction_start_index
,
2298 "decorations on instruction not implemented: "
2299 + std::string(get_enumerant_name(instruction
.get_operation())));
2300 state
.type
= std::make_shared
<Vector_type_descriptor
>(
2302 get_type
<Simple_type_descriptor
>(instruction
.component_type
, instruction_start_index
),
2303 instruction
.component_count
,
2307 case Stage::generate_code
:
2312 void Spirv_to_llvm::handle_instruction_op_type_matrix(Op_type_matrix instruction
,
2313 std::size_t instruction_start_index
)
2317 case Stage::calculate_types
:
2319 auto &state
= get_id_state(instruction
.result
);
2320 if(!state
.decorations
.empty())
2321 throw Parser_error(instruction_start_index
,
2322 instruction_start_index
,
2323 "decorations on instruction not implemented: "
2324 + std::string(get_enumerant_name(instruction
.get_operation())));
2325 state
.type
= std::make_shared
<Matrix_type_descriptor
>(
2327 get_type
<Vector_type_descriptor
>(instruction
.column_type
, instruction_start_index
),
2328 instruction
.column_count
,
2332 case Stage::generate_code
:
2337 void Spirv_to_llvm::handle_instruction_op_type_image(Op_type_image instruction
,
2338 std::size_t instruction_start_index
)
2341 throw Parser_error(instruction_start_index
,
2342 instruction_start_index
,
2343 "instruction not implemented: "
2344 + std::string(get_enumerant_name(instruction
.get_operation())));
2347 void Spirv_to_llvm::handle_instruction_op_type_sampler(Op_type_sampler instruction
,
2348 std::size_t instruction_start_index
)
2351 throw Parser_error(instruction_start_index
,
2352 instruction_start_index
,
2353 "instruction not implemented: "
2354 + std::string(get_enumerant_name(instruction
.get_operation())));
2357 void Spirv_to_llvm::handle_instruction_op_type_sampled_image(Op_type_sampled_image instruction
,
2358 std::size_t instruction_start_index
)
2361 throw Parser_error(instruction_start_index
,
2362 instruction_start_index
,
2363 "instruction not implemented: "
2364 + std::string(get_enumerant_name(instruction
.get_operation())));
2367 void Spirv_to_llvm::handle_instruction_op_type_array(Op_type_array instruction
,
2368 std::size_t instruction_start_index
)
2372 case Stage::calculate_types
:
2374 auto &state
= get_id_state(instruction
.result
);
2375 if(!state
.decorations
.empty())
2376 throw Parser_error(instruction_start_index
,
2377 instruction_start_index
,
2378 "decorations on instruction not implemented: "
2379 + std::string(get_enumerant_name(instruction
.get_operation())));
2380 auto length
= get_unsigned_integer_constant(instruction
.length
, instruction_start_index
);
2382 throw Parser_error(instruction_start_index
,
2383 instruction_start_index
,
2384 "OpTypeArray length must be a positive constant integer");
2385 state
.type
= std::make_shared
<Array_type_descriptor
>(
2387 get_type(instruction
.element_type
, instruction_start_index
),
2389 instruction_start_index
);
2392 case Stage::generate_code
:
2397 void Spirv_to_llvm::handle_instruction_op_type_runtime_array(Op_type_runtime_array instruction
,
2398 std::size_t instruction_start_index
)
2401 throw Parser_error(instruction_start_index
,
2402 instruction_start_index
,
2403 "instruction not implemented: "
2404 + std::string(get_enumerant_name(instruction
.get_operation())));
2407 void Spirv_to_llvm::handle_instruction_op_type_struct(Op_type_struct instruction
,
2408 std::size_t instruction_start_index
)
2412 case Stage::calculate_types
:
2414 auto &state
= get_id_state(instruction
.result
);
2415 std::vector
<Struct_type_descriptor::Member
> members
;
2416 members
.reserve(instruction
.member_0_type_member_1_type
.size());
2417 for(auto &member_id
: instruction
.member_0_type_member_1_type
)
2419 Struct_type_descriptor::Member({}, get_type(member_id
, instruction_start_index
)));
2420 for(auto &decoration
: state
.member_decorations
)
2422 if(decoration
.member
>= members
.size())
2423 throw Parser_error(instruction_start_index
,
2424 instruction_start_index
,
2425 "member decoration's member index is out of range");
2426 auto &member
= members
[decoration
.member
];
2427 member
.decorations
.push_back(decoration
.decoration
);
2429 state
.type
= std::make_shared
<Struct_type_descriptor
>(
2432 ::LLVMGetModuleDataLayout(module
.get()),
2433 get_prefixed_name(get_name(instruction
.result
)).c_str(),
2434 instruction_start_index
,
2435 std::move(members
));
2438 case Stage::generate_code
:
2443 void Spirv_to_llvm::handle_instruction_op_type_opaque(Op_type_opaque instruction
,
2444 std::size_t instruction_start_index
)
2447 throw Parser_error(instruction_start_index
,
2448 instruction_start_index
,
2449 "instruction not implemented: "
2450 + std::string(get_enumerant_name(instruction
.get_operation())));
2453 void Spirv_to_llvm::handle_instruction_op_type_pointer(Op_type_pointer instruction
,
2454 std::size_t instruction_start_index
)
2458 case Stage::calculate_types
:
2460 auto &state
= get_id_state(instruction
.result
);
2461 if(!state
.decorations
.empty())
2462 throw Parser_error(instruction_start_index
,
2463 instruction_start_index
,
2464 "decorations on instruction not implemented: "
2465 + std::string(get_enumerant_name(instruction
.get_operation())));
2468 state
.type
= std::make_shared
<Pointer_type_descriptor
>(
2470 get_type(instruction
.type
, instruction_start_index
),
2471 instruction_start_index
,
2474 else if(auto *pointer_type
= dynamic_cast<Pointer_type_descriptor
*>(state
.type
.get()))
2476 if(pointer_type
->get_base_type())
2477 throw Parser_error(instruction_start_index
,
2478 instruction_start_index
,
2479 "result type is not a pointer forward declaration");
2480 pointer_type
->set_base_type(get_type(instruction
.type
, instruction_start_index
));
2484 throw Parser_error(instruction_start_index
,
2485 instruction_start_index
,
2486 "result type is not a pointer forward declaration");
2490 case Stage::generate_code
:
2495 void Spirv_to_llvm::handle_instruction_op_type_function(Op_type_function instruction
,
2496 std::size_t instruction_start_index
)
2500 case Stage::calculate_types
:
2502 std::vector
<std::shared_ptr
<Type_descriptor
>> args
;
2503 args
.reserve(implicit_function_arguments
.size()
2504 + instruction
.parameter_0_type_parameter_1_type
.size());
2505 for(auto &arg
: implicit_function_arguments
)
2506 args
.push_back(arg
);
2507 for(Id_ref type
: instruction
.parameter_0_type_parameter_1_type
)
2508 args
.push_back(get_type(type
, instruction_start_index
));
2509 auto &state
= get_id_state(instruction
.result
);
2510 if(!state
.decorations
.empty())
2511 throw Parser_error(instruction_start_index
,
2512 instruction_start_index
,
2513 "decorations on instruction not implemented: "
2514 + std::string(get_enumerant_name(instruction
.get_operation())));
2515 state
.type
= std::make_shared
<Function_type_descriptor
>(
2517 get_type(instruction
.return_type
, instruction_start_index
),
2519 instruction_start_index
,
2523 case Stage::generate_code
:
2528 void Spirv_to_llvm::handle_instruction_op_type_event(Op_type_event instruction
,
2529 std::size_t instruction_start_index
)
2532 throw Parser_error(instruction_start_index
,
2533 instruction_start_index
,
2534 "instruction not implemented: "
2535 + std::string(get_enumerant_name(instruction
.get_operation())));
2538 void Spirv_to_llvm::handle_instruction_op_type_device_event(Op_type_device_event instruction
,
2539 std::size_t instruction_start_index
)
2542 throw Parser_error(instruction_start_index
,
2543 instruction_start_index
,
2544 "instruction not implemented: "
2545 + std::string(get_enumerant_name(instruction
.get_operation())));
2548 void Spirv_to_llvm::handle_instruction_op_type_reserve_id(Op_type_reserve_id instruction
,
2549 std::size_t instruction_start_index
)
2552 throw Parser_error(instruction_start_index
,
2553 instruction_start_index
,
2554 "instruction not implemented: "
2555 + std::string(get_enumerant_name(instruction
.get_operation())));
2558 void Spirv_to_llvm::handle_instruction_op_type_queue(Op_type_queue instruction
,
2559 std::size_t instruction_start_index
)
2562 throw Parser_error(instruction_start_index
,
2563 instruction_start_index
,
2564 "instruction not implemented: "
2565 + std::string(get_enumerant_name(instruction
.get_operation())));
2568 void Spirv_to_llvm::handle_instruction_op_type_pipe(Op_type_pipe instruction
,
2569 std::size_t instruction_start_index
)
2572 throw Parser_error(instruction_start_index
,
2573 instruction_start_index
,
2574 "instruction not implemented: "
2575 + std::string(get_enumerant_name(instruction
.get_operation())));
2578 void Spirv_to_llvm::handle_instruction_op_type_forward_pointer(Op_type_forward_pointer instruction
,
2579 std::size_t instruction_start_index
)
2582 throw Parser_error(instruction_start_index
,
2583 instruction_start_index
,
2584 "instruction not implemented: "
2585 + std::string(get_enumerant_name(instruction
.get_operation())));
2588 void Spirv_to_llvm::handle_instruction_op_constant_true(Op_constant_true instruction
,
2589 std::size_t instruction_start_index
)
2592 throw Parser_error(instruction_start_index
,
2593 instruction_start_index
,
2594 "instruction not implemented: "
2595 + std::string(get_enumerant_name(instruction
.get_operation())));
2598 void Spirv_to_llvm::handle_instruction_op_constant_false(Op_constant_false instruction
,
2599 std::size_t instruction_start_index
)
2602 throw Parser_error(instruction_start_index
,
2603 instruction_start_index
,
2604 "instruction not implemented: "
2605 + std::string(get_enumerant_name(instruction
.get_operation())));
2608 void Spirv_to_llvm::handle_instruction_op_constant(Op_constant instruction
,
2609 std::size_t instruction_start_index
)
2613 case Stage::calculate_types
:
2615 auto &state
= get_id_state(instruction
.result
);
2616 if(!state
.decorations
.empty())
2617 throw Parser_error(instruction_start_index
,
2618 instruction_start_index
,
2619 "decorations on instruction not implemented: "
2620 + std::string(get_enumerant_name(instruction
.get_operation())));
2621 auto type
= get_type(instruction
.result_type
, instruction_start_index
);
2622 if(auto *simple_type
= dynamic_cast<Simple_type_descriptor
*>(type
.get()))
2624 auto llvm_type
= simple_type
->get_or_make_type();
2625 switch(::LLVMGetTypeKind(llvm_type
.type
))
2627 case LLVMFloatTypeKind
:
2629 if(instruction
.value
.size() != 1)
2630 throw Parser_error(instruction_start_index
,
2631 instruction_start_index
,
2632 "OpConstant immediate value is wrong size for type float32");
2633 state
.constant
= std::make_shared
<Simple_constant_descriptor
>(
2637 ::LLVMInt32TypeInContext(context
), instruction
.value
[0], false),
2641 case LLVMIntegerTypeKind
:
2643 switch(::LLVMGetIntTypeWidth(llvm_type
.type
))
2647 if(instruction
.value
.size() != 1)
2649 instruction_start_index
,
2650 instruction_start_index
,
2651 "OpConstant immediate value is wrong size for type int16");
2652 state
.constant
= std::make_shared
<Simple_constant_descriptor
>(
2653 type
, ::LLVMConstInt(llvm_type
.type
, instruction
.value
[0], false));
2658 if(instruction
.value
.size() != 1)
2660 instruction_start_index
,
2661 instruction_start_index
,
2662 "OpConstant immediate value is wrong size for type int32");
2663 state
.constant
= std::make_shared
<Simple_constant_descriptor
>(
2664 type
, ::LLVMConstInt(llvm_type
.type
, instruction
.value
[0], false));
2669 if(instruction
.value
.size() != 2)
2671 instruction_start_index
,
2672 instruction_start_index
,
2673 "OpConstant immediate value is wrong size for type int64");
2674 state
.constant
= std::make_shared
<Simple_constant_descriptor
>(
2676 ::LLVMConstInt(llvm_type
.type
,
2677 (static_cast<std::uint64_t>(instruction
.value
[1]) << 32)
2678 | instruction
.value
[0],
2685 instruction_start_index
,
2686 instruction_start_index
,
2687 "unimplemented simple type for OpConstant: "
2688 + std::string(llvm_wrapper::print_type_to_string(llvm_type
.type
)));
2692 case LLVMDoubleTypeKind
:
2694 if(instruction
.value
.size() != 2)
2695 throw Parser_error(instruction_start_index
,
2696 instruction_start_index
,
2697 "OpConstant immediate value is wrong size for type float64");
2698 state
.constant
= std::make_shared
<Simple_constant_descriptor
>(
2701 ::LLVMConstInt(::LLVMInt64TypeInContext(context
),
2702 (static_cast<std::uint64_t>(instruction
.value
[1]) << 32)
2703 | instruction
.value
[0],
2708 case LLVMHalfTypeKind
:
2710 if(instruction
.value
.size() != 1)
2711 throw Parser_error(instruction_start_index
,
2712 instruction_start_index
,
2713 "OpConstant immediate value is wrong size for type float16");
2714 state
.constant
= std::make_shared
<Simple_constant_descriptor
>(
2718 ::LLVMInt16TypeInContext(context
), instruction
.value
[0], false),
2725 instruction_start_index
,
2726 instruction_start_index
,
2727 "unimplemented simple type for OpConstant: "
2728 + std::string(llvm_wrapper::print_type_to_string(llvm_type
.type
)));
2734 throw Parser_error(instruction_start_index
,
2735 instruction_start_index
,
2736 "unimplemented type for OpConstant");
2740 case Stage::generate_code
:
2742 auto &state
= get_id_state(instruction
.result
);
2743 state
.value
= Value(state
.constant
->get_or_make_value(),
2744 get_type(instruction
.result_type
, instruction_start_index
));
2750 void Spirv_to_llvm::handle_instruction_op_constant_composite(Op_constant_composite instruction
,
2751 std::size_t instruction_start_index
)
2754 throw Parser_error(instruction_start_index
,
2755 instruction_start_index
,
2756 "instruction not implemented: "
2757 + std::string(get_enumerant_name(instruction
.get_operation())));
2760 void Spirv_to_llvm::handle_instruction_op_constant_sampler(Op_constant_sampler instruction
,
2761 std::size_t instruction_start_index
)
2764 throw Parser_error(instruction_start_index
,
2765 instruction_start_index
,
2766 "instruction not implemented: "
2767 + std::string(get_enumerant_name(instruction
.get_operation())));
2770 void Spirv_to_llvm::handle_instruction_op_constant_null(Op_constant_null instruction
,
2771 std::size_t instruction_start_index
)
2774 throw Parser_error(instruction_start_index
,
2775 instruction_start_index
,
2776 "instruction not implemented: "
2777 + std::string(get_enumerant_name(instruction
.get_operation())));
2780 void Spirv_to_llvm::handle_instruction_op_spec_constant_true(Op_spec_constant_true instruction
,
2781 std::size_t instruction_start_index
)
2784 throw Parser_error(instruction_start_index
,
2785 instruction_start_index
,
2786 "instruction not implemented: "
2787 + std::string(get_enumerant_name(instruction
.get_operation())));
2790 void Spirv_to_llvm::handle_instruction_op_spec_constant_false(Op_spec_constant_false instruction
,
2791 std::size_t instruction_start_index
)
2794 throw Parser_error(instruction_start_index
,
2795 instruction_start_index
,
2796 "instruction not implemented: "
2797 + std::string(get_enumerant_name(instruction
.get_operation())));
2800 void Spirv_to_llvm::handle_instruction_op_spec_constant(Op_spec_constant instruction
,
2801 std::size_t instruction_start_index
)
2804 throw Parser_error(instruction_start_index
,
2805 instruction_start_index
,
2806 "instruction not implemented: "
2807 + std::string(get_enumerant_name(instruction
.get_operation())));
2810 void Spirv_to_llvm::handle_instruction_op_spec_constant_composite(
2811 Op_spec_constant_composite instruction
, std::size_t instruction_start_index
)
2814 throw Parser_error(instruction_start_index
,
2815 instruction_start_index
,
2816 "instruction not implemented: "
2817 + std::string(get_enumerant_name(instruction
.get_operation())));
2820 void Spirv_to_llvm::handle_instruction_op_spec_constant_op(Op_spec_constant_op instruction
,
2821 std::size_t instruction_start_index
)
2824 throw Parser_error(instruction_start_index
,
2825 instruction_start_index
,
2826 "instruction not implemented: "
2827 + std::string(get_enumerant_name(instruction
.get_operation())));
2830 void Spirv_to_llvm::handle_instruction_op_function(Op_function instruction
,
2831 std::size_t instruction_start_index
)
2833 if(current_function_id
)
2834 throw Parser_error(instruction_start_index
,
2835 instruction_start_index
,
2836 "missing OpFunctionEnd before starting a new function");
2837 current_function_id
= instruction
.result
;
2840 case Stage::calculate_types
:
2842 case Stage::generate_code
:
2844 auto &state
= get_id_state(current_function_id
);
2845 if(!state
.decorations
.empty())
2846 throw Parser_error(instruction_start_index
,
2847 instruction_start_index
,
2848 "decorations on instruction not implemented: "
2849 + std::string(get_enumerant_name(instruction
.get_operation())));
2850 auto function_type
=
2851 get_type
<Function_type_descriptor
>(instruction
.function_type
, instruction_start_index
);
2852 auto function_name
= get_name(current_function_id
);
2853 if(function_name
.empty() && state
.op_entry_points
.size() == 1)
2854 function_name
= std::string(state
.op_entry_points
[0].entry_point
.name
);
2855 function_name
= get_or_make_prefixed_name(std::move(function_name
));
2856 auto function
= ::LLVMAddFunction(
2857 module
.get(), function_name
.c_str(), function_type
->get_or_make_type().type
);
2858 llvm_wrapper::Module::set_function_target_machine(function
, target_machine
);
2859 state
.function
= Function_state(function_type
, function
, std::move(function_name
));
2865 void Spirv_to_llvm::handle_instruction_op_function_parameter(Op_function_parameter instruction
,
2866 std::size_t instruction_start_index
)
2869 throw Parser_error(instruction_start_index
,
2870 instruction_start_index
,
2871 "instruction not implemented: "
2872 + std::string(get_enumerant_name(instruction
.get_operation())));
2875 void Spirv_to_llvm::handle_instruction_op_function_end([[gnu::unused
]] Op_function_end instruction
,
2876 std::size_t instruction_start_index
)
2878 if(!current_function_id
)
2879 throw Parser_error(instruction_start_index
,
2880 instruction_start_index
,
2881 "OpFunctionEnd without matching OpFunction");
2882 current_function_id
= 0;
2885 case Stage::calculate_types
:
2887 case Stage::generate_code
:
2892 void Spirv_to_llvm::handle_instruction_op_function_call(Op_function_call instruction
,
2893 std::size_t instruction_start_index
)
2896 throw Parser_error(instruction_start_index
,
2897 instruction_start_index
,
2898 "instruction not implemented: "
2899 + std::string(get_enumerant_name(instruction
.get_operation())));
2902 void Spirv_to_llvm::handle_instruction_op_variable(Op_variable instruction
,
2903 std::size_t instruction_start_index
)
2907 case Stage::calculate_types
:
2909 auto &state
= get_id_state(instruction
.result
);
2910 bool check_decorations
= true;
2913 switch(instruction
.storage_class
)
2915 case Storage_class::uniform_constant
:
2916 #warning finish implementing Storage_class::uniform_constant
2918 case Storage_class::input
:
2920 if(instruction
.initializer
)
2921 throw Parser_error(instruction_start_index
,
2922 instruction_start_index
,
2923 "shader input variable initializers are not implemented");
2924 auto type
= get_type
<Pointer_type_descriptor
>(instruction
.result_type
,
2925 instruction_start_index
)
2928 Input_variable_state
{type
,
2929 inputs_struct
->add_member(Struct_type_descriptor::Member(
2930 state
.decorations
, type
))};
2931 check_decorations
= false;
2934 case Storage_class::uniform
:
2935 #warning finish implementing Storage_class::uniform
2937 case Storage_class::output
:
2939 if(instruction
.initializer
)
2940 throw Parser_error(instruction_start_index
,
2941 instruction_start_index
,
2942 "shader output variable initializers are not implemented");
2943 auto type
= get_type
<Pointer_type_descriptor
>(instruction
.result_type
,
2944 instruction_start_index
)
2947 Output_variable_state
{type
,
2948 outputs_struct
->add_member(Struct_type_descriptor::Member(
2949 state
.decorations
, type
))};
2950 check_decorations
= false;
2953 case Storage_class::workgroup
:
2954 #warning finish implementing Storage_class::workgroup
2956 case Storage_class::cross_workgroup
:
2957 #warning finish implementing Storage_class::cross_workgroup
2959 case Storage_class::private_
:
2960 #warning finish implementing Storage_class::private_
2962 case Storage_class::function
:
2964 if(!current_function_id
)
2965 throw Parser_error(instruction_start_index
,
2966 instruction_start_index
,
2967 "function-local variable must be inside function");
2970 case Storage_class::generic
:
2971 #warning finish implementing Storage_class::generic
2973 case Storage_class::push_constant
:
2974 #warning finish implementing Storage_class::push_constant
2976 case Storage_class::atomic_counter
:
2977 #warning finish implementing Storage_class::atomic_counter
2979 case Storage_class::image
:
2980 #warning finish implementing Storage_class::image
2982 case Storage_class::storage_buffer
:
2983 #warning finish implementing Storage_class::storage_buffer
2986 throw Parser_error(instruction_start_index
,
2987 instruction_start_index
,
2988 "unimplemented OpVariable storage class: "
2989 + std::string(get_enumerant_name(instruction
.storage_class
)));
2991 if(check_decorations
)
2993 for(auto &decoration
: state
.decorations
)
2995 switch(decoration
.value
)
2997 case Decoration::relaxed_precision
:
2998 #warning finish implementing Decoration::relaxed_precision
3000 case Decoration::spec_id
:
3001 #warning finish implementing Decoration::spec_id
3003 case Decoration::block
:
3004 #warning finish implementing Decoration::block
3006 case Decoration::buffer_block
:
3007 #warning finish implementing Decoration::buffer_block
3009 case Decoration::row_major
:
3010 #warning finish implementing Decoration::row_major
3012 case Decoration::col_major
:
3013 #warning finish implementing Decoration::col_major
3015 case Decoration::array_stride
:
3016 #warning finish implementing Decoration::array_stride
3018 case Decoration::matrix_stride
:
3019 #warning finish implementing Decoration::matrix_stride
3021 case Decoration::glsl_shared
:
3022 #warning finish implementing Decoration::glsl_shared
3024 case Decoration::glsl_packed
:
3025 #warning finish implementing Decoration::glsl_packed
3027 case Decoration::c_packed
:
3028 #warning finish implementing Decoration::c_packed
3030 case Decoration::built_in
:
3031 #warning finish implementing Decoration::built_in
3033 case Decoration::no_perspective
:
3034 #warning finish implementing Decoration::no_perspective
3036 case Decoration::flat
:
3037 #warning finish implementing Decoration::flat
3039 case Decoration::patch
:
3040 #warning finish implementing Decoration::patch
3042 case Decoration::centroid
:
3043 #warning finish implementing Decoration::centroid
3045 case Decoration::sample
:
3046 #warning finish implementing Decoration::sample
3048 case Decoration::invariant
:
3049 #warning finish implementing Decoration::invariant
3051 case Decoration::restrict
:
3052 #warning finish implementing Decoration::restrict
3054 case Decoration::aliased
:
3055 #warning finish implementing Decoration::aliased
3057 case Decoration::volatile_
:
3058 #warning finish implementing Decoration::volatile_
3060 case Decoration::constant
:
3061 #warning finish implementing Decoration::constant
3063 case Decoration::coherent
:
3064 #warning finish implementing Decoration::coherent
3066 case Decoration::non_writable
:
3067 #warning finish implementing Decoration::non_writable
3069 case Decoration::non_readable
:
3070 #warning finish implementing Decoration::non_readable
3072 case Decoration::uniform
:
3073 #warning finish implementing Decoration::uniform
3075 case Decoration::saturated_conversion
:
3076 #warning finish implementing Decoration::saturated_conversion
3078 case Decoration::stream
:
3079 #warning finish implementing Decoration::stream
3081 case Decoration::location
:
3082 #warning finish implementing Decoration::location
3084 case Decoration::component
:
3085 #warning finish implementing Decoration::component
3087 case Decoration::index
:
3088 #warning finish implementing Decoration::index
3090 case Decoration::binding
:
3091 #warning finish implementing Decoration::binding
3093 case Decoration::descriptor_set
:
3094 #warning finish implementing Decoration::descriptor_set
3096 case Decoration::offset
:
3097 #warning finish implementing Decoration::offset
3099 case Decoration::xfb_buffer
:
3100 #warning finish implementing Decoration::xfb_buffer
3102 case Decoration::xfb_stride
:
3103 #warning finish implementing Decoration::xfb_stride
3105 case Decoration::func_param_attr
:
3106 #warning finish implementing Decoration::func_param_attr
3108 case Decoration::fp_rounding_mode
:
3109 #warning finish implementing Decoration::fp_rounding_mode
3111 case Decoration::fp_fast_math_mode
:
3112 #warning finish implementing Decoration::fp_fast_math_mode
3114 case Decoration::linkage_attributes
:
3115 #warning finish implementing Decoration::linkage_attributes
3117 case Decoration::no_contraction
:
3118 #warning finish implementing Decoration::no_contraction
3120 case Decoration::input_attachment_index
:
3121 #warning finish implementing Decoration::input_attachment_index
3123 case Decoration::alignment
:
3124 #warning finish implementing Decoration::alignment
3126 case Decoration::max_byte_offset
:
3127 #warning finish implementing Decoration::max_byte_offset
3129 case Decoration::alignment_id
:
3130 #warning finish implementing Decoration::alignment_id
3132 case Decoration::max_byte_offset_id
:
3133 #warning finish implementing Decoration::max_byte_offset_id
3135 case Decoration::override_coverage_nv
:
3136 #warning finish implementing Decoration::override_coverage_nv
3138 case Decoration::passthrough_nv
:
3139 #warning finish implementing Decoration::passthrough_nv
3141 case Decoration::viewport_relative_nv
:
3142 #warning finish implementing Decoration::viewport_relative_nv
3144 case Decoration::secondary_viewport_relative_nv
:
3145 #warning finish implementing Decoration::secondary_viewport_relative_nv
3148 throw Parser_error(instruction_start_index
,
3149 instruction_start_index
,
3150 "unimplemented decoration on OpVariable: "
3151 + std::string(get_enumerant_name(decoration
.value
)));
3156 case Stage::generate_code
:
3158 auto &state
= get_id_state(instruction
.result
);
3159 switch(instruction
.storage_class
)
3161 case Storage_class::uniform_constant
:
3162 #warning finish implementing Storage_class::uniform_constant
3164 case Storage_class::input
:
3166 if(instruction
.initializer
)
3167 throw Parser_error(instruction_start_index
,
3168 instruction_start_index
,
3169 "shader input variable initializers are not implemented");
3170 auto set_value_fn
= [this, instruction
, &state
, instruction_start_index
]()
3172 auto &variable
= util::get
<Input_variable_state
>(state
.variable
);
3173 state
.value
= Value(
3174 ::LLVMBuildStructGEP(
3176 get_id_state(current_function_id
).function
->entry_block
->inputs_struct
,
3177 inputs_struct
->get_members(true)[variable
.member_index
].llvm_member_index
,
3178 get_name(instruction
.result
).c_str()),
3179 get_type(instruction
.result_type
, instruction_start_index
));
3181 if(current_function_id
)
3184 function_entry_block_handlers
.push_back(set_value_fn
);
3187 case Storage_class::uniform
:
3188 #warning finish implementing Storage_class::uniform
3190 case Storage_class::output
:
3192 if(instruction
.initializer
)
3193 throw Parser_error(instruction_start_index
,
3194 instruction_start_index
,
3195 "shader output variable initializers are not implemented");
3196 auto set_value_fn
= [this, instruction
, &state
, instruction_start_index
]()
3198 auto &variable
= util::get
<Output_variable_state
>(state
.variable
);
3199 state
.value
= Value(
3200 ::LLVMBuildStructGEP(
3202 get_id_state(current_function_id
).function
->entry_block
->outputs_struct
,
3203 outputs_struct
->get_members(true)[variable
.member_index
].llvm_member_index
,
3204 get_name(instruction
.result
).c_str()),
3205 get_type(instruction
.result_type
, instruction_start_index
));
3207 if(current_function_id
)
3210 function_entry_block_handlers
.push_back(set_value_fn
);
3213 case Storage_class::workgroup
:
3214 #warning finish implementing Storage_class::workgroup
3216 case Storage_class::cross_workgroup
:
3217 #warning finish implementing Storage_class::cross_workgroup
3219 case Storage_class::private_
:
3220 #warning finish implementing Storage_class::private_
3222 case Storage_class::function
:
3224 if(!current_function_id
)
3225 throw Parser_error(instruction_start_index
,
3226 instruction_start_index
,
3227 "function-local variable must be inside function");
3228 auto &function
= get_id_state(current_function_id
).function
.value();
3229 if(!function
.entry_block
3230 || function
.entry_block
->entry_block
!= get_or_make_label(current_basic_block_id
))
3231 throw Parser_error(instruction_start_index
,
3232 instruction_start_index
,
3233 "function-local variable must be inside initial basic block");
3235 get_type
<Pointer_type_descriptor
>(instruction
.result_type
, instruction_start_index
);
3236 state
.value
= Value(::LLVMBuildAlloca(builder
.get(),
3237 type
->get_base_type()->get_or_make_type().type
,
3238 get_name(instruction
.result
).c_str()),
3240 ::LLVMSetAlignment(state
.value
->value
,
3241 type
->get_base_type()->get_or_make_type().alignment
);
3244 case Storage_class::generic
:
3245 #warning finish implementing Storage_class::generic
3247 case Storage_class::push_constant
:
3248 #warning finish implementing Storage_class::push_constant
3250 case Storage_class::atomic_counter
:
3251 #warning finish implementing Storage_class::atomic_counter
3253 case Storage_class::image
:
3254 #warning finish implementing Storage_class::image
3256 case Storage_class::storage_buffer
:
3257 #warning finish implementing Storage_class::storage_buffer
3265 void Spirv_to_llvm::handle_instruction_op_image_texel_pointer(Op_image_texel_pointer instruction
,
3266 std::size_t instruction_start_index
)
3269 throw Parser_error(instruction_start_index
,
3270 instruction_start_index
,
3271 "instruction not implemented: "
3272 + std::string(get_enumerant_name(instruction
.get_operation())));
3275 void Spirv_to_llvm::handle_instruction_op_load(Op_load instruction
,
3276 std::size_t instruction_start_index
)
3280 case Stage::calculate_types
:
3282 case Stage::generate_code
:
3284 auto &state
= get_id_state(instruction
.result
);
3285 if(!state
.decorations
.empty())
3286 throw Parser_error(instruction_start_index
,
3287 instruction_start_index
,
3288 "decorations on instruction not implemented: "
3289 + std::string(get_enumerant_name(instruction
.get_operation())));
3290 auto memory_access
= instruction
.memory_access
.value_or(
3291 Memory_access_with_parameters(Memory_access::none
, {}));
3292 if((memory_access
.value
& Memory_access::volatile_
) == Memory_access::volatile_
)
3293 throw Parser_error(instruction_start_index
,
3294 instruction_start_index
,
3295 "OpLoad volatile not implemented");
3296 if((memory_access
.value
& Memory_access::aligned
) == Memory_access::aligned
)
3297 throw Parser_error(instruction_start_index
,
3298 instruction_start_index
,
3299 "OpLoad alignment not implemented");
3300 if((memory_access
.value
& Memory_access::nontemporal
) == Memory_access::nontemporal
)
3301 throw Parser_error(instruction_start_index
,
3302 instruction_start_index
,
3303 "OpLoad nontemporal not implemented");
3304 state
.value
= Value(::LLVMBuildLoad(builder
.get(),
3305 get_id_state(instruction
.pointer
).value
.value().value
,
3306 get_name(instruction
.result
).c_str()),
3307 get_type(instruction
.result_type
, instruction_start_index
));
3308 ::LLVMSetAlignment(state
.value
->value
, state
.value
->type
->get_or_make_type().alignment
);
3314 void Spirv_to_llvm::handle_instruction_op_store(Op_store instruction
,
3315 std::size_t instruction_start_index
)
3319 case Stage::calculate_types
:
3321 case Stage::generate_code
:
3323 auto memory_access
= instruction
.memory_access
.value_or(
3324 Memory_access_with_parameters(Memory_access::none
, {}));
3325 if((memory_access
.value
& Memory_access::volatile_
) == Memory_access::volatile_
)
3326 throw Parser_error(instruction_start_index
,
3327 instruction_start_index
,
3328 "OpStore volatile not implemented");
3329 if((memory_access
.value
& Memory_access::aligned
) == Memory_access::aligned
)
3330 throw Parser_error(instruction_start_index
,
3331 instruction_start_index
,
3332 "OpStore alignment not implemented");
3333 if((memory_access
.value
& Memory_access::nontemporal
) == Memory_access::nontemporal
)
3334 throw Parser_error(instruction_start_index
,
3335 instruction_start_index
,
3336 "OpStore nontemporal not implemented");
3337 auto &object_value
= get_id_state(instruction
.object
).value
.value();
3338 auto &pointer_value
= get_id_state(instruction
.pointer
).value
.value();
3339 ::LLVMSetAlignment(::LLVMBuildStore(builder
.get(), object_value
.value
, pointer_value
.value
),
3340 object_value
.type
->get_or_make_type().alignment
);
3346 void Spirv_to_llvm::handle_instruction_op_copy_memory(Op_copy_memory instruction
,
3347 std::size_t instruction_start_index
)
3350 throw Parser_error(instruction_start_index
,
3351 instruction_start_index
,
3352 "instruction not implemented: "
3353 + std::string(get_enumerant_name(instruction
.get_operation())));
3356 void Spirv_to_llvm::handle_instruction_op_copy_memory_sized(Op_copy_memory_sized instruction
,
3357 std::size_t instruction_start_index
)
3360 throw Parser_error(instruction_start_index
,
3361 instruction_start_index
,
3362 "instruction not implemented: "
3363 + std::string(get_enumerant_name(instruction
.get_operation())));
3366 void Spirv_to_llvm::handle_instruction_op_access_chain(Op_access_chain instruction
,
3367 std::size_t instruction_start_index
)
3371 case Stage::calculate_types
:
3373 case Stage::generate_code
:
3375 auto &state
= get_id_state(instruction
.result
);
3376 if(!state
.decorations
.empty())
3377 throw Parser_error(instruction_start_index
,
3378 instruction_start_index
,
3379 "decorations on instruction not implemented: "
3380 + std::string(get_enumerant_name(instruction
.get_operation())));
3381 auto base
= get_id_state(instruction
.base
).value
.value();
3382 std::string name
= get_name(instruction
.result
);
3383 std::vector
<::LLVMValueRef
> llvm_indexes
;
3384 llvm_indexes
.reserve(instruction
.indexes
.size() + 1);
3385 auto *base_pointer_type
= dynamic_cast<const Pointer_type_descriptor
*>(base
.type
.get());
3386 if(!base_pointer_type
)
3387 throw Parser_error(instruction_start_index
,
3388 instruction_start_index
,
3389 "base type is not a pointer for OpAccessChain");
3390 llvm_indexes
.push_back(::LLVMConstInt(::LLVMInt32TypeInContext(context
), 0, false));
3391 auto current_type
= base_pointer_type
->get_base_type();
3392 for(std::size_t i
= 0; i
< instruction
.indexes
.size(); i
++)
3394 Id index
= instruction
.indexes
[i
];
3397 std::size_t instruction_start_index
;
3398 std::shared_ptr
<Type_descriptor
> ¤t_type
;
3399 std::vector
<::LLVMValueRef
> &llvm_indexes
;
3401 Spirv_to_llvm
*this_
;
3402 void operator()(Simple_type_descriptor
&)
3404 throw Parser_error(instruction_start_index
,
3405 instruction_start_index
,
3406 "invalid composite type for OpAccessChain");
3408 void operator()(Vector_type_descriptor
&type
)
3410 auto &index_value
= this_
->get_id_state(index
).value
.value();
3411 llvm_indexes
.push_back(index_value
.value
);
3412 current_type
= type
.get_element_type();
3414 void operator()(Matrix_type_descriptor
&)
3417 throw Parser_error(instruction_start_index
,
3418 instruction_start_index
,
3419 "unimplemented composite type for OpAccessChain");
3421 void operator()(Array_type_descriptor
&)
3424 throw Parser_error(instruction_start_index
,
3425 instruction_start_index
,
3426 "unimplemented composite type for OpAccessChain");
3428 void operator()(Pointer_type_descriptor
&)
3430 throw Parser_error(instruction_start_index
,
3431 instruction_start_index
,
3432 "invalid composite type for OpAccessChain");
3434 void operator()(Function_type_descriptor
&)
3436 throw Parser_error(instruction_start_index
,
3437 instruction_start_index
,
3438 "invalid composite type for OpAccessChain");
3440 void operator()(Struct_type_descriptor
&type
)
3442 auto index_value
= ::LLVMConstIntGetZExtValue(
3443 this_
->get_id_state(index
).constant
->get_or_make_value());
3444 auto &members
= type
.get_members(true);
3445 if(index_value
>= members
.size())
3446 throw Parser_error(instruction_start_index
,
3447 instruction_start_index
,
3448 "index out of range in OpAccessChain");
3449 llvm_indexes
.push_back(::LLVMConstInt(::LLVMInt32TypeInContext(this_
->context
),
3450 members
[index_value
].llvm_member_index
,
3452 current_type
= members
[index_value
].type
;
3455 auto *type
= current_type
.get();
3456 type
->visit(Visitor
{instruction_start_index
, current_type
, llvm_indexes
, index
, this});
3458 state
.value
= Value(
3460 builder
.get(), base
.value
, llvm_indexes
.data(), llvm_indexes
.size(), name
.c_str()),
3461 get_type(instruction
.result_type
, instruction_start_index
));
3467 void Spirv_to_llvm::handle_instruction_op_in_bounds_access_chain(
3468 Op_in_bounds_access_chain instruction
, std::size_t instruction_start_index
)
3471 throw Parser_error(instruction_start_index
,
3472 instruction_start_index
,
3473 "instruction not implemented: "
3474 + std::string(get_enumerant_name(instruction
.get_operation())));
3477 void Spirv_to_llvm::handle_instruction_op_ptr_access_chain(Op_ptr_access_chain instruction
,
3478 std::size_t instruction_start_index
)
3481 throw Parser_error(instruction_start_index
,
3482 instruction_start_index
,
3483 "instruction not implemented: "
3484 + std::string(get_enumerant_name(instruction
.get_operation())));
3487 void Spirv_to_llvm::handle_instruction_op_array_length(Op_array_length instruction
,
3488 std::size_t instruction_start_index
)
3491 throw Parser_error(instruction_start_index
,
3492 instruction_start_index
,
3493 "instruction not implemented: "
3494 + std::string(get_enumerant_name(instruction
.get_operation())));
3497 void Spirv_to_llvm::handle_instruction_op_generic_ptr_mem_semantics(
3498 Op_generic_ptr_mem_semantics instruction
, std::size_t instruction_start_index
)
3501 throw Parser_error(instruction_start_index
,
3502 instruction_start_index
,
3503 "instruction not implemented: "
3504 + std::string(get_enumerant_name(instruction
.get_operation())));
3507 void Spirv_to_llvm::handle_instruction_op_in_bounds_ptr_access_chain(
3508 Op_in_bounds_ptr_access_chain instruction
, std::size_t instruction_start_index
)
3511 throw Parser_error(instruction_start_index
,
3512 instruction_start_index
,
3513 "instruction not implemented: "
3514 + std::string(get_enumerant_name(instruction
.get_operation())));
3517 void Spirv_to_llvm::handle_instruction_op_decorate(
3518 Op_decorate instruction
, [[gnu::unused
]] std::size_t instruction_start_index
)
3520 get_id_state(instruction
.target
).decorations
.push_back(std::move(instruction
.decoration
));
3523 void Spirv_to_llvm::handle_instruction_op_member_decorate(
3524 Op_member_decorate instruction
, [[gnu::unused
]] std::size_t instruction_start_index
)
3526 auto &state
= get_id_state(instruction
.structure_type
);
3527 state
.member_decorations
.push_back(std::move(instruction
));
3530 void Spirv_to_llvm::handle_instruction_op_decoration_group(Op_decoration_group instruction
,
3531 std::size_t instruction_start_index
)
3534 throw Parser_error(instruction_start_index
,
3535 instruction_start_index
,
3536 "instruction not implemented: "
3537 + std::string(get_enumerant_name(instruction
.get_operation())));
3540 void Spirv_to_llvm::handle_instruction_op_group_decorate(Op_group_decorate instruction
,
3541 std::size_t instruction_start_index
)
3544 throw Parser_error(instruction_start_index
,
3545 instruction_start_index
,
3546 "instruction not implemented: "
3547 + std::string(get_enumerant_name(instruction
.get_operation())));
3550 void Spirv_to_llvm::handle_instruction_op_group_member_decorate(
3551 Op_group_member_decorate instruction
, std::size_t instruction_start_index
)
3554 throw Parser_error(instruction_start_index
,
3555 instruction_start_index
,
3556 "instruction not implemented: "
3557 + std::string(get_enumerant_name(instruction
.get_operation())));
3560 void Spirv_to_llvm::handle_instruction_op_vector_extract_dynamic(
3561 Op_vector_extract_dynamic instruction
, std::size_t instruction_start_index
)
3564 throw Parser_error(instruction_start_index
,
3565 instruction_start_index
,
3566 "instruction not implemented: "
3567 + std::string(get_enumerant_name(instruction
.get_operation())));
3570 void Spirv_to_llvm::handle_instruction_op_vector_insert_dynamic(
3571 Op_vector_insert_dynamic instruction
, std::size_t instruction_start_index
)
3574 throw Parser_error(instruction_start_index
,
3575 instruction_start_index
,
3576 "instruction not implemented: "
3577 + std::string(get_enumerant_name(instruction
.get_operation())));
3580 void Spirv_to_llvm::handle_instruction_op_vector_shuffle(Op_vector_shuffle instruction
,
3581 std::size_t instruction_start_index
)
3584 throw Parser_error(instruction_start_index
,
3585 instruction_start_index
,
3586 "instruction not implemented: "
3587 + std::string(get_enumerant_name(instruction
.get_operation())));
3590 void Spirv_to_llvm::handle_instruction_op_composite_construct(Op_composite_construct instruction
,
3591 std::size_t instruction_start_index
)
3595 case Stage::calculate_types
:
3597 case Stage::generate_code
:
3599 auto &state
= get_id_state(instruction
.result
);
3600 if(!state
.decorations
.empty())
3601 throw Parser_error(instruction_start_index
,
3602 instruction_start_index
,
3603 "decorations on instruction not implemented: "
3604 + std::string(get_enumerant_name(instruction
.get_operation())));
3605 auto result_type
= get_type(instruction
.result_type
, instruction_start_index
);
3606 ::LLVMValueRef result_value
= nullptr;
3607 std::string name
= get_name(instruction
.result
);
3610 Op_composite_construct
&instruction
;
3611 std::size_t instruction_start_index
;
3613 ::LLVMValueRef
&result_value
;
3615 Spirv_to_llvm
*this_
;
3616 void operator()(Simple_type_descriptor
&)
3618 throw Parser_error(instruction_start_index
,
3619 instruction_start_index
,
3620 "invalid result type for OpCompositeConstruct");
3622 void operator()(Vector_type_descriptor
&type
)
3624 if(instruction
.constituents
.size() < 2)
3625 throw Parser_error(instruction_start_index
,
3626 instruction_start_index
,
3627 "too few inputs to construct a vector");
3628 result_value
= ::LLVMGetUndef(type
.get_or_make_type().type
);
3629 std::uint32_t insert_index
= 0;
3630 auto insert_element
= [&](::LLVMValueRef element
)
3632 if(insert_index
>= type
.get_element_count())
3634 instruction_start_index
,
3635 instruction_start_index
,
3636 "too many input vector elements to fit in output vector");
3637 result_value
= ::LLVMBuildInsertElement(
3638 this_
->builder
.get(),
3642 ::LLVMInt32TypeInContext(this_
->context
), insert_index
, false),
3643 insert_index
+ 1 == type
.get_element_count() ? name
.c_str() : "");
3646 for(Id input
: instruction
.constituents
)
3648 auto &value
= this_
->get_id_state(input
).value
.value();
3649 if(auto *vector_type
= dynamic_cast<Vector_type_descriptor
*>(value
.type
.get()))
3651 for(std::uint32_t i
= 0; i
< vector_type
->get_element_count(); i
++)
3653 insert_element(::LLVMBuildExtractElement(
3654 this_
->builder
.get(),
3657 ::LLVMInt32TypeInContext(this_
->context
), insert_index
, false),
3663 insert_element(value
.value
);
3666 if(insert_index
< type
.get_element_count())
3667 throw Parser_error(instruction_start_index
,
3668 instruction_start_index
,
3669 "too few input vector elements to fill output vector");
3671 void operator()(Matrix_type_descriptor
&)
3674 throw Parser_error(instruction_start_index
,
3675 instruction_start_index
,
3676 "unimplemented result type for OpCompositeConstruct");
3678 void operator()(Array_type_descriptor
&)
3681 throw Parser_error(instruction_start_index
,
3682 instruction_start_index
,
3683 "unimplemented result type for OpCompositeConstruct");
3685 void operator()(Pointer_type_descriptor
&)
3687 throw Parser_error(instruction_start_index
,
3688 instruction_start_index
,
3689 "invalid result type for OpCompositeConstruct");
3691 void operator()(Function_type_descriptor
&)
3693 throw Parser_error(instruction_start_index
,
3694 instruction_start_index
,
3695 "invalid result type for OpCompositeConstruct");
3697 void operator()(Struct_type_descriptor
&)
3700 throw Parser_error(instruction_start_index
,
3701 instruction_start_index
,
3702 "unimplemented result type for OpCompositeConstruct");
3706 Visitor
{instruction
, instruction_start_index
, state
, result_value
, name
, this});
3707 state
.value
= Value(result_value
, std::move(result_type
));
3713 void Spirv_to_llvm::handle_instruction_op_composite_extract(Op_composite_extract instruction
,
3714 std::size_t instruction_start_index
)
3718 case Stage::calculate_types
:
3720 case Stage::generate_code
:
3722 auto &state
= get_id_state(instruction
.result
);
3723 if(!state
.decorations
.empty())
3724 throw Parser_error(instruction_start_index
,
3725 instruction_start_index
,
3726 "decorations on instruction not implemented: "
3727 + std::string(get_enumerant_name(instruction
.get_operation())));
3728 auto result
= get_id_state(instruction
.composite
).value
.value();
3729 std::string name
= "";
3730 for(std::size_t i
= 0; i
< instruction
.indexes
.size(); i
++)
3732 std::uint32_t index
= instruction
.indexes
[i
];
3733 if(i
== instruction
.indexes
.size() - 1)
3734 name
= get_name(instruction
.result
);
3737 std::size_t instruction_start_index
;
3741 std::uint32_t index
;
3742 ::LLVMContextRef context
;
3743 llvm_wrapper::Builder
&builder
;
3744 void operator()(Simple_type_descriptor
&)
3746 throw Parser_error(instruction_start_index
,
3747 instruction_start_index
,
3748 "invalid composite type for OpCompositeExtract");
3750 void operator()(Vector_type_descriptor
&type
)
3752 if(index
>= type
.get_element_count())
3753 throw Parser_error(instruction_start_index
,
3754 instruction_start_index
,
3755 "index out of range in OpCompositeExtract");
3757 Value(::LLVMBuildExtractElement(
3760 ::LLVMConstInt(::LLVMInt32TypeInContext(context
), index
, false),
3762 type
.get_element_type());
3764 void operator()(Matrix_type_descriptor
&)
3767 throw Parser_error(instruction_start_index
,
3768 instruction_start_index
,
3769 "unimplemented composite type for OpCompositeExtract");
3771 void operator()(Array_type_descriptor
&)
3774 throw Parser_error(instruction_start_index
,
3775 instruction_start_index
,
3776 "unimplemented composite type for OpCompositeExtract");
3778 void operator()(Pointer_type_descriptor
&)
3780 throw Parser_error(instruction_start_index
,
3781 instruction_start_index
,
3782 "invalid composite type for OpCompositeExtract");
3784 void operator()(Function_type_descriptor
&)
3786 throw Parser_error(instruction_start_index
,
3787 instruction_start_index
,
3788 "invalid composite type for OpCompositeExtract");
3790 void operator()(Struct_type_descriptor
&)
3793 throw Parser_error(instruction_start_index
,
3794 instruction_start_index
,
3795 "unimplemented composite type for OpCompositeExtract");
3798 auto *type
= result
.type
.get();
3800 Visitor
{instruction_start_index
, state
, result
, name
, index
, context
, builder
});
3802 state
.value
= result
;
3808 void Spirv_to_llvm::handle_instruction_op_composite_insert(Op_composite_insert instruction
,
3809 std::size_t instruction_start_index
)
3812 throw Parser_error(instruction_start_index
,
3813 instruction_start_index
,
3814 "instruction not implemented: "
3815 + std::string(get_enumerant_name(instruction
.get_operation())));
3818 void Spirv_to_llvm::handle_instruction_op_copy_object(Op_copy_object instruction
,
3819 std::size_t instruction_start_index
)
3822 throw Parser_error(instruction_start_index
,
3823 instruction_start_index
,
3824 "instruction not implemented: "
3825 + std::string(get_enumerant_name(instruction
.get_operation())));
3828 void Spirv_to_llvm::handle_instruction_op_transpose(Op_transpose instruction
,
3829 std::size_t instruction_start_index
)
3832 throw Parser_error(instruction_start_index
,
3833 instruction_start_index
,
3834 "instruction not implemented: "
3835 + std::string(get_enumerant_name(instruction
.get_operation())));
3838 void Spirv_to_llvm::handle_instruction_op_sampled_image(Op_sampled_image instruction
,
3839 std::size_t instruction_start_index
)
3842 throw Parser_error(instruction_start_index
,
3843 instruction_start_index
,
3844 "instruction not implemented: "
3845 + std::string(get_enumerant_name(instruction
.get_operation())));
3848 void Spirv_to_llvm::handle_instruction_op_image_sample_implicit_lod(
3849 Op_image_sample_implicit_lod instruction
, std::size_t instruction_start_index
)
3852 throw Parser_error(instruction_start_index
,
3853 instruction_start_index
,
3854 "instruction not implemented: "
3855 + std::string(get_enumerant_name(instruction
.get_operation())));
3858 void Spirv_to_llvm::handle_instruction_op_image_sample_explicit_lod(
3859 Op_image_sample_explicit_lod instruction
, std::size_t instruction_start_index
)
3862 throw Parser_error(instruction_start_index
,
3863 instruction_start_index
,
3864 "instruction not implemented: "
3865 + std::string(get_enumerant_name(instruction
.get_operation())));
3868 void Spirv_to_llvm::handle_instruction_op_image_sample_dref_implicit_lod(
3869 Op_image_sample_dref_implicit_lod instruction
, std::size_t instruction_start_index
)
3872 throw Parser_error(instruction_start_index
,
3873 instruction_start_index
,
3874 "instruction not implemented: "
3875 + std::string(get_enumerant_name(instruction
.get_operation())));
3878 void Spirv_to_llvm::handle_instruction_op_image_sample_dref_explicit_lod(
3879 Op_image_sample_dref_explicit_lod instruction
, std::size_t instruction_start_index
)
3882 throw Parser_error(instruction_start_index
,
3883 instruction_start_index
,
3884 "instruction not implemented: "
3885 + std::string(get_enumerant_name(instruction
.get_operation())));
3888 void Spirv_to_llvm::handle_instruction_op_image_sample_proj_implicit_lod(
3889 Op_image_sample_proj_implicit_lod instruction
, std::size_t instruction_start_index
)
3892 throw Parser_error(instruction_start_index
,
3893 instruction_start_index
,
3894 "instruction not implemented: "
3895 + std::string(get_enumerant_name(instruction
.get_operation())));
3898 void Spirv_to_llvm::handle_instruction_op_image_sample_proj_explicit_lod(
3899 Op_image_sample_proj_explicit_lod instruction
, std::size_t instruction_start_index
)
3902 throw Parser_error(instruction_start_index
,
3903 instruction_start_index
,
3904 "instruction not implemented: "
3905 + std::string(get_enumerant_name(instruction
.get_operation())));
3908 void Spirv_to_llvm::handle_instruction_op_image_sample_proj_dref_implicit_lod(
3909 Op_image_sample_proj_dref_implicit_lod instruction
, std::size_t instruction_start_index
)
3912 throw Parser_error(instruction_start_index
,
3913 instruction_start_index
,
3914 "instruction not implemented: "
3915 + std::string(get_enumerant_name(instruction
.get_operation())));
3918 void Spirv_to_llvm::handle_instruction_op_image_sample_proj_dref_explicit_lod(
3919 Op_image_sample_proj_dref_explicit_lod instruction
, std::size_t instruction_start_index
)
3922 throw Parser_error(instruction_start_index
,
3923 instruction_start_index
,
3924 "instruction not implemented: "
3925 + std::string(get_enumerant_name(instruction
.get_operation())));
3928 void Spirv_to_llvm::handle_instruction_op_image_fetch(Op_image_fetch instruction
,
3929 std::size_t instruction_start_index
)
3932 throw Parser_error(instruction_start_index
,
3933 instruction_start_index
,
3934 "instruction not implemented: "
3935 + std::string(get_enumerant_name(instruction
.get_operation())));
3938 void Spirv_to_llvm::handle_instruction_op_image_gather(Op_image_gather instruction
,
3939 std::size_t instruction_start_index
)
3942 throw Parser_error(instruction_start_index
,
3943 instruction_start_index
,
3944 "instruction not implemented: "
3945 + std::string(get_enumerant_name(instruction
.get_operation())));
3948 void Spirv_to_llvm::handle_instruction_op_image_dref_gather(Op_image_dref_gather instruction
,
3949 std::size_t instruction_start_index
)
3952 throw Parser_error(instruction_start_index
,
3953 instruction_start_index
,
3954 "instruction not implemented: "
3955 + std::string(get_enumerant_name(instruction
.get_operation())));
3958 void Spirv_to_llvm::handle_instruction_op_image_read(Op_image_read instruction
,
3959 std::size_t instruction_start_index
)
3962 throw Parser_error(instruction_start_index
,
3963 instruction_start_index
,
3964 "instruction not implemented: "
3965 + std::string(get_enumerant_name(instruction
.get_operation())));
3968 void Spirv_to_llvm::handle_instruction_op_image_write(Op_image_write instruction
,
3969 std::size_t instruction_start_index
)
3972 throw Parser_error(instruction_start_index
,
3973 instruction_start_index
,
3974 "instruction not implemented: "
3975 + std::string(get_enumerant_name(instruction
.get_operation())));
3978 void Spirv_to_llvm::handle_instruction_op_image(Op_image instruction
,
3979 std::size_t instruction_start_index
)
3982 throw Parser_error(instruction_start_index
,
3983 instruction_start_index
,
3984 "instruction not implemented: "
3985 + std::string(get_enumerant_name(instruction
.get_operation())));
3988 void Spirv_to_llvm::handle_instruction_op_image_query_format(Op_image_query_format instruction
,
3989 std::size_t instruction_start_index
)
3992 throw Parser_error(instruction_start_index
,
3993 instruction_start_index
,
3994 "instruction not implemented: "
3995 + std::string(get_enumerant_name(instruction
.get_operation())));
3998 void Spirv_to_llvm::handle_instruction_op_image_query_order(Op_image_query_order instruction
,
3999 std::size_t instruction_start_index
)
4002 throw Parser_error(instruction_start_index
,
4003 instruction_start_index
,
4004 "instruction not implemented: "
4005 + std::string(get_enumerant_name(instruction
.get_operation())));
4008 void Spirv_to_llvm::handle_instruction_op_image_query_size_lod(Op_image_query_size_lod instruction
,
4009 std::size_t instruction_start_index
)
4012 throw Parser_error(instruction_start_index
,
4013 instruction_start_index
,
4014 "instruction not implemented: "
4015 + std::string(get_enumerant_name(instruction
.get_operation())));
4018 void Spirv_to_llvm::handle_instruction_op_image_query_size(Op_image_query_size instruction
,
4019 std::size_t instruction_start_index
)
4022 throw Parser_error(instruction_start_index
,
4023 instruction_start_index
,
4024 "instruction not implemented: "
4025 + std::string(get_enumerant_name(instruction
.get_operation())));
4028 void Spirv_to_llvm::handle_instruction_op_image_query_lod(Op_image_query_lod instruction
,
4029 std::size_t instruction_start_index
)
4032 throw Parser_error(instruction_start_index
,
4033 instruction_start_index
,
4034 "instruction not implemented: "
4035 + std::string(get_enumerant_name(instruction
.get_operation())));
4038 void Spirv_to_llvm::handle_instruction_op_image_query_levels(Op_image_query_levels instruction
,
4039 std::size_t instruction_start_index
)
4042 throw Parser_error(instruction_start_index
,
4043 instruction_start_index
,
4044 "instruction not implemented: "
4045 + std::string(get_enumerant_name(instruction
.get_operation())));
4048 void Spirv_to_llvm::handle_instruction_op_image_query_samples(Op_image_query_samples instruction
,
4049 std::size_t instruction_start_index
)
4052 throw Parser_error(instruction_start_index
,
4053 instruction_start_index
,
4054 "instruction not implemented: "
4055 + std::string(get_enumerant_name(instruction
.get_operation())));
4058 void Spirv_to_llvm::handle_instruction_op_convert_f_to_u(Op_convert_f_to_u instruction
,
4059 std::size_t instruction_start_index
)
4063 case Stage::calculate_types
:
4065 case Stage::generate_code
:
4067 auto &state
= get_id_state(instruction
.result
);
4068 if(!state
.decorations
.empty())
4069 throw Parser_error(instruction_start_index
,
4070 instruction_start_index
,
4071 "decorations on instruction not implemented: "
4072 + std::string(get_enumerant_name(instruction
.get_operation())));
4073 auto result_type
= get_type(instruction
.result_type
, instruction_start_index
);
4075 Value(::LLVMBuildFPToUI(builder
.get(),
4076 get_id_state(instruction
.float_value
).value
.value().value
,
4077 result_type
->get_or_make_type().type
,
4078 get_name(instruction
.result
).c_str()),
4085 void Spirv_to_llvm::handle_instruction_op_convert_f_to_s(Op_convert_f_to_s instruction
,
4086 std::size_t instruction_start_index
)
4089 throw Parser_error(instruction_start_index
,
4090 instruction_start_index
,
4091 "instruction not implemented: "
4092 + std::string(get_enumerant_name(instruction
.get_operation())));
4095 void Spirv_to_llvm::handle_instruction_op_convert_s_to_f(Op_convert_s_to_f instruction
,
4096 std::size_t instruction_start_index
)
4100 case Stage::calculate_types
:
4102 case Stage::generate_code
:
4104 auto &state
= get_id_state(instruction
.result
);
4105 if(!state
.decorations
.empty())
4106 throw Parser_error(instruction_start_index
,
4107 instruction_start_index
,
4108 "decorations on instruction not implemented: "
4109 + std::string(get_enumerant_name(instruction
.get_operation())));
4110 auto result_type
= get_type(instruction
.result_type
, instruction_start_index
);
4112 Value(::LLVMBuildSIToFP(builder
.get(),
4113 get_id_state(instruction
.signed_value
).value
.value().value
,
4114 result_type
->get_or_make_type().type
,
4115 get_name(instruction
.result
).c_str()),
4122 void Spirv_to_llvm::handle_instruction_op_convert_u_to_f(Op_convert_u_to_f instruction
,
4123 std::size_t instruction_start_index
)
4126 throw Parser_error(instruction_start_index
,
4127 instruction_start_index
,
4128 "instruction not implemented: "
4129 + std::string(get_enumerant_name(instruction
.get_operation())));
4132 void Spirv_to_llvm::handle_instruction_op_u_convert(Op_u_convert instruction
,
4133 std::size_t instruction_start_index
)
4137 case Stage::calculate_types
:
4139 case Stage::generate_code
:
4141 auto &state
= get_id_state(instruction
.result
);
4142 if(!state
.decorations
.empty())
4143 throw Parser_error(instruction_start_index
,
4144 instruction_start_index
,
4145 "decorations on instruction not implemented: "
4146 + std::string(get_enumerant_name(instruction
.get_operation())));
4147 auto result_type
= get_type(instruction
.result_type
, instruction_start_index
);
4148 auto result_type_int_width
= ::LLVMGetIntTypeWidth(
4149 llvm_wrapper::get_scalar_or_vector_element_type(result_type
->get_or_make_type().type
));
4150 auto &arg
= get_id_state(instruction
.unsigned_value
).value
.value();
4151 auto arg_int_width
= ::LLVMGetIntTypeWidth(
4152 llvm_wrapper::get_scalar_or_vector_element_type(arg
.type
->get_or_make_type().type
));
4153 auto opcode
= ::LLVMTrunc
;
4154 if(result_type_int_width
> arg_int_width
)
4155 opcode
= ::LLVMZExt
;
4156 state
.value
= Value(::LLVMBuildCast(builder
.get(),
4159 result_type
->get_or_make_type().type
,
4160 get_name(instruction
.result
).c_str()),
4167 void Spirv_to_llvm::handle_instruction_op_s_convert(Op_s_convert instruction
,
4168 std::size_t instruction_start_index
)
4171 throw Parser_error(instruction_start_index
,
4172 instruction_start_index
,
4173 "instruction not implemented: "
4174 + std::string(get_enumerant_name(instruction
.get_operation())));
4177 void Spirv_to_llvm::handle_instruction_op_f_convert(Op_f_convert instruction
,
4178 std::size_t instruction_start_index
)
4181 throw Parser_error(instruction_start_index
,
4182 instruction_start_index
,
4183 "instruction not implemented: "
4184 + std::string(get_enumerant_name(instruction
.get_operation())));
4187 void Spirv_to_llvm::handle_instruction_op_quantize_to_f16(Op_quantize_to_f16 instruction
,
4188 std::size_t instruction_start_index
)
4191 throw Parser_error(instruction_start_index
,
4192 instruction_start_index
,
4193 "instruction not implemented: "
4194 + std::string(get_enumerant_name(instruction
.get_operation())));
4197 void Spirv_to_llvm::handle_instruction_op_convert_ptr_to_u(Op_convert_ptr_to_u instruction
,
4198 std::size_t instruction_start_index
)
4201 throw Parser_error(instruction_start_index
,
4202 instruction_start_index
,
4203 "instruction not implemented: "
4204 + std::string(get_enumerant_name(instruction
.get_operation())));
4207 void Spirv_to_llvm::handle_instruction_op_sat_convert_s_to_u(Op_sat_convert_s_to_u instruction
,
4208 std::size_t instruction_start_index
)
4211 throw Parser_error(instruction_start_index
,
4212 instruction_start_index
,
4213 "instruction not implemented: "
4214 + std::string(get_enumerant_name(instruction
.get_operation())));
4217 void Spirv_to_llvm::handle_instruction_op_sat_convert_u_to_s(Op_sat_convert_u_to_s instruction
,
4218 std::size_t instruction_start_index
)
4221 throw Parser_error(instruction_start_index
,
4222 instruction_start_index
,
4223 "instruction not implemented: "
4224 + std::string(get_enumerant_name(instruction
.get_operation())));
4227 void Spirv_to_llvm::handle_instruction_op_convert_u_to_ptr(Op_convert_u_to_ptr instruction
,
4228 std::size_t instruction_start_index
)
4231 throw Parser_error(instruction_start_index
,
4232 instruction_start_index
,
4233 "instruction not implemented: "
4234 + std::string(get_enumerant_name(instruction
.get_operation())));
4237 void Spirv_to_llvm::handle_instruction_op_ptr_cast_to_generic(Op_ptr_cast_to_generic instruction
,
4238 std::size_t instruction_start_index
)
4241 throw Parser_error(instruction_start_index
,
4242 instruction_start_index
,
4243 "instruction not implemented: "
4244 + std::string(get_enumerant_name(instruction
.get_operation())));
4247 void Spirv_to_llvm::handle_instruction_op_generic_cast_to_ptr(Op_generic_cast_to_ptr instruction
,
4248 std::size_t instruction_start_index
)
4251 throw Parser_error(instruction_start_index
,
4252 instruction_start_index
,
4253 "instruction not implemented: "
4254 + std::string(get_enumerant_name(instruction
.get_operation())));
4257 void Spirv_to_llvm::handle_instruction_op_generic_cast_to_ptr_explicit(
4258 Op_generic_cast_to_ptr_explicit instruction
, std::size_t instruction_start_index
)
4261 throw Parser_error(instruction_start_index
,
4262 instruction_start_index
,
4263 "instruction not implemented: "
4264 + std::string(get_enumerant_name(instruction
.get_operation())));
4267 void Spirv_to_llvm::handle_instruction_op_bitcast(Op_bitcast instruction
,
4268 std::size_t instruction_start_index
)
4272 case Stage::calculate_types
:
4274 case Stage::generate_code
:
4276 auto &state
= get_id_state(instruction
.result
);
4277 if(!state
.decorations
.empty())
4278 throw Parser_error(instruction_start_index
,
4279 instruction_start_index
,
4280 "decorations on instruction not implemented: "
4281 + std::string(get_enumerant_name(instruction
.get_operation())));
4282 auto result_type
= get_type(instruction
.result_type
, instruction_start_index
);
4283 auto &arg
= get_id_state(instruction
.operand
).value
.value();
4284 std::size_t result_element_count
= 1; // scalar is equivalent to size 1 vector
4285 std::size_t arg_element_count
= 1;
4286 if(auto *t
= dynamic_cast<const Vector_type_descriptor
*>(result_type
.get()))
4287 result_element_count
= t
->get_element_count();
4288 if(auto *t
= dynamic_cast<const Vector_type_descriptor
*>(result_type
.get()))
4289 arg_element_count
= t
->get_element_count();
4290 if(result_element_count
!= arg_element_count
)
4292 // need to bitcast as if on little endian system even on big endian
4293 #warning finish implementing element-count-changing bitcast
4294 throw Parser_error(instruction_start_index
,
4295 instruction_start_index
,
4296 "element-count-changing OpBitcast is not implemented");
4298 state
.value
= Value(::LLVMBuildBitCast(builder
.get(),
4300 result_type
->get_or_make_type().type
,
4301 get_name(instruction
.result
).c_str()),
4308 void Spirv_to_llvm::handle_instruction_op_s_negate(Op_s_negate instruction
,
4309 std::size_t instruction_start_index
)
4312 throw Parser_error(instruction_start_index
,
4313 instruction_start_index
,
4314 "instruction not implemented: "
4315 + std::string(get_enumerant_name(instruction
.get_operation())));
4318 void Spirv_to_llvm::handle_instruction_op_f_negate(Op_f_negate instruction
,
4319 std::size_t instruction_start_index
)
4322 throw Parser_error(instruction_start_index
,
4323 instruction_start_index
,
4324 "instruction not implemented: "
4325 + std::string(get_enumerant_name(instruction
.get_operation())));
4328 void Spirv_to_llvm::handle_instruction_op_i_add(Op_i_add instruction
,
4329 std::size_t instruction_start_index
)
4332 throw Parser_error(instruction_start_index
,
4333 instruction_start_index
,
4334 "instruction not implemented: "
4335 + std::string(get_enumerant_name(instruction
.get_operation())));
4338 void Spirv_to_llvm::handle_instruction_op_f_add(Op_f_add instruction
,
4339 std::size_t instruction_start_index
)
4342 throw Parser_error(instruction_start_index
,
4343 instruction_start_index
,
4344 "instruction not implemented: "
4345 + std::string(get_enumerant_name(instruction
.get_operation())));
4348 void Spirv_to_llvm::handle_instruction_op_i_sub(Op_i_sub instruction
,
4349 std::size_t instruction_start_index
)
4352 throw Parser_error(instruction_start_index
,
4353 instruction_start_index
,
4354 "instruction not implemented: "
4355 + std::string(get_enumerant_name(instruction
.get_operation())));
4358 void Spirv_to_llvm::handle_instruction_op_f_sub(Op_f_sub instruction
,
4359 std::size_t instruction_start_index
)
4362 throw Parser_error(instruction_start_index
,
4363 instruction_start_index
,
4364 "instruction not implemented: "
4365 + std::string(get_enumerant_name(instruction
.get_operation())));
4368 void Spirv_to_llvm::handle_instruction_op_i_mul(Op_i_mul instruction
,
4369 std::size_t instruction_start_index
)
4372 throw Parser_error(instruction_start_index
,
4373 instruction_start_index
,
4374 "instruction not implemented: "
4375 + std::string(get_enumerant_name(instruction
.get_operation())));
4378 void Spirv_to_llvm::handle_instruction_op_f_mul(Op_f_mul instruction
,
4379 std::size_t instruction_start_index
)
4383 case Stage::calculate_types
:
4385 case Stage::generate_code
:
4387 auto &state
= get_id_state(instruction
.result
);
4388 if(!state
.decorations
.empty())
4389 throw Parser_error(instruction_start_index
,
4390 instruction_start_index
,
4391 "decorations on instruction not implemented: "
4392 + std::string(get_enumerant_name(instruction
.get_operation())));
4393 auto result_type
= get_type(instruction
.result_type
, instruction_start_index
);
4394 state
.value
= Value(::LLVMBuildFMul(builder
.get(),
4395 get_id_state(instruction
.operand_1
).value
.value().value
,
4396 get_id_state(instruction
.operand_2
).value
.value().value
,
4397 get_name(instruction
.result
).c_str()),
4404 void Spirv_to_llvm::handle_instruction_op_u_div(Op_u_div instruction
,
4405 std::size_t instruction_start_index
)
4408 throw Parser_error(instruction_start_index
,
4409 instruction_start_index
,
4410 "instruction not implemented: "
4411 + std::string(get_enumerant_name(instruction
.get_operation())));
4414 void Spirv_to_llvm::handle_instruction_op_s_div(Op_s_div instruction
,
4415 std::size_t instruction_start_index
)
4418 throw Parser_error(instruction_start_index
,
4419 instruction_start_index
,
4420 "instruction not implemented: "
4421 + std::string(get_enumerant_name(instruction
.get_operation())));
4424 void Spirv_to_llvm::handle_instruction_op_f_div(Op_f_div instruction
,
4425 std::size_t instruction_start_index
)
4428 throw Parser_error(instruction_start_index
,
4429 instruction_start_index
,
4430 "instruction not implemented: "
4431 + std::string(get_enumerant_name(instruction
.get_operation())));
4434 void Spirv_to_llvm::handle_instruction_op_u_mod(Op_u_mod instruction
,
4435 std::size_t instruction_start_index
)
4438 throw Parser_error(instruction_start_index
,
4439 instruction_start_index
,
4440 "instruction not implemented: "
4441 + std::string(get_enumerant_name(instruction
.get_operation())));
4444 void Spirv_to_llvm::handle_instruction_op_s_rem(Op_s_rem instruction
,
4445 std::size_t instruction_start_index
)
4448 throw Parser_error(instruction_start_index
,
4449 instruction_start_index
,
4450 "instruction not implemented: "
4451 + std::string(get_enumerant_name(instruction
.get_operation())));
4454 void Spirv_to_llvm::handle_instruction_op_s_mod(Op_s_mod instruction
,
4455 std::size_t instruction_start_index
)
4459 case Stage::calculate_types
:
4461 case Stage::generate_code
:
4463 auto &state
= get_id_state(instruction
.result
);
4464 if(!state
.decorations
.empty())
4465 throw Parser_error(instruction_start_index
,
4466 instruction_start_index
,
4467 "decorations on instruction not implemented: "
4468 + std::string(get_enumerant_name(instruction
.get_operation())));
4469 auto result_type
= get_type(instruction
.result_type
, instruction_start_index
);
4471 Value(builder
.build_smod(get_id_state(instruction
.operand_1
).value
.value().value
,
4472 get_id_state(instruction
.operand_2
).value
.value().value
,
4473 get_name(instruction
.result
).c_str()),
4480 void Spirv_to_llvm::handle_instruction_op_f_rem(Op_f_rem instruction
,
4481 std::size_t instruction_start_index
)
4484 throw Parser_error(instruction_start_index
,
4485 instruction_start_index
,
4486 "instruction not implemented: "
4487 + std::string(get_enumerant_name(instruction
.get_operation())));
4490 void Spirv_to_llvm::handle_instruction_op_f_mod(Op_f_mod instruction
,
4491 std::size_t instruction_start_index
)
4494 throw Parser_error(instruction_start_index
,
4495 instruction_start_index
,
4496 "instruction not implemented: "
4497 + std::string(get_enumerant_name(instruction
.get_operation())));
4500 void Spirv_to_llvm::handle_instruction_op_vector_times_scalar(Op_vector_times_scalar instruction
,
4501 std::size_t instruction_start_index
)
4504 throw Parser_error(instruction_start_index
,
4505 instruction_start_index
,
4506 "instruction not implemented: "
4507 + std::string(get_enumerant_name(instruction
.get_operation())));
4510 void Spirv_to_llvm::handle_instruction_op_matrix_times_scalar(Op_matrix_times_scalar instruction
,
4511 std::size_t instruction_start_index
)
4514 throw Parser_error(instruction_start_index
,
4515 instruction_start_index
,
4516 "instruction not implemented: "
4517 + std::string(get_enumerant_name(instruction
.get_operation())));
4520 void Spirv_to_llvm::handle_instruction_op_vector_times_matrix(Op_vector_times_matrix instruction
,
4521 std::size_t instruction_start_index
)
4524 throw Parser_error(instruction_start_index
,
4525 instruction_start_index
,
4526 "instruction not implemented: "
4527 + std::string(get_enumerant_name(instruction
.get_operation())));
4530 void Spirv_to_llvm::handle_instruction_op_matrix_times_vector(Op_matrix_times_vector instruction
,
4531 std::size_t instruction_start_index
)
4534 throw Parser_error(instruction_start_index
,
4535 instruction_start_index
,
4536 "instruction not implemented: "
4537 + std::string(get_enumerant_name(instruction
.get_operation())));
4540 void Spirv_to_llvm::handle_instruction_op_matrix_times_matrix(Op_matrix_times_matrix instruction
,
4541 std::size_t instruction_start_index
)
4544 throw Parser_error(instruction_start_index
,
4545 instruction_start_index
,
4546 "instruction not implemented: "
4547 + std::string(get_enumerant_name(instruction
.get_operation())));
4550 void Spirv_to_llvm::handle_instruction_op_outer_product(Op_outer_product instruction
,
4551 std::size_t instruction_start_index
)
4554 throw Parser_error(instruction_start_index
,
4555 instruction_start_index
,
4556 "instruction not implemented: "
4557 + std::string(get_enumerant_name(instruction
.get_operation())));
4560 void Spirv_to_llvm::handle_instruction_op_dot(Op_dot instruction
,
4561 std::size_t instruction_start_index
)
4564 throw Parser_error(instruction_start_index
,
4565 instruction_start_index
,
4566 "instruction not implemented: "
4567 + std::string(get_enumerant_name(instruction
.get_operation())));
4570 void Spirv_to_llvm::handle_instruction_op_i_add_carry(Op_i_add_carry instruction
,
4571 std::size_t instruction_start_index
)
4574 throw Parser_error(instruction_start_index
,
4575 instruction_start_index
,
4576 "instruction not implemented: "
4577 + std::string(get_enumerant_name(instruction
.get_operation())));
4580 void Spirv_to_llvm::handle_instruction_op_i_sub_borrow(Op_i_sub_borrow instruction
,
4581 std::size_t instruction_start_index
)
4584 throw Parser_error(instruction_start_index
,
4585 instruction_start_index
,
4586 "instruction not implemented: "
4587 + std::string(get_enumerant_name(instruction
.get_operation())));
4590 void Spirv_to_llvm::handle_instruction_op_u_mul_extended(Op_u_mul_extended instruction
,
4591 std::size_t instruction_start_index
)
4594 throw Parser_error(instruction_start_index
,
4595 instruction_start_index
,
4596 "instruction not implemented: "
4597 + std::string(get_enumerant_name(instruction
.get_operation())));
4600 void Spirv_to_llvm::handle_instruction_op_s_mul_extended(Op_s_mul_extended instruction
,
4601 std::size_t instruction_start_index
)
4604 throw Parser_error(instruction_start_index
,
4605 instruction_start_index
,
4606 "instruction not implemented: "
4607 + std::string(get_enumerant_name(instruction
.get_operation())));
4610 void Spirv_to_llvm::handle_instruction_op_any(Op_any instruction
,
4611 std::size_t instruction_start_index
)
4614 throw Parser_error(instruction_start_index
,
4615 instruction_start_index
,
4616 "instruction not implemented: "
4617 + std::string(get_enumerant_name(instruction
.get_operation())));
4620 void Spirv_to_llvm::handle_instruction_op_all(Op_all instruction
,
4621 std::size_t instruction_start_index
)
4624 throw Parser_error(instruction_start_index
,
4625 instruction_start_index
,
4626 "instruction not implemented: "
4627 + std::string(get_enumerant_name(instruction
.get_operation())));
4630 void Spirv_to_llvm::handle_instruction_op_is_nan(Op_is_nan instruction
,
4631 std::size_t instruction_start_index
)
4634 throw Parser_error(instruction_start_index
,
4635 instruction_start_index
,
4636 "instruction not implemented: "
4637 + std::string(get_enumerant_name(instruction
.get_operation())));
4640 void Spirv_to_llvm::handle_instruction_op_is_inf(Op_is_inf instruction
,
4641 std::size_t instruction_start_index
)
4644 throw Parser_error(instruction_start_index
,
4645 instruction_start_index
,
4646 "instruction not implemented: "
4647 + std::string(get_enumerant_name(instruction
.get_operation())));
4650 void Spirv_to_llvm::handle_instruction_op_is_finite(Op_is_finite instruction
,
4651 std::size_t instruction_start_index
)
4654 throw Parser_error(instruction_start_index
,
4655 instruction_start_index
,
4656 "instruction not implemented: "
4657 + std::string(get_enumerant_name(instruction
.get_operation())));
4660 void Spirv_to_llvm::handle_instruction_op_is_normal(Op_is_normal instruction
,
4661 std::size_t instruction_start_index
)
4664 throw Parser_error(instruction_start_index
,
4665 instruction_start_index
,
4666 "instruction not implemented: "
4667 + std::string(get_enumerant_name(instruction
.get_operation())));
4670 void Spirv_to_llvm::handle_instruction_op_sign_bit_set(Op_sign_bit_set instruction
,
4671 std::size_t instruction_start_index
)
4674 throw Parser_error(instruction_start_index
,
4675 instruction_start_index
,
4676 "instruction not implemented: "
4677 + std::string(get_enumerant_name(instruction
.get_operation())));
4680 void Spirv_to_llvm::handle_instruction_op_less_or_greater(Op_less_or_greater instruction
,
4681 std::size_t instruction_start_index
)
4684 throw Parser_error(instruction_start_index
,
4685 instruction_start_index
,
4686 "instruction not implemented: "
4687 + std::string(get_enumerant_name(instruction
.get_operation())));
4690 void Spirv_to_llvm::handle_instruction_op_ordered(Op_ordered instruction
,
4691 std::size_t instruction_start_index
)
4694 throw Parser_error(instruction_start_index
,
4695 instruction_start_index
,
4696 "instruction not implemented: "
4697 + std::string(get_enumerant_name(instruction
.get_operation())));
4700 void Spirv_to_llvm::handle_instruction_op_unordered(Op_unordered instruction
,
4701 std::size_t instruction_start_index
)
4704 throw Parser_error(instruction_start_index
,
4705 instruction_start_index
,
4706 "instruction not implemented: "
4707 + std::string(get_enumerant_name(instruction
.get_operation())));
4710 void Spirv_to_llvm::handle_instruction_op_logical_equal(Op_logical_equal instruction
,
4711 std::size_t instruction_start_index
)
4714 throw Parser_error(instruction_start_index
,
4715 instruction_start_index
,
4716 "instruction not implemented: "
4717 + std::string(get_enumerant_name(instruction
.get_operation())));
4720 void Spirv_to_llvm::handle_instruction_op_logical_not_equal(Op_logical_not_equal instruction
,
4721 std::size_t instruction_start_index
)
4724 throw Parser_error(instruction_start_index
,
4725 instruction_start_index
,
4726 "instruction not implemented: "
4727 + std::string(get_enumerant_name(instruction
.get_operation())));
4730 void Spirv_to_llvm::handle_instruction_op_logical_or(Op_logical_or instruction
,
4731 std::size_t instruction_start_index
)
4734 throw Parser_error(instruction_start_index
,
4735 instruction_start_index
,
4736 "instruction not implemented: "
4737 + std::string(get_enumerant_name(instruction
.get_operation())));
4740 void Spirv_to_llvm::handle_instruction_op_logical_and(Op_logical_and instruction
,
4741 std::size_t instruction_start_index
)
4744 throw Parser_error(instruction_start_index
,
4745 instruction_start_index
,
4746 "instruction not implemented: "
4747 + std::string(get_enumerant_name(instruction
.get_operation())));
4750 void Spirv_to_llvm::handle_instruction_op_logical_not(Op_logical_not instruction
,
4751 std::size_t instruction_start_index
)
4754 throw Parser_error(instruction_start_index
,
4755 instruction_start_index
,
4756 "instruction not implemented: "
4757 + std::string(get_enumerant_name(instruction
.get_operation())));
4760 void Spirv_to_llvm::handle_instruction_op_select(Op_select instruction
,
4761 std::size_t instruction_start_index
)
4764 throw Parser_error(instruction_start_index
,
4765 instruction_start_index
,
4766 "instruction not implemented: "
4767 + std::string(get_enumerant_name(instruction
.get_operation())));
4770 void Spirv_to_llvm::handle_instruction_op_i_equal(Op_i_equal instruction
,
4771 std::size_t instruction_start_index
)
4774 throw Parser_error(instruction_start_index
,
4775 instruction_start_index
,
4776 "instruction not implemented: "
4777 + std::string(get_enumerant_name(instruction
.get_operation())));
4780 void Spirv_to_llvm::handle_instruction_op_i_not_equal(Op_i_not_equal instruction
,
4781 std::size_t instruction_start_index
)
4784 throw Parser_error(instruction_start_index
,
4785 instruction_start_index
,
4786 "instruction not implemented: "
4787 + std::string(get_enumerant_name(instruction
.get_operation())));
4790 void Spirv_to_llvm::handle_instruction_op_u_greater_than(Op_u_greater_than instruction
,
4791 std::size_t instruction_start_index
)
4794 throw Parser_error(instruction_start_index
,
4795 instruction_start_index
,
4796 "instruction not implemented: "
4797 + std::string(get_enumerant_name(instruction
.get_operation())));
4800 void Spirv_to_llvm::handle_instruction_op_s_greater_than(Op_s_greater_than instruction
,
4801 std::size_t instruction_start_index
)
4804 throw Parser_error(instruction_start_index
,
4805 instruction_start_index
,
4806 "instruction not implemented: "
4807 + std::string(get_enumerant_name(instruction
.get_operation())));
4810 void Spirv_to_llvm::handle_instruction_op_u_greater_than_equal(Op_u_greater_than_equal instruction
,
4811 std::size_t instruction_start_index
)
4814 throw Parser_error(instruction_start_index
,
4815 instruction_start_index
,
4816 "instruction not implemented: "
4817 + std::string(get_enumerant_name(instruction
.get_operation())));
4820 void Spirv_to_llvm::handle_instruction_op_s_greater_than_equal(Op_s_greater_than_equal instruction
,
4821 std::size_t instruction_start_index
)
4824 throw Parser_error(instruction_start_index
,
4825 instruction_start_index
,
4826 "instruction not implemented: "
4827 + std::string(get_enumerant_name(instruction
.get_operation())));
4830 void Spirv_to_llvm::handle_instruction_op_u_less_than(Op_u_less_than instruction
,
4831 std::size_t instruction_start_index
)
4834 throw Parser_error(instruction_start_index
,
4835 instruction_start_index
,
4836 "instruction not implemented: "
4837 + std::string(get_enumerant_name(instruction
.get_operation())));
4840 void Spirv_to_llvm::handle_instruction_op_s_less_than(Op_s_less_than instruction
,
4841 std::size_t instruction_start_index
)
4844 throw Parser_error(instruction_start_index
,
4845 instruction_start_index
,
4846 "instruction not implemented: "
4847 + std::string(get_enumerant_name(instruction
.get_operation())));
4850 void Spirv_to_llvm::handle_instruction_op_u_less_than_equal(Op_u_less_than_equal instruction
,
4851 std::size_t instruction_start_index
)
4854 throw Parser_error(instruction_start_index
,
4855 instruction_start_index
,
4856 "instruction not implemented: "
4857 + std::string(get_enumerant_name(instruction
.get_operation())));
4860 void Spirv_to_llvm::handle_instruction_op_s_less_than_equal(Op_s_less_than_equal instruction
,
4861 std::size_t instruction_start_index
)
4864 throw Parser_error(instruction_start_index
,
4865 instruction_start_index
,
4866 "instruction not implemented: "
4867 + std::string(get_enumerant_name(instruction
.get_operation())));
4870 void Spirv_to_llvm::handle_instruction_op_f_ord_equal(Op_f_ord_equal instruction
,
4871 std::size_t instruction_start_index
)
4874 throw Parser_error(instruction_start_index
,
4875 instruction_start_index
,
4876 "instruction not implemented: "
4877 + std::string(get_enumerant_name(instruction
.get_operation())));
4880 void Spirv_to_llvm::handle_instruction_op_f_unord_equal(Op_f_unord_equal instruction
,
4881 std::size_t instruction_start_index
)
4884 throw Parser_error(instruction_start_index
,
4885 instruction_start_index
,
4886 "instruction not implemented: "
4887 + std::string(get_enumerant_name(instruction
.get_operation())));
4890 void Spirv_to_llvm::handle_instruction_op_f_ord_not_equal(Op_f_ord_not_equal instruction
,
4891 std::size_t instruction_start_index
)
4894 throw Parser_error(instruction_start_index
,
4895 instruction_start_index
,
4896 "instruction not implemented: "
4897 + std::string(get_enumerant_name(instruction
.get_operation())));
4900 void Spirv_to_llvm::handle_instruction_op_f_unord_not_equal(Op_f_unord_not_equal instruction
,
4901 std::size_t instruction_start_index
)
4904 throw Parser_error(instruction_start_index
,
4905 instruction_start_index
,
4906 "instruction not implemented: "
4907 + std::string(get_enumerant_name(instruction
.get_operation())));
4910 void Spirv_to_llvm::handle_instruction_op_f_ord_less_than(Op_f_ord_less_than instruction
,
4911 std::size_t instruction_start_index
)
4914 throw Parser_error(instruction_start_index
,
4915 instruction_start_index
,
4916 "instruction not implemented: "
4917 + std::string(get_enumerant_name(instruction
.get_operation())));
4920 void Spirv_to_llvm::handle_instruction_op_f_unord_less_than(Op_f_unord_less_than instruction
,
4921 std::size_t instruction_start_index
)
4924 throw Parser_error(instruction_start_index
,
4925 instruction_start_index
,
4926 "instruction not implemented: "
4927 + std::string(get_enumerant_name(instruction
.get_operation())));
4930 void Spirv_to_llvm::handle_instruction_op_f_ord_greater_than(Op_f_ord_greater_than instruction
,
4931 std::size_t instruction_start_index
)
4934 throw Parser_error(instruction_start_index
,
4935 instruction_start_index
,
4936 "instruction not implemented: "
4937 + std::string(get_enumerant_name(instruction
.get_operation())));
4940 void Spirv_to_llvm::handle_instruction_op_f_unord_greater_than(Op_f_unord_greater_than instruction
,
4941 std::size_t instruction_start_index
)
4944 throw Parser_error(instruction_start_index
,
4945 instruction_start_index
,
4946 "instruction not implemented: "
4947 + std::string(get_enumerant_name(instruction
.get_operation())));
4950 void Spirv_to_llvm::handle_instruction_op_f_ord_less_than_equal(
4951 Op_f_ord_less_than_equal instruction
, std::size_t instruction_start_index
)
4954 throw Parser_error(instruction_start_index
,
4955 instruction_start_index
,
4956 "instruction not implemented: "
4957 + std::string(get_enumerant_name(instruction
.get_operation())));
4960 void Spirv_to_llvm::handle_instruction_op_f_unord_less_than_equal(
4961 Op_f_unord_less_than_equal instruction
, std::size_t instruction_start_index
)
4964 throw Parser_error(instruction_start_index
,
4965 instruction_start_index
,
4966 "instruction not implemented: "
4967 + std::string(get_enumerant_name(instruction
.get_operation())));
4970 void Spirv_to_llvm::handle_instruction_op_f_ord_greater_than_equal(
4971 Op_f_ord_greater_than_equal instruction
, std::size_t instruction_start_index
)
4974 throw Parser_error(instruction_start_index
,
4975 instruction_start_index
,
4976 "instruction not implemented: "
4977 + std::string(get_enumerant_name(instruction
.get_operation())));
4980 void Spirv_to_llvm::handle_instruction_op_f_unord_greater_than_equal(
4981 Op_f_unord_greater_than_equal instruction
, std::size_t instruction_start_index
)
4984 throw Parser_error(instruction_start_index
,
4985 instruction_start_index
,
4986 "instruction not implemented: "
4987 + std::string(get_enumerant_name(instruction
.get_operation())));
4990 void Spirv_to_llvm::handle_instruction_op_shift_right_logical(Op_shift_right_logical instruction
,
4991 std::size_t instruction_start_index
)
4994 throw Parser_error(instruction_start_index
,
4995 instruction_start_index
,
4996 "instruction not implemented: "
4997 + std::string(get_enumerant_name(instruction
.get_operation())));
5000 void Spirv_to_llvm::handle_instruction_op_shift_right_arithmetic(
5001 Op_shift_right_arithmetic instruction
, std::size_t instruction_start_index
)
5004 throw Parser_error(instruction_start_index
,
5005 instruction_start_index
,
5006 "instruction not implemented: "
5007 + std::string(get_enumerant_name(instruction
.get_operation())));
5010 void Spirv_to_llvm::handle_instruction_op_shift_left_logical(Op_shift_left_logical instruction
,
5011 std::size_t instruction_start_index
)
5014 throw Parser_error(instruction_start_index
,
5015 instruction_start_index
,
5016 "instruction not implemented: "
5017 + std::string(get_enumerant_name(instruction
.get_operation())));
5020 void Spirv_to_llvm::handle_instruction_op_bitwise_or(Op_bitwise_or instruction
,
5021 std::size_t instruction_start_index
)
5024 throw Parser_error(instruction_start_index
,
5025 instruction_start_index
,
5026 "instruction not implemented: "
5027 + std::string(get_enumerant_name(instruction
.get_operation())));
5030 void Spirv_to_llvm::handle_instruction_op_bitwise_xor(Op_bitwise_xor instruction
,
5031 std::size_t instruction_start_index
)
5034 throw Parser_error(instruction_start_index
,
5035 instruction_start_index
,
5036 "instruction not implemented: "
5037 + std::string(get_enumerant_name(instruction
.get_operation())));
5040 void Spirv_to_llvm::handle_instruction_op_bitwise_and(Op_bitwise_and instruction
,
5041 std::size_t instruction_start_index
)
5044 throw Parser_error(instruction_start_index
,
5045 instruction_start_index
,
5046 "instruction not implemented: "
5047 + std::string(get_enumerant_name(instruction
.get_operation())));
5050 void Spirv_to_llvm::handle_instruction_op_not(Op_not instruction
,
5051 std::size_t instruction_start_index
)
5054 throw Parser_error(instruction_start_index
,
5055 instruction_start_index
,
5056 "instruction not implemented: "
5057 + std::string(get_enumerant_name(instruction
.get_operation())));
5060 void Spirv_to_llvm::handle_instruction_op_bit_field_insert(Op_bit_field_insert instruction
,
5061 std::size_t instruction_start_index
)
5064 throw Parser_error(instruction_start_index
,
5065 instruction_start_index
,
5066 "instruction not implemented: "
5067 + std::string(get_enumerant_name(instruction
.get_operation())));
5070 void Spirv_to_llvm::handle_instruction_op_bit_field_s_extract(Op_bit_field_s_extract instruction
,
5071 std::size_t instruction_start_index
)
5074 throw Parser_error(instruction_start_index
,
5075 instruction_start_index
,
5076 "instruction not implemented: "
5077 + std::string(get_enumerant_name(instruction
.get_operation())));
5080 void Spirv_to_llvm::handle_instruction_op_bit_field_u_extract(Op_bit_field_u_extract instruction
,
5081 std::size_t instruction_start_index
)
5084 throw Parser_error(instruction_start_index
,
5085 instruction_start_index
,
5086 "instruction not implemented: "
5087 + std::string(get_enumerant_name(instruction
.get_operation())));
5090 void Spirv_to_llvm::handle_instruction_op_bit_reverse(Op_bit_reverse instruction
,
5091 std::size_t instruction_start_index
)
5094 throw Parser_error(instruction_start_index
,
5095 instruction_start_index
,
5096 "instruction not implemented: "
5097 + std::string(get_enumerant_name(instruction
.get_operation())));
5100 void Spirv_to_llvm::handle_instruction_op_bit_count(Op_bit_count instruction
,
5101 std::size_t instruction_start_index
)
5104 throw Parser_error(instruction_start_index
,
5105 instruction_start_index
,
5106 "instruction not implemented: "
5107 + std::string(get_enumerant_name(instruction
.get_operation())));
5110 void Spirv_to_llvm::handle_instruction_op_d_pdx(Op_d_pdx instruction
,
5111 std::size_t instruction_start_index
)
5114 throw Parser_error(instruction_start_index
,
5115 instruction_start_index
,
5116 "instruction not implemented: "
5117 + std::string(get_enumerant_name(instruction
.get_operation())));
5120 void Spirv_to_llvm::handle_instruction_op_d_pdy(Op_d_pdy instruction
,
5121 std::size_t instruction_start_index
)
5124 throw Parser_error(instruction_start_index
,
5125 instruction_start_index
,
5126 "instruction not implemented: "
5127 + std::string(get_enumerant_name(instruction
.get_operation())));
5130 void Spirv_to_llvm::handle_instruction_op_fwidth(Op_fwidth instruction
,
5131 std::size_t instruction_start_index
)
5134 throw Parser_error(instruction_start_index
,
5135 instruction_start_index
,
5136 "instruction not implemented: "
5137 + std::string(get_enumerant_name(instruction
.get_operation())));
5140 void Spirv_to_llvm::handle_instruction_op_d_pdx_fine(Op_d_pdx_fine instruction
,
5141 std::size_t instruction_start_index
)
5144 throw Parser_error(instruction_start_index
,
5145 instruction_start_index
,
5146 "instruction not implemented: "
5147 + std::string(get_enumerant_name(instruction
.get_operation())));
5150 void Spirv_to_llvm::handle_instruction_op_d_pdy_fine(Op_d_pdy_fine instruction
,
5151 std::size_t instruction_start_index
)
5154 throw Parser_error(instruction_start_index
,
5155 instruction_start_index
,
5156 "instruction not implemented: "
5157 + std::string(get_enumerant_name(instruction
.get_operation())));
5160 void Spirv_to_llvm::handle_instruction_op_fwidth_fine(Op_fwidth_fine instruction
,
5161 std::size_t instruction_start_index
)
5164 throw Parser_error(instruction_start_index
,
5165 instruction_start_index
,
5166 "instruction not implemented: "
5167 + std::string(get_enumerant_name(instruction
.get_operation())));
5170 void Spirv_to_llvm::handle_instruction_op_d_pdx_coarse(Op_d_pdx_coarse instruction
,
5171 std::size_t instruction_start_index
)
5174 throw Parser_error(instruction_start_index
,
5175 instruction_start_index
,
5176 "instruction not implemented: "
5177 + std::string(get_enumerant_name(instruction
.get_operation())));
5180 void Spirv_to_llvm::handle_instruction_op_d_pdy_coarse(Op_d_pdy_coarse instruction
,
5181 std::size_t instruction_start_index
)
5184 throw Parser_error(instruction_start_index
,
5185 instruction_start_index
,
5186 "instruction not implemented: "
5187 + std::string(get_enumerant_name(instruction
.get_operation())));
5190 void Spirv_to_llvm::handle_instruction_op_fwidth_coarse(Op_fwidth_coarse instruction
,
5191 std::size_t instruction_start_index
)
5194 throw Parser_error(instruction_start_index
,
5195 instruction_start_index
,
5196 "instruction not implemented: "
5197 + std::string(get_enumerant_name(instruction
.get_operation())));
5200 void Spirv_to_llvm::handle_instruction_op_emit_vertex(Op_emit_vertex instruction
,
5201 std::size_t instruction_start_index
)
5204 throw Parser_error(instruction_start_index
,
5205 instruction_start_index
,
5206 "instruction not implemented: "
5207 + std::string(get_enumerant_name(instruction
.get_operation())));
5210 void Spirv_to_llvm::handle_instruction_op_end_primitive(Op_end_primitive instruction
,
5211 std::size_t instruction_start_index
)
5214 throw Parser_error(instruction_start_index
,
5215 instruction_start_index
,
5216 "instruction not implemented: "
5217 + std::string(get_enumerant_name(instruction
.get_operation())));
5220 void Spirv_to_llvm::handle_instruction_op_emit_stream_vertex(Op_emit_stream_vertex instruction
,
5221 std::size_t instruction_start_index
)
5224 throw Parser_error(instruction_start_index
,
5225 instruction_start_index
,
5226 "instruction not implemented: "
5227 + std::string(get_enumerant_name(instruction
.get_operation())));
5230 void Spirv_to_llvm::handle_instruction_op_end_stream_primitive(Op_end_stream_primitive instruction
,
5231 std::size_t instruction_start_index
)
5234 throw Parser_error(instruction_start_index
,
5235 instruction_start_index
,
5236 "instruction not implemented: "
5237 + std::string(get_enumerant_name(instruction
.get_operation())));
5240 void Spirv_to_llvm::handle_instruction_op_control_barrier(Op_control_barrier instruction
,
5241 std::size_t instruction_start_index
)
5244 throw Parser_error(instruction_start_index
,
5245 instruction_start_index
,
5246 "instruction not implemented: "
5247 + std::string(get_enumerant_name(instruction
.get_operation())));
5250 void Spirv_to_llvm::handle_instruction_op_memory_barrier(Op_memory_barrier instruction
,
5251 std::size_t instruction_start_index
)
5254 throw Parser_error(instruction_start_index
,
5255 instruction_start_index
,
5256 "instruction not implemented: "
5257 + std::string(get_enumerant_name(instruction
.get_operation())));
5260 void Spirv_to_llvm::handle_instruction_op_atomic_load(Op_atomic_load instruction
,
5261 std::size_t instruction_start_index
)
5264 throw Parser_error(instruction_start_index
,
5265 instruction_start_index
,
5266 "instruction not implemented: "
5267 + std::string(get_enumerant_name(instruction
.get_operation())));
5270 void Spirv_to_llvm::handle_instruction_op_atomic_store(Op_atomic_store instruction
,
5271 std::size_t instruction_start_index
)
5274 throw Parser_error(instruction_start_index
,
5275 instruction_start_index
,
5276 "instruction not implemented: "
5277 + std::string(get_enumerant_name(instruction
.get_operation())));
5280 void Spirv_to_llvm::handle_instruction_op_atomic_exchange(Op_atomic_exchange instruction
,
5281 std::size_t instruction_start_index
)
5284 throw Parser_error(instruction_start_index
,
5285 instruction_start_index
,
5286 "instruction not implemented: "
5287 + std::string(get_enumerant_name(instruction
.get_operation())));
5290 void Spirv_to_llvm::handle_instruction_op_atomic_compare_exchange(
5291 Op_atomic_compare_exchange instruction
, std::size_t instruction_start_index
)
5294 throw Parser_error(instruction_start_index
,
5295 instruction_start_index
,
5296 "instruction not implemented: "
5297 + std::string(get_enumerant_name(instruction
.get_operation())));
5300 void Spirv_to_llvm::handle_instruction_op_atomic_compare_exchange_weak(
5301 Op_atomic_compare_exchange_weak instruction
, std::size_t instruction_start_index
)
5304 throw Parser_error(instruction_start_index
,
5305 instruction_start_index
,
5306 "instruction not implemented: "
5307 + std::string(get_enumerant_name(instruction
.get_operation())));
5310 void Spirv_to_llvm::handle_instruction_op_atomic_i_increment(Op_atomic_i_increment instruction
,
5311 std::size_t instruction_start_index
)
5314 throw Parser_error(instruction_start_index
,
5315 instruction_start_index
,
5316 "instruction not implemented: "
5317 + std::string(get_enumerant_name(instruction
.get_operation())));
5320 void Spirv_to_llvm::handle_instruction_op_atomic_i_decrement(Op_atomic_i_decrement instruction
,
5321 std::size_t instruction_start_index
)
5324 throw Parser_error(instruction_start_index
,
5325 instruction_start_index
,
5326 "instruction not implemented: "
5327 + std::string(get_enumerant_name(instruction
.get_operation())));
5330 void Spirv_to_llvm::handle_instruction_op_atomic_i_add(Op_atomic_i_add instruction
,
5331 std::size_t instruction_start_index
)
5334 throw Parser_error(instruction_start_index
,
5335 instruction_start_index
,
5336 "instruction not implemented: "
5337 + std::string(get_enumerant_name(instruction
.get_operation())));
5340 void Spirv_to_llvm::handle_instruction_op_atomic_i_sub(Op_atomic_i_sub instruction
,
5341 std::size_t instruction_start_index
)
5344 throw Parser_error(instruction_start_index
,
5345 instruction_start_index
,
5346 "instruction not implemented: "
5347 + std::string(get_enumerant_name(instruction
.get_operation())));
5350 void Spirv_to_llvm::handle_instruction_op_atomic_s_min(Op_atomic_s_min instruction
,
5351 std::size_t instruction_start_index
)
5354 throw Parser_error(instruction_start_index
,
5355 instruction_start_index
,
5356 "instruction not implemented: "
5357 + std::string(get_enumerant_name(instruction
.get_operation())));
5360 void Spirv_to_llvm::handle_instruction_op_atomic_u_min(Op_atomic_u_min instruction
,
5361 std::size_t instruction_start_index
)
5364 throw Parser_error(instruction_start_index
,
5365 instruction_start_index
,
5366 "instruction not implemented: "
5367 + std::string(get_enumerant_name(instruction
.get_operation())));
5370 void Spirv_to_llvm::handle_instruction_op_atomic_s_max(Op_atomic_s_max instruction
,
5371 std::size_t instruction_start_index
)
5374 throw Parser_error(instruction_start_index
,
5375 instruction_start_index
,
5376 "instruction not implemented: "
5377 + std::string(get_enumerant_name(instruction
.get_operation())));
5380 void Spirv_to_llvm::handle_instruction_op_atomic_u_max(Op_atomic_u_max instruction
,
5381 std::size_t instruction_start_index
)
5384 throw Parser_error(instruction_start_index
,
5385 instruction_start_index
,
5386 "instruction not implemented: "
5387 + std::string(get_enumerant_name(instruction
.get_operation())));
5390 void Spirv_to_llvm::handle_instruction_op_atomic_and(Op_atomic_and instruction
,
5391 std::size_t instruction_start_index
)
5394 throw Parser_error(instruction_start_index
,
5395 instruction_start_index
,
5396 "instruction not implemented: "
5397 + std::string(get_enumerant_name(instruction
.get_operation())));
5400 void Spirv_to_llvm::handle_instruction_op_atomic_or(Op_atomic_or instruction
,
5401 std::size_t instruction_start_index
)
5404 throw Parser_error(instruction_start_index
,
5405 instruction_start_index
,
5406 "instruction not implemented: "
5407 + std::string(get_enumerant_name(instruction
.get_operation())));
5410 void Spirv_to_llvm::handle_instruction_op_atomic_xor(Op_atomic_xor instruction
,
5411 std::size_t instruction_start_index
)
5414 throw Parser_error(instruction_start_index
,
5415 instruction_start_index
,
5416 "instruction not implemented: "
5417 + std::string(get_enumerant_name(instruction
.get_operation())));
5420 void Spirv_to_llvm::handle_instruction_op_phi(Op_phi instruction
,
5421 std::size_t instruction_start_index
)
5424 throw Parser_error(instruction_start_index
,
5425 instruction_start_index
,
5426 "instruction not implemented: "
5427 + std::string(get_enumerant_name(instruction
.get_operation())));
5430 void Spirv_to_llvm::handle_instruction_op_loop_merge(Op_loop_merge instruction
,
5431 std::size_t instruction_start_index
)
5433 last_merge_instruction
=
5434 Last_merge_instruction(std::move(instruction
), instruction_start_index
);
5437 void Spirv_to_llvm::handle_instruction_op_selection_merge(Op_selection_merge instruction
,
5438 std::size_t instruction_start_index
)
5440 last_merge_instruction
=
5441 Last_merge_instruction(std::move(instruction
), instruction_start_index
);
5444 void Spirv_to_llvm::handle_instruction_op_label(Op_label instruction
,
5445 std::size_t instruction_start_index
)
5447 if(current_function_id
== 0)
5448 throw Parser_error(instruction_start_index
,
5449 instruction_start_index
,
5450 "OpLabel not allowed outside a function");
5451 if(current_basic_block_id
!= 0)
5452 throw Parser_error(instruction_start_index
,
5453 instruction_start_index
,
5454 "missing block terminator before OpLabel");
5455 current_basic_block_id
= instruction
.result
;
5458 case Stage::calculate_types
:
5460 case Stage::generate_code
:
5462 auto &function
= get_id_state(current_function_id
).function
.value();
5463 if(!get_id_state(current_basic_block_id
).decorations
.empty())
5464 throw Parser_error(instruction_start_index
,
5465 instruction_start_index
,
5466 "decorations on label not implemented");
5467 auto block
= get_or_make_label(instruction
.result
);
5468 ::LLVMPositionBuilderAtEnd(builder
.get(), block
);
5469 if(!function
.entry_block
)
5471 auto io_struct_value
= ::LLVMGetParam(function
.function
, io_struct_argument_index
);
5472 auto inputs_struct_value
= ::LLVMBuildStructGEP(
5475 io_struct
->get_members(true)[this->inputs_member
].llvm_member_index
,
5477 auto outputs_struct_value
= ::LLVMBuildStructGEP(
5480 io_struct
->get_members(true)[this->outputs_member
].llvm_member_index
,
5482 function
.entry_block
= Function_state::Entry_block(
5483 block
, io_struct_value
, inputs_struct_value
, outputs_struct_value
);
5484 for(auto iter
= function_entry_block_handlers
.begin();
5485 iter
!= function_entry_block_handlers
.end();)
5488 // increment before calling in case the hander removes itself
5497 void Spirv_to_llvm::handle_instruction_op_branch(
5498 Op_branch instruction
, [[gnu::unused
]] std::size_t instruction_start_index
)
5500 auto merge
= std::move(last_merge_instruction
);
5501 last_merge_instruction
.reset();
5502 current_basic_block_id
= 0;
5505 case Stage::calculate_types
:
5507 case Stage::generate_code
:
5509 ::LLVMBuildBr(builder
.get(), get_or_make_label(instruction
.target_label
));
5515 void Spirv_to_llvm::handle_instruction_op_branch_conditional(Op_branch_conditional instruction
,
5516 std::size_t instruction_start_index
)
5519 throw Parser_error(instruction_start_index
,
5520 instruction_start_index
,
5521 "instruction not implemented: "
5522 + std::string(get_enumerant_name(instruction
.get_operation())));
5525 void Spirv_to_llvm::handle_instruction_op_switch(
5526 Op_switch instruction
, [[gnu::unused
]] std::size_t instruction_start_index
)
5528 auto merge
= std::move(last_merge_instruction
.value());
5529 last_merge_instruction
.reset();
5530 current_basic_block_id
= 0;
5533 case Stage::calculate_types
:
5535 case Stage::generate_code
:
5537 for(auto &target
: instruction
.target
)
5538 get_or_make_label(target
.part_2
); // create basic blocks first
5539 auto selector
= get_id_state(instruction
.selector
).value
.value();
5540 auto switch_instruction
= ::LLVMBuildSwitch(builder
.get(),
5542 get_or_make_label(instruction
.default_
),
5543 instruction
.target
.size());
5544 for(auto &target
: instruction
.target
)
5547 ::LLVMConstInt(selector
.type
->get_or_make_type().type
, target
.part_1
, false),
5548 get_or_make_label(target
.part_2
));
5554 void Spirv_to_llvm::handle_instruction_op_kill(Op_kill instruction
,
5555 std::size_t instruction_start_index
)
5558 throw Parser_error(instruction_start_index
,
5559 instruction_start_index
,
5560 "instruction not implemented: "
5561 + std::string(get_enumerant_name(instruction
.get_operation())));
5564 void Spirv_to_llvm::handle_instruction_op_return(
5565 [[gnu::unused
]] Op_return instruction
, [[gnu::unused
]] std::size_t instruction_start_index
)
5567 current_basic_block_id
= 0;
5570 case Stage::calculate_types
:
5572 case Stage::generate_code
:
5574 ::LLVMBuildRetVoid(builder
.get());
5580 void Spirv_to_llvm::handle_instruction_op_return_value(Op_return_value instruction
,
5581 std::size_t instruction_start_index
)
5584 throw Parser_error(instruction_start_index
,
5585 instruction_start_index
,
5586 "instruction not implemented: "
5587 + std::string(get_enumerant_name(instruction
.get_operation())));
5590 void Spirv_to_llvm::handle_instruction_op_unreachable(Op_unreachable instruction
,
5591 std::size_t instruction_start_index
)
5594 throw Parser_error(instruction_start_index
,
5595 instruction_start_index
,
5596 "instruction not implemented: "
5597 + std::string(get_enumerant_name(instruction
.get_operation())));
5600 void Spirv_to_llvm::handle_instruction_op_lifetime_start(Op_lifetime_start instruction
,
5601 std::size_t instruction_start_index
)
5604 throw Parser_error(instruction_start_index
,
5605 instruction_start_index
,
5606 "instruction not implemented: "
5607 + std::string(get_enumerant_name(instruction
.get_operation())));
5610 void Spirv_to_llvm::handle_instruction_op_lifetime_stop(Op_lifetime_stop instruction
,
5611 std::size_t instruction_start_index
)
5614 throw Parser_error(instruction_start_index
,
5615 instruction_start_index
,
5616 "instruction not implemented: "
5617 + std::string(get_enumerant_name(instruction
.get_operation())));
5620 void Spirv_to_llvm::handle_instruction_op_group_async_copy(Op_group_async_copy instruction
,
5621 std::size_t instruction_start_index
)
5624 throw Parser_error(instruction_start_index
,
5625 instruction_start_index
,
5626 "instruction not implemented: "
5627 + std::string(get_enumerant_name(instruction
.get_operation())));
5630 void Spirv_to_llvm::handle_instruction_op_group_wait_events(Op_group_wait_events instruction
,
5631 std::size_t instruction_start_index
)
5634 throw Parser_error(instruction_start_index
,
5635 instruction_start_index
,
5636 "instruction not implemented: "
5637 + std::string(get_enumerant_name(instruction
.get_operation())));
5640 void Spirv_to_llvm::handle_instruction_op_group_all(Op_group_all instruction
,
5641 std::size_t instruction_start_index
)
5644 throw Parser_error(instruction_start_index
,
5645 instruction_start_index
,
5646 "instruction not implemented: "
5647 + std::string(get_enumerant_name(instruction
.get_operation())));
5650 void Spirv_to_llvm::handle_instruction_op_group_any(Op_group_any instruction
,
5651 std::size_t instruction_start_index
)
5654 throw Parser_error(instruction_start_index
,
5655 instruction_start_index
,
5656 "instruction not implemented: "
5657 + std::string(get_enumerant_name(instruction
.get_operation())));
5660 void Spirv_to_llvm::handle_instruction_op_group_broadcast(Op_group_broadcast instruction
,
5661 std::size_t instruction_start_index
)
5664 throw Parser_error(instruction_start_index
,
5665 instruction_start_index
,
5666 "instruction not implemented: "
5667 + std::string(get_enumerant_name(instruction
.get_operation())));
5670 void Spirv_to_llvm::handle_instruction_op_group_i_add(Op_group_i_add instruction
,
5671 std::size_t instruction_start_index
)
5674 throw Parser_error(instruction_start_index
,
5675 instruction_start_index
,
5676 "instruction not implemented: "
5677 + std::string(get_enumerant_name(instruction
.get_operation())));
5680 void Spirv_to_llvm::handle_instruction_op_group_f_add(Op_group_f_add instruction
,
5681 std::size_t instruction_start_index
)
5684 throw Parser_error(instruction_start_index
,
5685 instruction_start_index
,
5686 "instruction not implemented: "
5687 + std::string(get_enumerant_name(instruction
.get_operation())));
5690 void Spirv_to_llvm::handle_instruction_op_group_f_min(Op_group_f_min instruction
,
5691 std::size_t instruction_start_index
)
5694 throw Parser_error(instruction_start_index
,
5695 instruction_start_index
,
5696 "instruction not implemented: "
5697 + std::string(get_enumerant_name(instruction
.get_operation())));
5700 void Spirv_to_llvm::handle_instruction_op_group_u_min(Op_group_u_min instruction
,
5701 std::size_t instruction_start_index
)
5704 throw Parser_error(instruction_start_index
,
5705 instruction_start_index
,
5706 "instruction not implemented: "
5707 + std::string(get_enumerant_name(instruction
.get_operation())));
5710 void Spirv_to_llvm::handle_instruction_op_group_s_min(Op_group_s_min instruction
,
5711 std::size_t instruction_start_index
)
5714 throw Parser_error(instruction_start_index
,
5715 instruction_start_index
,
5716 "instruction not implemented: "
5717 + std::string(get_enumerant_name(instruction
.get_operation())));
5720 void Spirv_to_llvm::handle_instruction_op_group_f_max(Op_group_f_max instruction
,
5721 std::size_t instruction_start_index
)
5724 throw Parser_error(instruction_start_index
,
5725 instruction_start_index
,
5726 "instruction not implemented: "
5727 + std::string(get_enumerant_name(instruction
.get_operation())));
5730 void Spirv_to_llvm::handle_instruction_op_group_u_max(Op_group_u_max instruction
,
5731 std::size_t instruction_start_index
)
5734 throw Parser_error(instruction_start_index
,
5735 instruction_start_index
,
5736 "instruction not implemented: "
5737 + std::string(get_enumerant_name(instruction
.get_operation())));
5740 void Spirv_to_llvm::handle_instruction_op_group_s_max(Op_group_s_max instruction
,
5741 std::size_t instruction_start_index
)
5744 throw Parser_error(instruction_start_index
,
5745 instruction_start_index
,
5746 "instruction not implemented: "
5747 + std::string(get_enumerant_name(instruction
.get_operation())));
5750 void Spirv_to_llvm::handle_instruction_op_read_pipe(Op_read_pipe instruction
,
5751 std::size_t instruction_start_index
)
5754 throw Parser_error(instruction_start_index
,
5755 instruction_start_index
,
5756 "instruction not implemented: "
5757 + std::string(get_enumerant_name(instruction
.get_operation())));
5760 void Spirv_to_llvm::handle_instruction_op_write_pipe(Op_write_pipe instruction
,
5761 std::size_t instruction_start_index
)
5764 throw Parser_error(instruction_start_index
,
5765 instruction_start_index
,
5766 "instruction not implemented: "
5767 + std::string(get_enumerant_name(instruction
.get_operation())));
5770 void Spirv_to_llvm::handle_instruction_op_reserved_read_pipe(Op_reserved_read_pipe instruction
,
5771 std::size_t instruction_start_index
)
5774 throw Parser_error(instruction_start_index
,
5775 instruction_start_index
,
5776 "instruction not implemented: "
5777 + std::string(get_enumerant_name(instruction
.get_operation())));
5780 void Spirv_to_llvm::handle_instruction_op_reserved_write_pipe(Op_reserved_write_pipe instruction
,
5781 std::size_t instruction_start_index
)
5784 throw Parser_error(instruction_start_index
,
5785 instruction_start_index
,
5786 "instruction not implemented: "
5787 + std::string(get_enumerant_name(instruction
.get_operation())));
5790 void Spirv_to_llvm::handle_instruction_op_reserve_read_pipe_packets(
5791 Op_reserve_read_pipe_packets instruction
, std::size_t instruction_start_index
)
5794 throw Parser_error(instruction_start_index
,
5795 instruction_start_index
,
5796 "instruction not implemented: "
5797 + std::string(get_enumerant_name(instruction
.get_operation())));
5800 void Spirv_to_llvm::handle_instruction_op_reserve_write_pipe_packets(
5801 Op_reserve_write_pipe_packets instruction
, std::size_t instruction_start_index
)
5804 throw Parser_error(instruction_start_index
,
5805 instruction_start_index
,
5806 "instruction not implemented: "
5807 + std::string(get_enumerant_name(instruction
.get_operation())));
5810 void Spirv_to_llvm::handle_instruction_op_commit_read_pipe(Op_commit_read_pipe instruction
,
5811 std::size_t instruction_start_index
)
5814 throw Parser_error(instruction_start_index
,
5815 instruction_start_index
,
5816 "instruction not implemented: "
5817 + std::string(get_enumerant_name(instruction
.get_operation())));
5820 void Spirv_to_llvm::handle_instruction_op_commit_write_pipe(Op_commit_write_pipe instruction
,
5821 std::size_t instruction_start_index
)
5824 throw Parser_error(instruction_start_index
,
5825 instruction_start_index
,
5826 "instruction not implemented: "
5827 + std::string(get_enumerant_name(instruction
.get_operation())));
5830 void Spirv_to_llvm::handle_instruction_op_is_valid_reserve_id(Op_is_valid_reserve_id instruction
,
5831 std::size_t instruction_start_index
)
5834 throw Parser_error(instruction_start_index
,
5835 instruction_start_index
,
5836 "instruction not implemented: "
5837 + std::string(get_enumerant_name(instruction
.get_operation())));
5840 void Spirv_to_llvm::handle_instruction_op_get_num_pipe_packets(Op_get_num_pipe_packets instruction
,
5841 std::size_t instruction_start_index
)
5844 throw Parser_error(instruction_start_index
,
5845 instruction_start_index
,
5846 "instruction not implemented: "
5847 + std::string(get_enumerant_name(instruction
.get_operation())));
5850 void Spirv_to_llvm::handle_instruction_op_get_max_pipe_packets(Op_get_max_pipe_packets instruction
,
5851 std::size_t instruction_start_index
)
5854 throw Parser_error(instruction_start_index
,
5855 instruction_start_index
,
5856 "instruction not implemented: "
5857 + std::string(get_enumerant_name(instruction
.get_operation())));
5860 void Spirv_to_llvm::handle_instruction_op_group_reserve_read_pipe_packets(
5861 Op_group_reserve_read_pipe_packets instruction
, std::size_t instruction_start_index
)
5864 throw Parser_error(instruction_start_index
,
5865 instruction_start_index
,
5866 "instruction not implemented: "
5867 + std::string(get_enumerant_name(instruction
.get_operation())));
5870 void Spirv_to_llvm::handle_instruction_op_group_reserve_write_pipe_packets(
5871 Op_group_reserve_write_pipe_packets instruction
, std::size_t instruction_start_index
)
5874 throw Parser_error(instruction_start_index
,
5875 instruction_start_index
,
5876 "instruction not implemented: "
5877 + std::string(get_enumerant_name(instruction
.get_operation())));
5880 void Spirv_to_llvm::handle_instruction_op_group_commit_read_pipe(
5881 Op_group_commit_read_pipe instruction
, std::size_t instruction_start_index
)
5884 throw Parser_error(instruction_start_index
,
5885 instruction_start_index
,
5886 "instruction not implemented: "
5887 + std::string(get_enumerant_name(instruction
.get_operation())));
5890 void Spirv_to_llvm::handle_instruction_op_group_commit_write_pipe(
5891 Op_group_commit_write_pipe instruction
, std::size_t instruction_start_index
)
5894 throw Parser_error(instruction_start_index
,
5895 instruction_start_index
,
5896 "instruction not implemented: "
5897 + std::string(get_enumerant_name(instruction
.get_operation())));
5900 void Spirv_to_llvm::handle_instruction_op_enqueue_marker(Op_enqueue_marker instruction
,
5901 std::size_t instruction_start_index
)
5904 throw Parser_error(instruction_start_index
,
5905 instruction_start_index
,
5906 "instruction not implemented: "
5907 + std::string(get_enumerant_name(instruction
.get_operation())));
5910 void Spirv_to_llvm::handle_instruction_op_enqueue_kernel(Op_enqueue_kernel instruction
,
5911 std::size_t instruction_start_index
)
5914 throw Parser_error(instruction_start_index
,
5915 instruction_start_index
,
5916 "instruction not implemented: "
5917 + std::string(get_enumerant_name(instruction
.get_operation())));
5920 void Spirv_to_llvm::handle_instruction_op_get_kernel_n_drange_sub_group_count(
5921 Op_get_kernel_n_drange_sub_group_count instruction
, std::size_t instruction_start_index
)
5924 throw Parser_error(instruction_start_index
,
5925 instruction_start_index
,
5926 "instruction not implemented: "
5927 + std::string(get_enumerant_name(instruction
.get_operation())));
5930 void Spirv_to_llvm::handle_instruction_op_get_kernel_n_drange_max_sub_group_size(
5931 Op_get_kernel_n_drange_max_sub_group_size instruction
, std::size_t instruction_start_index
)
5934 throw Parser_error(instruction_start_index
,
5935 instruction_start_index
,
5936 "instruction not implemented: "
5937 + std::string(get_enumerant_name(instruction
.get_operation())));
5940 void Spirv_to_llvm::handle_instruction_op_get_kernel_work_group_size(
5941 Op_get_kernel_work_group_size instruction
, std::size_t instruction_start_index
)
5944 throw Parser_error(instruction_start_index
,
5945 instruction_start_index
,
5946 "instruction not implemented: "
5947 + std::string(get_enumerant_name(instruction
.get_operation())));
5950 void Spirv_to_llvm::handle_instruction_op_get_kernel_preferred_work_group_size_multiple(
5951 Op_get_kernel_preferred_work_group_size_multiple instruction
,
5952 std::size_t instruction_start_index
)
5955 throw Parser_error(instruction_start_index
,
5956 instruction_start_index
,
5957 "instruction not implemented: "
5958 + std::string(get_enumerant_name(instruction
.get_operation())));
5961 void Spirv_to_llvm::handle_instruction_op_retain_event(Op_retain_event instruction
,
5962 std::size_t instruction_start_index
)
5965 throw Parser_error(instruction_start_index
,
5966 instruction_start_index
,
5967 "instruction not implemented: "
5968 + std::string(get_enumerant_name(instruction
.get_operation())));
5971 void Spirv_to_llvm::handle_instruction_op_release_event(Op_release_event instruction
,
5972 std::size_t instruction_start_index
)
5975 throw Parser_error(instruction_start_index
,
5976 instruction_start_index
,
5977 "instruction not implemented: "
5978 + std::string(get_enumerant_name(instruction
.get_operation())));
5981 void Spirv_to_llvm::handle_instruction_op_create_user_event(Op_create_user_event instruction
,
5982 std::size_t instruction_start_index
)
5985 throw Parser_error(instruction_start_index
,
5986 instruction_start_index
,
5987 "instruction not implemented: "
5988 + std::string(get_enumerant_name(instruction
.get_operation())));
5991 void Spirv_to_llvm::handle_instruction_op_is_valid_event(Op_is_valid_event instruction
,
5992 std::size_t instruction_start_index
)
5995 throw Parser_error(instruction_start_index
,
5996 instruction_start_index
,
5997 "instruction not implemented: "
5998 + std::string(get_enumerant_name(instruction
.get_operation())));
6001 void Spirv_to_llvm::handle_instruction_op_set_user_event_status(
6002 Op_set_user_event_status instruction
, std::size_t instruction_start_index
)
6005 throw Parser_error(instruction_start_index
,
6006 instruction_start_index
,
6007 "instruction not implemented: "
6008 + std::string(get_enumerant_name(instruction
.get_operation())));
6011 void Spirv_to_llvm::handle_instruction_op_capture_event_profiling_info(
6012 Op_capture_event_profiling_info instruction
, std::size_t instruction_start_index
)
6015 throw Parser_error(instruction_start_index
,
6016 instruction_start_index
,
6017 "instruction not implemented: "
6018 + std::string(get_enumerant_name(instruction
.get_operation())));
6021 void Spirv_to_llvm::handle_instruction_op_get_default_queue(Op_get_default_queue instruction
,
6022 std::size_t instruction_start_index
)
6025 throw Parser_error(instruction_start_index
,
6026 instruction_start_index
,
6027 "instruction not implemented: "
6028 + std::string(get_enumerant_name(instruction
.get_operation())));
6031 void Spirv_to_llvm::handle_instruction_op_build_nd_range(Op_build_nd_range instruction
,
6032 std::size_t instruction_start_index
)
6035 throw Parser_error(instruction_start_index
,
6036 instruction_start_index
,
6037 "instruction not implemented: "
6038 + std::string(get_enumerant_name(instruction
.get_operation())));
6041 void Spirv_to_llvm::handle_instruction_op_image_sparse_sample_implicit_lod(
6042 Op_image_sparse_sample_implicit_lod instruction
, std::size_t instruction_start_index
)
6045 throw Parser_error(instruction_start_index
,
6046 instruction_start_index
,
6047 "instruction not implemented: "
6048 + std::string(get_enumerant_name(instruction
.get_operation())));
6051 void Spirv_to_llvm::handle_instruction_op_image_sparse_sample_explicit_lod(
6052 Op_image_sparse_sample_explicit_lod instruction
, std::size_t instruction_start_index
)
6055 throw Parser_error(instruction_start_index
,
6056 instruction_start_index
,
6057 "instruction not implemented: "
6058 + std::string(get_enumerant_name(instruction
.get_operation())));
6061 void Spirv_to_llvm::handle_instruction_op_image_sparse_sample_dref_implicit_lod(
6062 Op_image_sparse_sample_dref_implicit_lod instruction
, std::size_t instruction_start_index
)
6065 throw Parser_error(instruction_start_index
,
6066 instruction_start_index
,
6067 "instruction not implemented: "
6068 + std::string(get_enumerant_name(instruction
.get_operation())));
6071 void Spirv_to_llvm::handle_instruction_op_image_sparse_sample_dref_explicit_lod(
6072 Op_image_sparse_sample_dref_explicit_lod instruction
, std::size_t instruction_start_index
)
6075 throw Parser_error(instruction_start_index
,
6076 instruction_start_index
,
6077 "instruction not implemented: "
6078 + std::string(get_enumerant_name(instruction
.get_operation())));
6081 void Spirv_to_llvm::handle_instruction_op_image_sparse_sample_proj_implicit_lod(
6082 Op_image_sparse_sample_proj_implicit_lod instruction
, std::size_t instruction_start_index
)
6085 throw Parser_error(instruction_start_index
,
6086 instruction_start_index
,
6087 "instruction not implemented: "
6088 + std::string(get_enumerant_name(instruction
.get_operation())));
6091 void Spirv_to_llvm::handle_instruction_op_image_sparse_sample_proj_explicit_lod(
6092 Op_image_sparse_sample_proj_explicit_lod instruction
, std::size_t instruction_start_index
)
6095 throw Parser_error(instruction_start_index
,
6096 instruction_start_index
,
6097 "instruction not implemented: "
6098 + std::string(get_enumerant_name(instruction
.get_operation())));
6101 void Spirv_to_llvm::handle_instruction_op_image_sparse_sample_proj_dref_implicit_lod(
6102 Op_image_sparse_sample_proj_dref_implicit_lod instruction
, std::size_t instruction_start_index
)
6105 throw Parser_error(instruction_start_index
,
6106 instruction_start_index
,
6107 "instruction not implemented: "
6108 + std::string(get_enumerant_name(instruction
.get_operation())));
6111 void Spirv_to_llvm::handle_instruction_op_image_sparse_sample_proj_dref_explicit_lod(
6112 Op_image_sparse_sample_proj_dref_explicit_lod instruction
, std::size_t instruction_start_index
)
6115 throw Parser_error(instruction_start_index
,
6116 instruction_start_index
,
6117 "instruction not implemented: "
6118 + std::string(get_enumerant_name(instruction
.get_operation())));
6121 void Spirv_to_llvm::handle_instruction_op_image_sparse_fetch(Op_image_sparse_fetch instruction
,
6122 std::size_t instruction_start_index
)
6125 throw Parser_error(instruction_start_index
,
6126 instruction_start_index
,
6127 "instruction not implemented: "
6128 + std::string(get_enumerant_name(instruction
.get_operation())));
6131 void Spirv_to_llvm::handle_instruction_op_image_sparse_gather(Op_image_sparse_gather instruction
,
6132 std::size_t instruction_start_index
)
6135 throw Parser_error(instruction_start_index
,
6136 instruction_start_index
,
6137 "instruction not implemented: "
6138 + std::string(get_enumerant_name(instruction
.get_operation())));
6141 void Spirv_to_llvm::handle_instruction_op_image_sparse_dref_gather(
6142 Op_image_sparse_dref_gather instruction
, std::size_t instruction_start_index
)
6145 throw Parser_error(instruction_start_index
,
6146 instruction_start_index
,
6147 "instruction not implemented: "
6148 + std::string(get_enumerant_name(instruction
.get_operation())));
6151 void Spirv_to_llvm::handle_instruction_op_image_sparse_texels_resident(
6152 Op_image_sparse_texels_resident instruction
, std::size_t instruction_start_index
)
6155 throw Parser_error(instruction_start_index
,
6156 instruction_start_index
,
6157 "instruction not implemented: "
6158 + std::string(get_enumerant_name(instruction
.get_operation())));
6161 void Spirv_to_llvm::handle_instruction_op_no_line(Op_no_line instruction
,
6162 std::size_t instruction_start_index
)
6165 throw Parser_error(instruction_start_index
,
6166 instruction_start_index
,
6167 "instruction not implemented: "
6168 + std::string(get_enumerant_name(instruction
.get_operation())));
6171 void Spirv_to_llvm::handle_instruction_op_atomic_flag_test_and_set(
6172 Op_atomic_flag_test_and_set instruction
, std::size_t instruction_start_index
)
6175 throw Parser_error(instruction_start_index
,
6176 instruction_start_index
,
6177 "instruction not implemented: "
6178 + std::string(get_enumerant_name(instruction
.get_operation())));
6181 void Spirv_to_llvm::handle_instruction_op_atomic_flag_clear(Op_atomic_flag_clear instruction
,
6182 std::size_t instruction_start_index
)
6185 throw Parser_error(instruction_start_index
,
6186 instruction_start_index
,
6187 "instruction not implemented: "
6188 + std::string(get_enumerant_name(instruction
.get_operation())));
6191 void Spirv_to_llvm::handle_instruction_op_image_sparse_read(Op_image_sparse_read instruction
,
6192 std::size_t instruction_start_index
)
6195 throw Parser_error(instruction_start_index
,
6196 instruction_start_index
,
6197 "instruction not implemented: "
6198 + std::string(get_enumerant_name(instruction
.get_operation())));
6201 void Spirv_to_llvm::handle_instruction_op_size_of(Op_size_of instruction
,
6202 std::size_t instruction_start_index
)
6205 throw Parser_error(instruction_start_index
,
6206 instruction_start_index
,
6207 "instruction not implemented: "
6208 + std::string(get_enumerant_name(instruction
.get_operation())));
6211 void Spirv_to_llvm::handle_instruction_op_type_pipe_storage(Op_type_pipe_storage instruction
,
6212 std::size_t instruction_start_index
)
6215 throw Parser_error(instruction_start_index
,
6216 instruction_start_index
,
6217 "instruction not implemented: "
6218 + std::string(get_enumerant_name(instruction
.get_operation())));
6221 void Spirv_to_llvm::handle_instruction_op_constant_pipe_storage(
6222 Op_constant_pipe_storage instruction
, std::size_t instruction_start_index
)
6225 throw Parser_error(instruction_start_index
,
6226 instruction_start_index
,
6227 "instruction not implemented: "
6228 + std::string(get_enumerant_name(instruction
.get_operation())));
6231 void Spirv_to_llvm::handle_instruction_op_create_pipe_from_pipe_storage(
6232 Op_create_pipe_from_pipe_storage instruction
, std::size_t instruction_start_index
)
6235 throw Parser_error(instruction_start_index
,
6236 instruction_start_index
,
6237 "instruction not implemented: "
6238 + std::string(get_enumerant_name(instruction
.get_operation())));
6241 void Spirv_to_llvm::handle_instruction_op_get_kernel_local_size_for_subgroup_count(
6242 Op_get_kernel_local_size_for_subgroup_count instruction
, std::size_t instruction_start_index
)
6245 throw Parser_error(instruction_start_index
,
6246 instruction_start_index
,
6247 "instruction not implemented: "
6248 + std::string(get_enumerant_name(instruction
.get_operation())));
6251 void Spirv_to_llvm::handle_instruction_op_get_kernel_max_num_subgroups(
6252 Op_get_kernel_max_num_subgroups instruction
, std::size_t instruction_start_index
)
6255 throw Parser_error(instruction_start_index
,
6256 instruction_start_index
,
6257 "instruction not implemented: "
6258 + std::string(get_enumerant_name(instruction
.get_operation())));
6261 void Spirv_to_llvm::handle_instruction_op_type_named_barrier(Op_type_named_barrier instruction
,
6262 std::size_t instruction_start_index
)
6265 throw Parser_error(instruction_start_index
,
6266 instruction_start_index
,
6267 "instruction not implemented: "
6268 + std::string(get_enumerant_name(instruction
.get_operation())));
6271 void Spirv_to_llvm::handle_instruction_op_named_barrier_initialize(
6272 Op_named_barrier_initialize instruction
, std::size_t instruction_start_index
)
6275 throw Parser_error(instruction_start_index
,
6276 instruction_start_index
,
6277 "instruction not implemented: "
6278 + std::string(get_enumerant_name(instruction
.get_operation())));
6281 void Spirv_to_llvm::handle_instruction_op_memory_named_barrier(Op_memory_named_barrier instruction
,
6282 std::size_t instruction_start_index
)
6285 throw Parser_error(instruction_start_index
,
6286 instruction_start_index
,
6287 "instruction not implemented: "
6288 + std::string(get_enumerant_name(instruction
.get_operation())));
6291 void Spirv_to_llvm::handle_instruction_op_module_processed(Op_module_processed instruction
,
6292 std::size_t instruction_start_index
)
6295 throw Parser_error(instruction_start_index
,
6296 instruction_start_index
,
6297 "instruction not implemented: "
6298 + std::string(get_enumerant_name(instruction
.get_operation())));
6301 void Spirv_to_llvm::handle_instruction_op_execution_mode_id(Op_execution_mode_id instruction
,
6302 std::size_t instruction_start_index
)
6305 throw Parser_error(instruction_start_index
,
6306 instruction_start_index
,
6307 "instruction not implemented: "
6308 + std::string(get_enumerant_name(instruction
.get_operation())));
6311 void Spirv_to_llvm::handle_instruction_op_decorate_id(Op_decorate_id instruction
,
6312 std::size_t instruction_start_index
)
6315 throw Parser_error(instruction_start_index
,
6316 instruction_start_index
,
6317 "instruction not implemented: "
6318 + std::string(get_enumerant_name(instruction
.get_operation())));
6321 void Spirv_to_llvm::handle_instruction_op_subgroup_ballot_khr(Op_subgroup_ballot_khr instruction
,
6322 std::size_t instruction_start_index
)
6325 throw Parser_error(instruction_start_index
,
6326 instruction_start_index
,
6327 "instruction not implemented: "
6328 + std::string(get_enumerant_name(instruction
.get_operation())));
6331 void Spirv_to_llvm::handle_instruction_op_subgroup_first_invocation_khr(
6332 Op_subgroup_first_invocation_khr instruction
, std::size_t instruction_start_index
)
6335 throw Parser_error(instruction_start_index
,
6336 instruction_start_index
,
6337 "instruction not implemented: "
6338 + std::string(get_enumerant_name(instruction
.get_operation())));
6341 void Spirv_to_llvm::handle_instruction_op_subgroup_all_khr(Op_subgroup_all_khr instruction
,
6342 std::size_t instruction_start_index
)
6345 throw Parser_error(instruction_start_index
,
6346 instruction_start_index
,
6347 "instruction not implemented: "
6348 + std::string(get_enumerant_name(instruction
.get_operation())));
6351 void Spirv_to_llvm::handle_instruction_op_subgroup_any_khr(Op_subgroup_any_khr instruction
,
6352 std::size_t instruction_start_index
)
6355 throw Parser_error(instruction_start_index
,
6356 instruction_start_index
,
6357 "instruction not implemented: "
6358 + std::string(get_enumerant_name(instruction
.get_operation())));
6361 void Spirv_to_llvm::handle_instruction_op_subgroup_all_equal_khr(
6362 Op_subgroup_all_equal_khr instruction
, std::size_t instruction_start_index
)
6365 throw Parser_error(instruction_start_index
,
6366 instruction_start_index
,
6367 "instruction not implemented: "
6368 + std::string(get_enumerant_name(instruction
.get_operation())));
6371 void Spirv_to_llvm::handle_instruction_op_subgroup_read_invocation_khr(
6372 Op_subgroup_read_invocation_khr instruction
, std::size_t instruction_start_index
)
6375 throw Parser_error(instruction_start_index
,
6376 instruction_start_index
,
6377 "instruction not implemented: "
6378 + std::string(get_enumerant_name(instruction
.get_operation())));
6381 void Spirv_to_llvm::handle_instruction_open_cl_std_op_acos(Open_cl_std_op_acos instruction
,
6382 std::size_t instruction_start_index
)
6385 throw Parser_error(instruction_start_index
,
6386 instruction_start_index
,
6387 "instruction not implemented: "
6388 + std::string(get_enumerant_name(instruction
.get_operation())));
6391 void Spirv_to_llvm::handle_instruction_open_cl_std_op_acosh(Open_cl_std_op_acosh instruction
,
6392 std::size_t instruction_start_index
)
6395 throw Parser_error(instruction_start_index
,
6396 instruction_start_index
,
6397 "instruction not implemented: "
6398 + std::string(get_enumerant_name(instruction
.get_operation())));
6401 void Spirv_to_llvm::handle_instruction_open_cl_std_op_acospi(Open_cl_std_op_acospi instruction
,
6402 std::size_t instruction_start_index
)
6405 throw Parser_error(instruction_start_index
,
6406 instruction_start_index
,
6407 "instruction not implemented: "
6408 + std::string(get_enumerant_name(instruction
.get_operation())));
6411 void Spirv_to_llvm::handle_instruction_open_cl_std_op_asin(Open_cl_std_op_asin instruction
,
6412 std::size_t instruction_start_index
)
6415 throw Parser_error(instruction_start_index
,
6416 instruction_start_index
,
6417 "instruction not implemented: "
6418 + std::string(get_enumerant_name(instruction
.get_operation())));
6421 void Spirv_to_llvm::handle_instruction_open_cl_std_op_asinh(Open_cl_std_op_asinh instruction
,
6422 std::size_t instruction_start_index
)
6425 throw Parser_error(instruction_start_index
,
6426 instruction_start_index
,
6427 "instruction not implemented: "
6428 + std::string(get_enumerant_name(instruction
.get_operation())));
6431 void Spirv_to_llvm::handle_instruction_open_cl_std_op_asinpi(Open_cl_std_op_asinpi instruction
,
6432 std::size_t instruction_start_index
)
6435 throw Parser_error(instruction_start_index
,
6436 instruction_start_index
,
6437 "instruction not implemented: "
6438 + std::string(get_enumerant_name(instruction
.get_operation())));
6441 void Spirv_to_llvm::handle_instruction_open_cl_std_op_atan(Open_cl_std_op_atan instruction
,
6442 std::size_t instruction_start_index
)
6445 throw Parser_error(instruction_start_index
,
6446 instruction_start_index
,
6447 "instruction not implemented: "
6448 + std::string(get_enumerant_name(instruction
.get_operation())));
6451 void Spirv_to_llvm::handle_instruction_open_cl_std_op_atan2(Open_cl_std_op_atan2 instruction
,
6452 std::size_t instruction_start_index
)
6455 throw Parser_error(instruction_start_index
,
6456 instruction_start_index
,
6457 "instruction not implemented: "
6458 + std::string(get_enumerant_name(instruction
.get_operation())));
6461 void Spirv_to_llvm::handle_instruction_open_cl_std_op_atanh(Open_cl_std_op_atanh instruction
,
6462 std::size_t instruction_start_index
)
6465 throw Parser_error(instruction_start_index
,
6466 instruction_start_index
,
6467 "instruction not implemented: "
6468 + std::string(get_enumerant_name(instruction
.get_operation())));
6471 void Spirv_to_llvm::handle_instruction_open_cl_std_op_atanpi(Open_cl_std_op_atanpi instruction
,
6472 std::size_t instruction_start_index
)
6475 throw Parser_error(instruction_start_index
,
6476 instruction_start_index
,
6477 "instruction not implemented: "
6478 + std::string(get_enumerant_name(instruction
.get_operation())));
6481 void Spirv_to_llvm::handle_instruction_open_cl_std_op_atan2pi(Open_cl_std_op_atan2pi instruction
,
6482 std::size_t instruction_start_index
)
6485 throw Parser_error(instruction_start_index
,
6486 instruction_start_index
,
6487 "instruction not implemented: "
6488 + std::string(get_enumerant_name(instruction
.get_operation())));
6491 void Spirv_to_llvm::handle_instruction_open_cl_std_op_cbrt(Open_cl_std_op_cbrt instruction
,
6492 std::size_t instruction_start_index
)
6495 throw Parser_error(instruction_start_index
,
6496 instruction_start_index
,
6497 "instruction not implemented: "
6498 + std::string(get_enumerant_name(instruction
.get_operation())));
6501 void Spirv_to_llvm::handle_instruction_open_cl_std_op_ceil(Open_cl_std_op_ceil instruction
,
6502 std::size_t instruction_start_index
)
6505 throw Parser_error(instruction_start_index
,
6506 instruction_start_index
,
6507 "instruction not implemented: "
6508 + std::string(get_enumerant_name(instruction
.get_operation())));
6511 void Spirv_to_llvm::handle_instruction_open_cl_std_op_copysign(Open_cl_std_op_copysign instruction
,
6512 std::size_t instruction_start_index
)
6515 throw Parser_error(instruction_start_index
,
6516 instruction_start_index
,
6517 "instruction not implemented: "
6518 + std::string(get_enumerant_name(instruction
.get_operation())));
6521 void Spirv_to_llvm::handle_instruction_open_cl_std_op_cos(Open_cl_std_op_cos instruction
,
6522 std::size_t instruction_start_index
)
6525 throw Parser_error(instruction_start_index
,
6526 instruction_start_index
,
6527 "instruction not implemented: "
6528 + std::string(get_enumerant_name(instruction
.get_operation())));
6531 void Spirv_to_llvm::handle_instruction_open_cl_std_op_cosh(Open_cl_std_op_cosh instruction
,
6532 std::size_t instruction_start_index
)
6535 throw Parser_error(instruction_start_index
,
6536 instruction_start_index
,
6537 "instruction not implemented: "
6538 + std::string(get_enumerant_name(instruction
.get_operation())));
6541 void Spirv_to_llvm::handle_instruction_open_cl_std_op_cospi(Open_cl_std_op_cospi instruction
,
6542 std::size_t instruction_start_index
)
6545 throw Parser_error(instruction_start_index
,
6546 instruction_start_index
,
6547 "instruction not implemented: "
6548 + std::string(get_enumerant_name(instruction
.get_operation())));
6551 void Spirv_to_llvm::handle_instruction_open_cl_std_op_erfc(Open_cl_std_op_erfc instruction
,
6552 std::size_t instruction_start_index
)
6555 throw Parser_error(instruction_start_index
,
6556 instruction_start_index
,
6557 "instruction not implemented: "
6558 + std::string(get_enumerant_name(instruction
.get_operation())));
6561 void Spirv_to_llvm::handle_instruction_open_cl_std_op_erf(Open_cl_std_op_erf instruction
,
6562 std::size_t instruction_start_index
)
6565 throw Parser_error(instruction_start_index
,
6566 instruction_start_index
,
6567 "instruction not implemented: "
6568 + std::string(get_enumerant_name(instruction
.get_operation())));
6571 void Spirv_to_llvm::handle_instruction_open_cl_std_op_exp(Open_cl_std_op_exp instruction
,
6572 std::size_t instruction_start_index
)
6575 throw Parser_error(instruction_start_index
,
6576 instruction_start_index
,
6577 "instruction not implemented: "
6578 + std::string(get_enumerant_name(instruction
.get_operation())));
6581 void Spirv_to_llvm::handle_instruction_open_cl_std_op_exp2(Open_cl_std_op_exp2 instruction
,
6582 std::size_t instruction_start_index
)
6585 throw Parser_error(instruction_start_index
,
6586 instruction_start_index
,
6587 "instruction not implemented: "
6588 + std::string(get_enumerant_name(instruction
.get_operation())));
6591 void Spirv_to_llvm::handle_instruction_open_cl_std_op_exp10(Open_cl_std_op_exp10 instruction
,
6592 std::size_t instruction_start_index
)
6595 throw Parser_error(instruction_start_index
,
6596 instruction_start_index
,
6597 "instruction not implemented: "
6598 + std::string(get_enumerant_name(instruction
.get_operation())));
6601 void Spirv_to_llvm::handle_instruction_open_cl_std_op_expm1(Open_cl_std_op_expm1 instruction
,
6602 std::size_t instruction_start_index
)
6605 throw Parser_error(instruction_start_index
,
6606 instruction_start_index
,
6607 "instruction not implemented: "
6608 + std::string(get_enumerant_name(instruction
.get_operation())));
6611 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fabs(Open_cl_std_op_fabs instruction
,
6612 std::size_t instruction_start_index
)
6615 throw Parser_error(instruction_start_index
,
6616 instruction_start_index
,
6617 "instruction not implemented: "
6618 + std::string(get_enumerant_name(instruction
.get_operation())));
6621 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fdim(Open_cl_std_op_fdim instruction
,
6622 std::size_t instruction_start_index
)
6625 throw Parser_error(instruction_start_index
,
6626 instruction_start_index
,
6627 "instruction not implemented: "
6628 + std::string(get_enumerant_name(instruction
.get_operation())));
6631 void Spirv_to_llvm::handle_instruction_open_cl_std_op_floor(Open_cl_std_op_floor instruction
,
6632 std::size_t instruction_start_index
)
6635 throw Parser_error(instruction_start_index
,
6636 instruction_start_index
,
6637 "instruction not implemented: "
6638 + std::string(get_enumerant_name(instruction
.get_operation())));
6641 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fma(Open_cl_std_op_fma instruction
,
6642 std::size_t instruction_start_index
)
6645 throw Parser_error(instruction_start_index
,
6646 instruction_start_index
,
6647 "instruction not implemented: "
6648 + std::string(get_enumerant_name(instruction
.get_operation())));
6651 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fmax(Open_cl_std_op_fmax instruction
,
6652 std::size_t instruction_start_index
)
6655 throw Parser_error(instruction_start_index
,
6656 instruction_start_index
,
6657 "instruction not implemented: "
6658 + std::string(get_enumerant_name(instruction
.get_operation())));
6661 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fmin(Open_cl_std_op_fmin instruction
,
6662 std::size_t instruction_start_index
)
6665 throw Parser_error(instruction_start_index
,
6666 instruction_start_index
,
6667 "instruction not implemented: "
6668 + std::string(get_enumerant_name(instruction
.get_operation())));
6671 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fmod(Open_cl_std_op_fmod instruction
,
6672 std::size_t instruction_start_index
)
6675 throw Parser_error(instruction_start_index
,
6676 instruction_start_index
,
6677 "instruction not implemented: "
6678 + std::string(get_enumerant_name(instruction
.get_operation())));
6681 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fract(Open_cl_std_op_fract instruction
,
6682 std::size_t instruction_start_index
)
6685 throw Parser_error(instruction_start_index
,
6686 instruction_start_index
,
6687 "instruction not implemented: "
6688 + std::string(get_enumerant_name(instruction
.get_operation())));
6691 void Spirv_to_llvm::handle_instruction_open_cl_std_op_frexp(Open_cl_std_op_frexp instruction
,
6692 std::size_t instruction_start_index
)
6695 throw Parser_error(instruction_start_index
,
6696 instruction_start_index
,
6697 "instruction not implemented: "
6698 + std::string(get_enumerant_name(instruction
.get_operation())));
6701 void Spirv_to_llvm::handle_instruction_open_cl_std_op_hypot(Open_cl_std_op_hypot instruction
,
6702 std::size_t instruction_start_index
)
6705 throw Parser_error(instruction_start_index
,
6706 instruction_start_index
,
6707 "instruction not implemented: "
6708 + std::string(get_enumerant_name(instruction
.get_operation())));
6711 void Spirv_to_llvm::handle_instruction_open_cl_std_op_ilogb(Open_cl_std_op_ilogb instruction
,
6712 std::size_t instruction_start_index
)
6715 throw Parser_error(instruction_start_index
,
6716 instruction_start_index
,
6717 "instruction not implemented: "
6718 + std::string(get_enumerant_name(instruction
.get_operation())));
6721 void Spirv_to_llvm::handle_instruction_open_cl_std_op_ldexp(Open_cl_std_op_ldexp instruction
,
6722 std::size_t instruction_start_index
)
6725 throw Parser_error(instruction_start_index
,
6726 instruction_start_index
,
6727 "instruction not implemented: "
6728 + std::string(get_enumerant_name(instruction
.get_operation())));
6731 void Spirv_to_llvm::handle_instruction_open_cl_std_op_lgamma(Open_cl_std_op_lgamma instruction
,
6732 std::size_t instruction_start_index
)
6735 throw Parser_error(instruction_start_index
,
6736 instruction_start_index
,
6737 "instruction not implemented: "
6738 + std::string(get_enumerant_name(instruction
.get_operation())));
6741 void Spirv_to_llvm::handle_instruction_open_cl_std_op_lgamma_r(Open_cl_std_op_lgamma_r instruction
,
6742 std::size_t instruction_start_index
)
6745 throw Parser_error(instruction_start_index
,
6746 instruction_start_index
,
6747 "instruction not implemented: "
6748 + std::string(get_enumerant_name(instruction
.get_operation())));
6751 void Spirv_to_llvm::handle_instruction_open_cl_std_op_log(Open_cl_std_op_log instruction
,
6752 std::size_t instruction_start_index
)
6755 throw Parser_error(instruction_start_index
,
6756 instruction_start_index
,
6757 "instruction not implemented: "
6758 + std::string(get_enumerant_name(instruction
.get_operation())));
6761 void Spirv_to_llvm::handle_instruction_open_cl_std_op_log2(Open_cl_std_op_log2 instruction
,
6762 std::size_t instruction_start_index
)
6765 throw Parser_error(instruction_start_index
,
6766 instruction_start_index
,
6767 "instruction not implemented: "
6768 + std::string(get_enumerant_name(instruction
.get_operation())));
6771 void Spirv_to_llvm::handle_instruction_open_cl_std_op_log10(Open_cl_std_op_log10 instruction
,
6772 std::size_t instruction_start_index
)
6775 throw Parser_error(instruction_start_index
,
6776 instruction_start_index
,
6777 "instruction not implemented: "
6778 + std::string(get_enumerant_name(instruction
.get_operation())));
6781 void Spirv_to_llvm::handle_instruction_open_cl_std_op_log1p(Open_cl_std_op_log1p instruction
,
6782 std::size_t instruction_start_index
)
6785 throw Parser_error(instruction_start_index
,
6786 instruction_start_index
,
6787 "instruction not implemented: "
6788 + std::string(get_enumerant_name(instruction
.get_operation())));
6791 void Spirv_to_llvm::handle_instruction_open_cl_std_op_logb(Open_cl_std_op_logb instruction
,
6792 std::size_t instruction_start_index
)
6795 throw Parser_error(instruction_start_index
,
6796 instruction_start_index
,
6797 "instruction not implemented: "
6798 + std::string(get_enumerant_name(instruction
.get_operation())));
6801 void Spirv_to_llvm::handle_instruction_open_cl_std_op_mad(Open_cl_std_op_mad instruction
,
6802 std::size_t instruction_start_index
)
6805 throw Parser_error(instruction_start_index
,
6806 instruction_start_index
,
6807 "instruction not implemented: "
6808 + std::string(get_enumerant_name(instruction
.get_operation())));
6811 void Spirv_to_llvm::handle_instruction_open_cl_std_op_maxmag(Open_cl_std_op_maxmag instruction
,
6812 std::size_t instruction_start_index
)
6815 throw Parser_error(instruction_start_index
,
6816 instruction_start_index
,
6817 "instruction not implemented: "
6818 + std::string(get_enumerant_name(instruction
.get_operation())));
6821 void Spirv_to_llvm::handle_instruction_open_cl_std_op_minmag(Open_cl_std_op_minmag instruction
,
6822 std::size_t instruction_start_index
)
6825 throw Parser_error(instruction_start_index
,
6826 instruction_start_index
,
6827 "instruction not implemented: "
6828 + std::string(get_enumerant_name(instruction
.get_operation())));
6831 void Spirv_to_llvm::handle_instruction_open_cl_std_op_modf(Open_cl_std_op_modf instruction
,
6832 std::size_t instruction_start_index
)
6835 throw Parser_error(instruction_start_index
,
6836 instruction_start_index
,
6837 "instruction not implemented: "
6838 + std::string(get_enumerant_name(instruction
.get_operation())));
6841 void Spirv_to_llvm::handle_instruction_open_cl_std_op_nan(Open_cl_std_op_nan instruction
,
6842 std::size_t instruction_start_index
)
6845 throw Parser_error(instruction_start_index
,
6846 instruction_start_index
,
6847 "instruction not implemented: "
6848 + std::string(get_enumerant_name(instruction
.get_operation())));
6851 void Spirv_to_llvm::handle_instruction_open_cl_std_op_nextafter(
6852 Open_cl_std_op_nextafter instruction
, std::size_t instruction_start_index
)
6855 throw Parser_error(instruction_start_index
,
6856 instruction_start_index
,
6857 "instruction not implemented: "
6858 + std::string(get_enumerant_name(instruction
.get_operation())));
6861 void Spirv_to_llvm::handle_instruction_open_cl_std_op_pow(Open_cl_std_op_pow instruction
,
6862 std::size_t instruction_start_index
)
6865 throw Parser_error(instruction_start_index
,
6866 instruction_start_index
,
6867 "instruction not implemented: "
6868 + std::string(get_enumerant_name(instruction
.get_operation())));
6871 void Spirv_to_llvm::handle_instruction_open_cl_std_op_pown(Open_cl_std_op_pown instruction
,
6872 std::size_t instruction_start_index
)
6875 throw Parser_error(instruction_start_index
,
6876 instruction_start_index
,
6877 "instruction not implemented: "
6878 + std::string(get_enumerant_name(instruction
.get_operation())));
6881 void Spirv_to_llvm::handle_instruction_open_cl_std_op_powr(Open_cl_std_op_powr instruction
,
6882 std::size_t instruction_start_index
)
6885 throw Parser_error(instruction_start_index
,
6886 instruction_start_index
,
6887 "instruction not implemented: "
6888 + std::string(get_enumerant_name(instruction
.get_operation())));
6891 void Spirv_to_llvm::handle_instruction_open_cl_std_op_remainder(
6892 Open_cl_std_op_remainder instruction
, std::size_t instruction_start_index
)
6895 throw Parser_error(instruction_start_index
,
6896 instruction_start_index
,
6897 "instruction not implemented: "
6898 + std::string(get_enumerant_name(instruction
.get_operation())));
6901 void Spirv_to_llvm::handle_instruction_open_cl_std_op_remquo(Open_cl_std_op_remquo instruction
,
6902 std::size_t instruction_start_index
)
6905 throw Parser_error(instruction_start_index
,
6906 instruction_start_index
,
6907 "instruction not implemented: "
6908 + std::string(get_enumerant_name(instruction
.get_operation())));
6911 void Spirv_to_llvm::handle_instruction_open_cl_std_op_rint(Open_cl_std_op_rint instruction
,
6912 std::size_t instruction_start_index
)
6915 throw Parser_error(instruction_start_index
,
6916 instruction_start_index
,
6917 "instruction not implemented: "
6918 + std::string(get_enumerant_name(instruction
.get_operation())));
6921 void Spirv_to_llvm::handle_instruction_open_cl_std_op_rootn(Open_cl_std_op_rootn instruction
,
6922 std::size_t instruction_start_index
)
6925 throw Parser_error(instruction_start_index
,
6926 instruction_start_index
,
6927 "instruction not implemented: "
6928 + std::string(get_enumerant_name(instruction
.get_operation())));
6931 void Spirv_to_llvm::handle_instruction_open_cl_std_op_round(Open_cl_std_op_round instruction
,
6932 std::size_t instruction_start_index
)
6935 throw Parser_error(instruction_start_index
,
6936 instruction_start_index
,
6937 "instruction not implemented: "
6938 + std::string(get_enumerant_name(instruction
.get_operation())));
6941 void Spirv_to_llvm::handle_instruction_open_cl_std_op_rsqrt(Open_cl_std_op_rsqrt instruction
,
6942 std::size_t instruction_start_index
)
6945 throw Parser_error(instruction_start_index
,
6946 instruction_start_index
,
6947 "instruction not implemented: "
6948 + std::string(get_enumerant_name(instruction
.get_operation())));
6951 void Spirv_to_llvm::handle_instruction_open_cl_std_op_sin(Open_cl_std_op_sin instruction
,
6952 std::size_t instruction_start_index
)
6955 throw Parser_error(instruction_start_index
,
6956 instruction_start_index
,
6957 "instruction not implemented: "
6958 + std::string(get_enumerant_name(instruction
.get_operation())));
6961 void Spirv_to_llvm::handle_instruction_open_cl_std_op_sincos(Open_cl_std_op_sincos instruction
,
6962 std::size_t instruction_start_index
)
6965 throw Parser_error(instruction_start_index
,
6966 instruction_start_index
,
6967 "instruction not implemented: "
6968 + std::string(get_enumerant_name(instruction
.get_operation())));
6971 void Spirv_to_llvm::handle_instruction_open_cl_std_op_sinh(Open_cl_std_op_sinh instruction
,
6972 std::size_t instruction_start_index
)
6975 throw Parser_error(instruction_start_index
,
6976 instruction_start_index
,
6977 "instruction not implemented: "
6978 + std::string(get_enumerant_name(instruction
.get_operation())));
6981 void Spirv_to_llvm::handle_instruction_open_cl_std_op_sinpi(Open_cl_std_op_sinpi instruction
,
6982 std::size_t instruction_start_index
)
6985 throw Parser_error(instruction_start_index
,
6986 instruction_start_index
,
6987 "instruction not implemented: "
6988 + std::string(get_enumerant_name(instruction
.get_operation())));
6991 void Spirv_to_llvm::handle_instruction_open_cl_std_op_sqrt(Open_cl_std_op_sqrt instruction
,
6992 std::size_t instruction_start_index
)
6995 throw Parser_error(instruction_start_index
,
6996 instruction_start_index
,
6997 "instruction not implemented: "
6998 + std::string(get_enumerant_name(instruction
.get_operation())));
7001 void Spirv_to_llvm::handle_instruction_open_cl_std_op_tan(Open_cl_std_op_tan instruction
,
7002 std::size_t instruction_start_index
)
7005 throw Parser_error(instruction_start_index
,
7006 instruction_start_index
,
7007 "instruction not implemented: "
7008 + std::string(get_enumerant_name(instruction
.get_operation())));
7011 void Spirv_to_llvm::handle_instruction_open_cl_std_op_tanh(Open_cl_std_op_tanh instruction
,
7012 std::size_t instruction_start_index
)
7015 throw Parser_error(instruction_start_index
,
7016 instruction_start_index
,
7017 "instruction not implemented: "
7018 + std::string(get_enumerant_name(instruction
.get_operation())));
7021 void Spirv_to_llvm::handle_instruction_open_cl_std_op_tanpi(Open_cl_std_op_tanpi instruction
,
7022 std::size_t instruction_start_index
)
7025 throw Parser_error(instruction_start_index
,
7026 instruction_start_index
,
7027 "instruction not implemented: "
7028 + std::string(get_enumerant_name(instruction
.get_operation())));
7031 void Spirv_to_llvm::handle_instruction_open_cl_std_op_tgamma(Open_cl_std_op_tgamma instruction
,
7032 std::size_t instruction_start_index
)
7035 throw Parser_error(instruction_start_index
,
7036 instruction_start_index
,
7037 "instruction not implemented: "
7038 + std::string(get_enumerant_name(instruction
.get_operation())));
7041 void Spirv_to_llvm::handle_instruction_open_cl_std_op_trunc(Open_cl_std_op_trunc instruction
,
7042 std::size_t instruction_start_index
)
7045 throw Parser_error(instruction_start_index
,
7046 instruction_start_index
,
7047 "instruction not implemented: "
7048 + std::string(get_enumerant_name(instruction
.get_operation())));
7051 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_cos(Open_cl_std_op_half_cos instruction
,
7052 std::size_t instruction_start_index
)
7055 throw Parser_error(instruction_start_index
,
7056 instruction_start_index
,
7057 "instruction not implemented: "
7058 + std::string(get_enumerant_name(instruction
.get_operation())));
7061 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_divide(
7062 Open_cl_std_op_half_divide instruction
, std::size_t instruction_start_index
)
7065 throw Parser_error(instruction_start_index
,
7066 instruction_start_index
,
7067 "instruction not implemented: "
7068 + std::string(get_enumerant_name(instruction
.get_operation())));
7071 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_exp(Open_cl_std_op_half_exp instruction
,
7072 std::size_t instruction_start_index
)
7075 throw Parser_error(instruction_start_index
,
7076 instruction_start_index
,
7077 "instruction not implemented: "
7078 + std::string(get_enumerant_name(instruction
.get_operation())));
7081 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_exp2(
7082 Open_cl_std_op_half_exp2 instruction
, std::size_t instruction_start_index
)
7085 throw Parser_error(instruction_start_index
,
7086 instruction_start_index
,
7087 "instruction not implemented: "
7088 + std::string(get_enumerant_name(instruction
.get_operation())));
7091 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_exp10(
7092 Open_cl_std_op_half_exp10 instruction
, std::size_t instruction_start_index
)
7095 throw Parser_error(instruction_start_index
,
7096 instruction_start_index
,
7097 "instruction not implemented: "
7098 + std::string(get_enumerant_name(instruction
.get_operation())));
7101 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_log(Open_cl_std_op_half_log instruction
,
7102 std::size_t instruction_start_index
)
7105 throw Parser_error(instruction_start_index
,
7106 instruction_start_index
,
7107 "instruction not implemented: "
7108 + std::string(get_enumerant_name(instruction
.get_operation())));
7111 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_log2(
7112 Open_cl_std_op_half_log2 instruction
, std::size_t instruction_start_index
)
7115 throw Parser_error(instruction_start_index
,
7116 instruction_start_index
,
7117 "instruction not implemented: "
7118 + std::string(get_enumerant_name(instruction
.get_operation())));
7121 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_log10(
7122 Open_cl_std_op_half_log10 instruction
, std::size_t instruction_start_index
)
7125 throw Parser_error(instruction_start_index
,
7126 instruction_start_index
,
7127 "instruction not implemented: "
7128 + std::string(get_enumerant_name(instruction
.get_operation())));
7131 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_powr(
7132 Open_cl_std_op_half_powr instruction
, std::size_t instruction_start_index
)
7135 throw Parser_error(instruction_start_index
,
7136 instruction_start_index
,
7137 "instruction not implemented: "
7138 + std::string(get_enumerant_name(instruction
.get_operation())));
7141 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_recip(
7142 Open_cl_std_op_half_recip instruction
, std::size_t instruction_start_index
)
7145 throw Parser_error(instruction_start_index
,
7146 instruction_start_index
,
7147 "instruction not implemented: "
7148 + std::string(get_enumerant_name(instruction
.get_operation())));
7151 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_rsqrt(
7152 Open_cl_std_op_half_rsqrt instruction
, std::size_t instruction_start_index
)
7155 throw Parser_error(instruction_start_index
,
7156 instruction_start_index
,
7157 "instruction not implemented: "
7158 + std::string(get_enumerant_name(instruction
.get_operation())));
7161 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_sin(Open_cl_std_op_half_sin instruction
,
7162 std::size_t instruction_start_index
)
7165 throw Parser_error(instruction_start_index
,
7166 instruction_start_index
,
7167 "instruction not implemented: "
7168 + std::string(get_enumerant_name(instruction
.get_operation())));
7171 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_sqrt(
7172 Open_cl_std_op_half_sqrt instruction
, std::size_t instruction_start_index
)
7175 throw Parser_error(instruction_start_index
,
7176 instruction_start_index
,
7177 "instruction not implemented: "
7178 + std::string(get_enumerant_name(instruction
.get_operation())));
7181 void Spirv_to_llvm::handle_instruction_open_cl_std_op_half_tan(Open_cl_std_op_half_tan instruction
,
7182 std::size_t instruction_start_index
)
7185 throw Parser_error(instruction_start_index
,
7186 instruction_start_index
,
7187 "instruction not implemented: "
7188 + std::string(get_enumerant_name(instruction
.get_operation())));
7191 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_cos(
7192 Open_cl_std_op_native_cos instruction
, std::size_t instruction_start_index
)
7195 throw Parser_error(instruction_start_index
,
7196 instruction_start_index
,
7197 "instruction not implemented: "
7198 + std::string(get_enumerant_name(instruction
.get_operation())));
7201 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_divide(
7202 Open_cl_std_op_native_divide instruction
, std::size_t instruction_start_index
)
7205 throw Parser_error(instruction_start_index
,
7206 instruction_start_index
,
7207 "instruction not implemented: "
7208 + std::string(get_enumerant_name(instruction
.get_operation())));
7211 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_exp(
7212 Open_cl_std_op_native_exp instruction
, std::size_t instruction_start_index
)
7215 throw Parser_error(instruction_start_index
,
7216 instruction_start_index
,
7217 "instruction not implemented: "
7218 + std::string(get_enumerant_name(instruction
.get_operation())));
7221 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_exp2(
7222 Open_cl_std_op_native_exp2 instruction
, std::size_t instruction_start_index
)
7225 throw Parser_error(instruction_start_index
,
7226 instruction_start_index
,
7227 "instruction not implemented: "
7228 + std::string(get_enumerant_name(instruction
.get_operation())));
7231 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_exp10(
7232 Open_cl_std_op_native_exp10 instruction
, std::size_t instruction_start_index
)
7235 throw Parser_error(instruction_start_index
,
7236 instruction_start_index
,
7237 "instruction not implemented: "
7238 + std::string(get_enumerant_name(instruction
.get_operation())));
7241 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_log(
7242 Open_cl_std_op_native_log instruction
, std::size_t instruction_start_index
)
7245 throw Parser_error(instruction_start_index
,
7246 instruction_start_index
,
7247 "instruction not implemented: "
7248 + std::string(get_enumerant_name(instruction
.get_operation())));
7251 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_log2(
7252 Open_cl_std_op_native_log2 instruction
, std::size_t instruction_start_index
)
7255 throw Parser_error(instruction_start_index
,
7256 instruction_start_index
,
7257 "instruction not implemented: "
7258 + std::string(get_enumerant_name(instruction
.get_operation())));
7261 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_log10(
7262 Open_cl_std_op_native_log10 instruction
, std::size_t instruction_start_index
)
7265 throw Parser_error(instruction_start_index
,
7266 instruction_start_index
,
7267 "instruction not implemented: "
7268 + std::string(get_enumerant_name(instruction
.get_operation())));
7271 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_powr(
7272 Open_cl_std_op_native_powr instruction
, std::size_t instruction_start_index
)
7275 throw Parser_error(instruction_start_index
,
7276 instruction_start_index
,
7277 "instruction not implemented: "
7278 + std::string(get_enumerant_name(instruction
.get_operation())));
7281 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_recip(
7282 Open_cl_std_op_native_recip instruction
, std::size_t instruction_start_index
)
7285 throw Parser_error(instruction_start_index
,
7286 instruction_start_index
,
7287 "instruction not implemented: "
7288 + std::string(get_enumerant_name(instruction
.get_operation())));
7291 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_rsqrt(
7292 Open_cl_std_op_native_rsqrt instruction
, std::size_t instruction_start_index
)
7295 throw Parser_error(instruction_start_index
,
7296 instruction_start_index
,
7297 "instruction not implemented: "
7298 + std::string(get_enumerant_name(instruction
.get_operation())));
7301 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_sin(
7302 Open_cl_std_op_native_sin instruction
, std::size_t instruction_start_index
)
7305 throw Parser_error(instruction_start_index
,
7306 instruction_start_index
,
7307 "instruction not implemented: "
7308 + std::string(get_enumerant_name(instruction
.get_operation())));
7311 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_sqrt(
7312 Open_cl_std_op_native_sqrt instruction
, std::size_t instruction_start_index
)
7315 throw Parser_error(instruction_start_index
,
7316 instruction_start_index
,
7317 "instruction not implemented: "
7318 + std::string(get_enumerant_name(instruction
.get_operation())));
7321 void Spirv_to_llvm::handle_instruction_open_cl_std_op_native_tan(
7322 Open_cl_std_op_native_tan instruction
, std::size_t instruction_start_index
)
7325 throw Parser_error(instruction_start_index
,
7326 instruction_start_index
,
7327 "instruction not implemented: "
7328 + std::string(get_enumerant_name(instruction
.get_operation())));
7331 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_abs(Open_cl_std_op_s_abs instruction
,
7332 std::size_t instruction_start_index
)
7335 throw Parser_error(instruction_start_index
,
7336 instruction_start_index
,
7337 "instruction not implemented: "
7338 + std::string(get_enumerant_name(instruction
.get_operation())));
7341 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_abs_diff(
7342 Open_cl_std_op_s_abs_diff instruction
, std::size_t instruction_start_index
)
7345 throw Parser_error(instruction_start_index
,
7346 instruction_start_index
,
7347 "instruction not implemented: "
7348 + std::string(get_enumerant_name(instruction
.get_operation())));
7351 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_add_sat(
7352 Open_cl_std_op_s_add_sat instruction
, std::size_t instruction_start_index
)
7355 throw Parser_error(instruction_start_index
,
7356 instruction_start_index
,
7357 "instruction not implemented: "
7358 + std::string(get_enumerant_name(instruction
.get_operation())));
7361 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_add_sat(
7362 Open_cl_std_op_u_add_sat instruction
, std::size_t instruction_start_index
)
7365 throw Parser_error(instruction_start_index
,
7366 instruction_start_index
,
7367 "instruction not implemented: "
7368 + std::string(get_enumerant_name(instruction
.get_operation())));
7371 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_hadd(Open_cl_std_op_s_hadd instruction
,
7372 std::size_t instruction_start_index
)
7375 throw Parser_error(instruction_start_index
,
7376 instruction_start_index
,
7377 "instruction not implemented: "
7378 + std::string(get_enumerant_name(instruction
.get_operation())));
7381 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_hadd(Open_cl_std_op_u_hadd instruction
,
7382 std::size_t instruction_start_index
)
7385 throw Parser_error(instruction_start_index
,
7386 instruction_start_index
,
7387 "instruction not implemented: "
7388 + std::string(get_enumerant_name(instruction
.get_operation())));
7391 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_rhadd(Open_cl_std_op_s_rhadd instruction
,
7392 std::size_t instruction_start_index
)
7395 throw Parser_error(instruction_start_index
,
7396 instruction_start_index
,
7397 "instruction not implemented: "
7398 + std::string(get_enumerant_name(instruction
.get_operation())));
7401 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_rhadd(Open_cl_std_op_u_rhadd instruction
,
7402 std::size_t instruction_start_index
)
7405 throw Parser_error(instruction_start_index
,
7406 instruction_start_index
,
7407 "instruction not implemented: "
7408 + std::string(get_enumerant_name(instruction
.get_operation())));
7411 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_clamp(Open_cl_std_op_s_clamp instruction
,
7412 std::size_t instruction_start_index
)
7415 throw Parser_error(instruction_start_index
,
7416 instruction_start_index
,
7417 "instruction not implemented: "
7418 + std::string(get_enumerant_name(instruction
.get_operation())));
7421 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_clamp(Open_cl_std_op_u_clamp instruction
,
7422 std::size_t instruction_start_index
)
7425 throw Parser_error(instruction_start_index
,
7426 instruction_start_index
,
7427 "instruction not implemented: "
7428 + std::string(get_enumerant_name(instruction
.get_operation())));
7431 void Spirv_to_llvm::handle_instruction_open_cl_std_op_clz(Open_cl_std_op_clz instruction
,
7432 std::size_t instruction_start_index
)
7435 throw Parser_error(instruction_start_index
,
7436 instruction_start_index
,
7437 "instruction not implemented: "
7438 + std::string(get_enumerant_name(instruction
.get_operation())));
7441 void Spirv_to_llvm::handle_instruction_open_cl_std_op_ctz(Open_cl_std_op_ctz instruction
,
7442 std::size_t instruction_start_index
)
7445 throw Parser_error(instruction_start_index
,
7446 instruction_start_index
,
7447 "instruction not implemented: "
7448 + std::string(get_enumerant_name(instruction
.get_operation())));
7451 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_mad_hi(Open_cl_std_op_s_mad_hi instruction
,
7452 std::size_t instruction_start_index
)
7455 throw Parser_error(instruction_start_index
,
7456 instruction_start_index
,
7457 "instruction not implemented: "
7458 + std::string(get_enumerant_name(instruction
.get_operation())));
7461 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_mad_sat(
7462 Open_cl_std_op_u_mad_sat instruction
, std::size_t instruction_start_index
)
7465 throw Parser_error(instruction_start_index
,
7466 instruction_start_index
,
7467 "instruction not implemented: "
7468 + std::string(get_enumerant_name(instruction
.get_operation())));
7471 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_mad_sat(
7472 Open_cl_std_op_s_mad_sat instruction
, std::size_t instruction_start_index
)
7475 throw Parser_error(instruction_start_index
,
7476 instruction_start_index
,
7477 "instruction not implemented: "
7478 + std::string(get_enumerant_name(instruction
.get_operation())));
7481 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_max(Open_cl_std_op_s_max instruction
,
7482 std::size_t instruction_start_index
)
7485 throw Parser_error(instruction_start_index
,
7486 instruction_start_index
,
7487 "instruction not implemented: "
7488 + std::string(get_enumerant_name(instruction
.get_operation())));
7491 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_max(Open_cl_std_op_u_max instruction
,
7492 std::size_t instruction_start_index
)
7495 throw Parser_error(instruction_start_index
,
7496 instruction_start_index
,
7497 "instruction not implemented: "
7498 + std::string(get_enumerant_name(instruction
.get_operation())));
7501 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_min(Open_cl_std_op_s_min instruction
,
7502 std::size_t instruction_start_index
)
7505 throw Parser_error(instruction_start_index
,
7506 instruction_start_index
,
7507 "instruction not implemented: "
7508 + std::string(get_enumerant_name(instruction
.get_operation())));
7511 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_min(Open_cl_std_op_u_min instruction
,
7512 std::size_t instruction_start_index
)
7515 throw Parser_error(instruction_start_index
,
7516 instruction_start_index
,
7517 "instruction not implemented: "
7518 + std::string(get_enumerant_name(instruction
.get_operation())));
7521 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_mul_hi(Open_cl_std_op_s_mul_hi instruction
,
7522 std::size_t instruction_start_index
)
7525 throw Parser_error(instruction_start_index
,
7526 instruction_start_index
,
7527 "instruction not implemented: "
7528 + std::string(get_enumerant_name(instruction
.get_operation())));
7531 void Spirv_to_llvm::handle_instruction_open_cl_std_op_rotate(Open_cl_std_op_rotate instruction
,
7532 std::size_t instruction_start_index
)
7535 throw Parser_error(instruction_start_index
,
7536 instruction_start_index
,
7537 "instruction not implemented: "
7538 + std::string(get_enumerant_name(instruction
.get_operation())));
7541 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_sub_sat(
7542 Open_cl_std_op_s_sub_sat instruction
, std::size_t instruction_start_index
)
7545 throw Parser_error(instruction_start_index
,
7546 instruction_start_index
,
7547 "instruction not implemented: "
7548 + std::string(get_enumerant_name(instruction
.get_operation())));
7551 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_sub_sat(
7552 Open_cl_std_op_u_sub_sat instruction
, std::size_t instruction_start_index
)
7555 throw Parser_error(instruction_start_index
,
7556 instruction_start_index
,
7557 "instruction not implemented: "
7558 + std::string(get_enumerant_name(instruction
.get_operation())));
7561 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_upsample(
7562 Open_cl_std_op_u_upsample instruction
, std::size_t instruction_start_index
)
7565 throw Parser_error(instruction_start_index
,
7566 instruction_start_index
,
7567 "instruction not implemented: "
7568 + std::string(get_enumerant_name(instruction
.get_operation())));
7571 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_upsample(
7572 Open_cl_std_op_s_upsample instruction
, std::size_t instruction_start_index
)
7575 throw Parser_error(instruction_start_index
,
7576 instruction_start_index
,
7577 "instruction not implemented: "
7578 + std::string(get_enumerant_name(instruction
.get_operation())));
7581 void Spirv_to_llvm::handle_instruction_open_cl_std_op_popcount(Open_cl_std_op_popcount instruction
,
7582 std::size_t instruction_start_index
)
7585 throw Parser_error(instruction_start_index
,
7586 instruction_start_index
,
7587 "instruction not implemented: "
7588 + std::string(get_enumerant_name(instruction
.get_operation())));
7591 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_mad24(Open_cl_std_op_s_mad24 instruction
,
7592 std::size_t instruction_start_index
)
7595 throw Parser_error(instruction_start_index
,
7596 instruction_start_index
,
7597 "instruction not implemented: "
7598 + std::string(get_enumerant_name(instruction
.get_operation())));
7601 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_mad24(Open_cl_std_op_u_mad24 instruction
,
7602 std::size_t instruction_start_index
)
7605 throw Parser_error(instruction_start_index
,
7606 instruction_start_index
,
7607 "instruction not implemented: "
7608 + std::string(get_enumerant_name(instruction
.get_operation())));
7611 void Spirv_to_llvm::handle_instruction_open_cl_std_op_s_mul24(Open_cl_std_op_s_mul24 instruction
,
7612 std::size_t instruction_start_index
)
7615 throw Parser_error(instruction_start_index
,
7616 instruction_start_index
,
7617 "instruction not implemented: "
7618 + std::string(get_enumerant_name(instruction
.get_operation())));
7621 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_mul24(Open_cl_std_op_u_mul24 instruction
,
7622 std::size_t instruction_start_index
)
7625 throw Parser_error(instruction_start_index
,
7626 instruction_start_index
,
7627 "instruction not implemented: "
7628 + std::string(get_enumerant_name(instruction
.get_operation())));
7631 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_abs(Open_cl_std_op_u_abs instruction
,
7632 std::size_t instruction_start_index
)
7635 throw Parser_error(instruction_start_index
,
7636 instruction_start_index
,
7637 "instruction not implemented: "
7638 + std::string(get_enumerant_name(instruction
.get_operation())));
7641 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_abs_diff(
7642 Open_cl_std_op_u_abs_diff instruction
, std::size_t instruction_start_index
)
7645 throw Parser_error(instruction_start_index
,
7646 instruction_start_index
,
7647 "instruction not implemented: "
7648 + std::string(get_enumerant_name(instruction
.get_operation())));
7651 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_mul_hi(Open_cl_std_op_u_mul_hi instruction
,
7652 std::size_t instruction_start_index
)
7655 throw Parser_error(instruction_start_index
,
7656 instruction_start_index
,
7657 "instruction not implemented: "
7658 + std::string(get_enumerant_name(instruction
.get_operation())));
7661 void Spirv_to_llvm::handle_instruction_open_cl_std_op_u_mad_hi(Open_cl_std_op_u_mad_hi instruction
,
7662 std::size_t instruction_start_index
)
7665 throw Parser_error(instruction_start_index
,
7666 instruction_start_index
,
7667 "instruction not implemented: "
7668 + std::string(get_enumerant_name(instruction
.get_operation())));
7671 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fclamp(Open_cl_std_op_fclamp instruction
,
7672 std::size_t instruction_start_index
)
7675 throw Parser_error(instruction_start_index
,
7676 instruction_start_index
,
7677 "instruction not implemented: "
7678 + std::string(get_enumerant_name(instruction
.get_operation())));
7681 void Spirv_to_llvm::handle_instruction_open_cl_std_op_degrees(Open_cl_std_op_degrees instruction
,
7682 std::size_t instruction_start_index
)
7685 throw Parser_error(instruction_start_index
,
7686 instruction_start_index
,
7687 "instruction not implemented: "
7688 + std::string(get_enumerant_name(instruction
.get_operation())));
7691 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fmax_common(
7692 Open_cl_std_op_fmax_common instruction
, std::size_t instruction_start_index
)
7695 throw Parser_error(instruction_start_index
,
7696 instruction_start_index
,
7697 "instruction not implemented: "
7698 + std::string(get_enumerant_name(instruction
.get_operation())));
7701 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fmin_common(
7702 Open_cl_std_op_fmin_common instruction
, std::size_t instruction_start_index
)
7705 throw Parser_error(instruction_start_index
,
7706 instruction_start_index
,
7707 "instruction not implemented: "
7708 + std::string(get_enumerant_name(instruction
.get_operation())));
7711 void Spirv_to_llvm::handle_instruction_open_cl_std_op_mix(Open_cl_std_op_mix instruction
,
7712 std::size_t instruction_start_index
)
7715 throw Parser_error(instruction_start_index
,
7716 instruction_start_index
,
7717 "instruction not implemented: "
7718 + std::string(get_enumerant_name(instruction
.get_operation())));
7721 void Spirv_to_llvm::handle_instruction_open_cl_std_op_radians(Open_cl_std_op_radians instruction
,
7722 std::size_t instruction_start_index
)
7725 throw Parser_error(instruction_start_index
,
7726 instruction_start_index
,
7727 "instruction not implemented: "
7728 + std::string(get_enumerant_name(instruction
.get_operation())));
7731 void Spirv_to_llvm::handle_instruction_open_cl_std_op_step(Open_cl_std_op_step instruction
,
7732 std::size_t instruction_start_index
)
7735 throw Parser_error(instruction_start_index
,
7736 instruction_start_index
,
7737 "instruction not implemented: "
7738 + std::string(get_enumerant_name(instruction
.get_operation())));
7741 void Spirv_to_llvm::handle_instruction_open_cl_std_op_smoothstep(
7742 Open_cl_std_op_smoothstep instruction
, std::size_t instruction_start_index
)
7745 throw Parser_error(instruction_start_index
,
7746 instruction_start_index
,
7747 "instruction not implemented: "
7748 + std::string(get_enumerant_name(instruction
.get_operation())));
7751 void Spirv_to_llvm::handle_instruction_open_cl_std_op_sign(Open_cl_std_op_sign instruction
,
7752 std::size_t instruction_start_index
)
7755 throw Parser_error(instruction_start_index
,
7756 instruction_start_index
,
7757 "instruction not implemented: "
7758 + std::string(get_enumerant_name(instruction
.get_operation())));
7761 void Spirv_to_llvm::handle_instruction_open_cl_std_op_cross(Open_cl_std_op_cross instruction
,
7762 std::size_t instruction_start_index
)
7765 throw Parser_error(instruction_start_index
,
7766 instruction_start_index
,
7767 "instruction not implemented: "
7768 + std::string(get_enumerant_name(instruction
.get_operation())));
7771 void Spirv_to_llvm::handle_instruction_open_cl_std_op_distance(Open_cl_std_op_distance instruction
,
7772 std::size_t instruction_start_index
)
7775 throw Parser_error(instruction_start_index
,
7776 instruction_start_index
,
7777 "instruction not implemented: "
7778 + std::string(get_enumerant_name(instruction
.get_operation())));
7781 void Spirv_to_llvm::handle_instruction_open_cl_std_op_length(Open_cl_std_op_length instruction
,
7782 std::size_t instruction_start_index
)
7785 throw Parser_error(instruction_start_index
,
7786 instruction_start_index
,
7787 "instruction not implemented: "
7788 + std::string(get_enumerant_name(instruction
.get_operation())));
7791 void Spirv_to_llvm::handle_instruction_open_cl_std_op_normalize(
7792 Open_cl_std_op_normalize instruction
, std::size_t instruction_start_index
)
7795 throw Parser_error(instruction_start_index
,
7796 instruction_start_index
,
7797 "instruction not implemented: "
7798 + std::string(get_enumerant_name(instruction
.get_operation())));
7801 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fast_distance(
7802 Open_cl_std_op_fast_distance instruction
, std::size_t instruction_start_index
)
7805 throw Parser_error(instruction_start_index
,
7806 instruction_start_index
,
7807 "instruction not implemented: "
7808 + std::string(get_enumerant_name(instruction
.get_operation())));
7811 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fast_length(
7812 Open_cl_std_op_fast_length instruction
, std::size_t instruction_start_index
)
7815 throw Parser_error(instruction_start_index
,
7816 instruction_start_index
,
7817 "instruction not implemented: "
7818 + std::string(get_enumerant_name(instruction
.get_operation())));
7821 void Spirv_to_llvm::handle_instruction_open_cl_std_op_fast_normalize(
7822 Open_cl_std_op_fast_normalize instruction
, std::size_t instruction_start_index
)
7825 throw Parser_error(instruction_start_index
,
7826 instruction_start_index
,
7827 "instruction not implemented: "
7828 + std::string(get_enumerant_name(instruction
.get_operation())));
7831 void Spirv_to_llvm::handle_instruction_open_cl_std_op_bitselect(
7832 Open_cl_std_op_bitselect instruction
, std::size_t instruction_start_index
)
7835 throw Parser_error(instruction_start_index
,
7836 instruction_start_index
,
7837 "instruction not implemented: "
7838 + std::string(get_enumerant_name(instruction
.get_operation())));
7841 void Spirv_to_llvm::handle_instruction_open_cl_std_op_select(Open_cl_std_op_select instruction
,
7842 std::size_t instruction_start_index
)
7845 throw Parser_error(instruction_start_index
,
7846 instruction_start_index
,
7847 "instruction not implemented: "
7848 + std::string(get_enumerant_name(instruction
.get_operation())));
7851 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vloadn(Open_cl_std_op_vloadn instruction
,
7852 std::size_t instruction_start_index
)
7855 throw Parser_error(instruction_start_index
,
7856 instruction_start_index
,
7857 "instruction not implemented: "
7858 + std::string(get_enumerant_name(instruction
.get_operation())));
7861 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vstoren(Open_cl_std_op_vstoren instruction
,
7862 std::size_t instruction_start_index
)
7865 throw Parser_error(instruction_start_index
,
7866 instruction_start_index
,
7867 "instruction not implemented: "
7868 + std::string(get_enumerant_name(instruction
.get_operation())));
7871 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vload_half(
7872 Open_cl_std_op_vload_half instruction
, std::size_t instruction_start_index
)
7875 throw Parser_error(instruction_start_index
,
7876 instruction_start_index
,
7877 "instruction not implemented: "
7878 + std::string(get_enumerant_name(instruction
.get_operation())));
7881 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vload_halfn(
7882 Open_cl_std_op_vload_halfn instruction
, std::size_t instruction_start_index
)
7885 throw Parser_error(instruction_start_index
,
7886 instruction_start_index
,
7887 "instruction not implemented: "
7888 + std::string(get_enumerant_name(instruction
.get_operation())));
7891 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vstore_half(
7892 Open_cl_std_op_vstore_half instruction
, std::size_t instruction_start_index
)
7895 throw Parser_error(instruction_start_index
,
7896 instruction_start_index
,
7897 "instruction not implemented: "
7898 + std::string(get_enumerant_name(instruction
.get_operation())));
7901 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vstore_half_r(
7902 Open_cl_std_op_vstore_half_r instruction
, std::size_t instruction_start_index
)
7905 throw Parser_error(instruction_start_index
,
7906 instruction_start_index
,
7907 "instruction not implemented: "
7908 + std::string(get_enumerant_name(instruction
.get_operation())));
7911 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vstore_halfn(
7912 Open_cl_std_op_vstore_halfn instruction
, std::size_t instruction_start_index
)
7915 throw Parser_error(instruction_start_index
,
7916 instruction_start_index
,
7917 "instruction not implemented: "
7918 + std::string(get_enumerant_name(instruction
.get_operation())));
7921 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vstore_halfn_r(
7922 Open_cl_std_op_vstore_halfn_r instruction
, std::size_t instruction_start_index
)
7925 throw Parser_error(instruction_start_index
,
7926 instruction_start_index
,
7927 "instruction not implemented: "
7928 + std::string(get_enumerant_name(instruction
.get_operation())));
7931 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vloada_halfn(
7932 Open_cl_std_op_vloada_halfn instruction
, std::size_t instruction_start_index
)
7935 throw Parser_error(instruction_start_index
,
7936 instruction_start_index
,
7937 "instruction not implemented: "
7938 + std::string(get_enumerant_name(instruction
.get_operation())));
7941 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vstorea_halfn(
7942 Open_cl_std_op_vstorea_halfn instruction
, std::size_t instruction_start_index
)
7945 throw Parser_error(instruction_start_index
,
7946 instruction_start_index
,
7947 "instruction not implemented: "
7948 + std::string(get_enumerant_name(instruction
.get_operation())));
7951 void Spirv_to_llvm::handle_instruction_open_cl_std_op_vstorea_halfn_r(
7952 Open_cl_std_op_vstorea_halfn_r instruction
, std::size_t instruction_start_index
)
7955 throw Parser_error(instruction_start_index
,
7956 instruction_start_index
,
7957 "instruction not implemented: "
7958 + std::string(get_enumerant_name(instruction
.get_operation())));
7961 void Spirv_to_llvm::handle_instruction_open_cl_std_op_shuffle(Open_cl_std_op_shuffle instruction
,
7962 std::size_t instruction_start_index
)
7965 throw Parser_error(instruction_start_index
,
7966 instruction_start_index
,
7967 "instruction not implemented: "
7968 + std::string(get_enumerant_name(instruction
.get_operation())));
7971 void Spirv_to_llvm::handle_instruction_open_cl_std_op_shuffle2(Open_cl_std_op_shuffle2 instruction
,
7972 std::size_t instruction_start_index
)
7975 throw Parser_error(instruction_start_index
,
7976 instruction_start_index
,
7977 "instruction not implemented: "
7978 + std::string(get_enumerant_name(instruction
.get_operation())));
7981 void Spirv_to_llvm::handle_instruction_open_cl_std_op_printf(Open_cl_std_op_printf instruction
,
7982 std::size_t instruction_start_index
)
7985 throw Parser_error(instruction_start_index
,
7986 instruction_start_index
,
7987 "instruction not implemented: "
7988 + std::string(get_enumerant_name(instruction
.get_operation())));
7991 void Spirv_to_llvm::handle_instruction_open_cl_std_op_prefetch(Open_cl_std_op_prefetch instruction
,
7992 std::size_t instruction_start_index
)
7995 throw Parser_error(instruction_start_index
,
7996 instruction_start_index
,
7997 "instruction not implemented: "
7998 + std::string(get_enumerant_name(instruction
.get_operation())));
8001 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_round(Glsl_std_450_op_round instruction
,
8002 std::size_t instruction_start_index
)
8005 throw Parser_error(instruction_start_index
,
8006 instruction_start_index
,
8007 "instruction not implemented: "
8008 + std::string(get_enumerant_name(instruction
.get_operation())));
8011 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_round_even(
8012 Glsl_std_450_op_round_even instruction
, std::size_t instruction_start_index
)
8015 throw Parser_error(instruction_start_index
,
8016 instruction_start_index
,
8017 "instruction not implemented: "
8018 + std::string(get_enumerant_name(instruction
.get_operation())));
8021 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_trunc(Glsl_std_450_op_trunc instruction
,
8022 std::size_t instruction_start_index
)
8025 throw Parser_error(instruction_start_index
,
8026 instruction_start_index
,
8027 "instruction not implemented: "
8028 + std::string(get_enumerant_name(instruction
.get_operation())));
8031 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_f_abs(Glsl_std_450_op_f_abs instruction
,
8032 std::size_t instruction_start_index
)
8035 throw Parser_error(instruction_start_index
,
8036 instruction_start_index
,
8037 "instruction not implemented: "
8038 + std::string(get_enumerant_name(instruction
.get_operation())));
8041 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_s_abs(Glsl_std_450_op_s_abs instruction
,
8042 std::size_t instruction_start_index
)
8045 throw Parser_error(instruction_start_index
,
8046 instruction_start_index
,
8047 "instruction not implemented: "
8048 + std::string(get_enumerant_name(instruction
.get_operation())));
8051 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_f_sign(Glsl_std_450_op_f_sign instruction
,
8052 std::size_t instruction_start_index
)
8055 throw Parser_error(instruction_start_index
,
8056 instruction_start_index
,
8057 "instruction not implemented: "
8058 + std::string(get_enumerant_name(instruction
.get_operation())));
8061 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_s_sign(Glsl_std_450_op_s_sign instruction
,
8062 std::size_t instruction_start_index
)
8065 throw Parser_error(instruction_start_index
,
8066 instruction_start_index
,
8067 "instruction not implemented: "
8068 + std::string(get_enumerant_name(instruction
.get_operation())));
8071 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_floor(Glsl_std_450_op_floor instruction
,
8072 std::size_t instruction_start_index
)
8075 throw Parser_error(instruction_start_index
,
8076 instruction_start_index
,
8077 "instruction not implemented: "
8078 + std::string(get_enumerant_name(instruction
.get_operation())));
8081 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_ceil(Glsl_std_450_op_ceil instruction
,
8082 std::size_t instruction_start_index
)
8085 throw Parser_error(instruction_start_index
,
8086 instruction_start_index
,
8087 "instruction not implemented: "
8088 + std::string(get_enumerant_name(instruction
.get_operation())));
8091 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_fract(Glsl_std_450_op_fract instruction
,
8092 std::size_t instruction_start_index
)
8095 throw Parser_error(instruction_start_index
,
8096 instruction_start_index
,
8097 "instruction not implemented: "
8098 + std::string(get_enumerant_name(instruction
.get_operation())));
8101 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_radians(Glsl_std_450_op_radians instruction
,
8102 std::size_t instruction_start_index
)
8105 throw Parser_error(instruction_start_index
,
8106 instruction_start_index
,
8107 "instruction not implemented: "
8108 + std::string(get_enumerant_name(instruction
.get_operation())));
8111 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_degrees(Glsl_std_450_op_degrees instruction
,
8112 std::size_t instruction_start_index
)
8115 throw Parser_error(instruction_start_index
,
8116 instruction_start_index
,
8117 "instruction not implemented: "
8118 + std::string(get_enumerant_name(instruction
.get_operation())));
8121 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_sin(Glsl_std_450_op_sin instruction
,
8122 std::size_t instruction_start_index
)
8125 throw Parser_error(instruction_start_index
,
8126 instruction_start_index
,
8127 "instruction not implemented: "
8128 + std::string(get_enumerant_name(instruction
.get_operation())));
8131 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_cos(Glsl_std_450_op_cos instruction
,
8132 std::size_t instruction_start_index
)
8135 throw Parser_error(instruction_start_index
,
8136 instruction_start_index
,
8137 "instruction not implemented: "
8138 + std::string(get_enumerant_name(instruction
.get_operation())));
8141 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_tan(Glsl_std_450_op_tan instruction
,
8142 std::size_t instruction_start_index
)
8145 throw Parser_error(instruction_start_index
,
8146 instruction_start_index
,
8147 "instruction not implemented: "
8148 + std::string(get_enumerant_name(instruction
.get_operation())));
8151 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_asin(Glsl_std_450_op_asin instruction
,
8152 std::size_t instruction_start_index
)
8155 throw Parser_error(instruction_start_index
,
8156 instruction_start_index
,
8157 "instruction not implemented: "
8158 + std::string(get_enumerant_name(instruction
.get_operation())));
8161 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_acos(Glsl_std_450_op_acos instruction
,
8162 std::size_t instruction_start_index
)
8165 throw Parser_error(instruction_start_index
,
8166 instruction_start_index
,
8167 "instruction not implemented: "
8168 + std::string(get_enumerant_name(instruction
.get_operation())));
8171 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_atan(Glsl_std_450_op_atan instruction
,
8172 std::size_t instruction_start_index
)
8175 throw Parser_error(instruction_start_index
,
8176 instruction_start_index
,
8177 "instruction not implemented: "
8178 + std::string(get_enumerant_name(instruction
.get_operation())));
8181 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_sinh(Glsl_std_450_op_sinh instruction
,
8182 std::size_t instruction_start_index
)
8185 throw Parser_error(instruction_start_index
,
8186 instruction_start_index
,
8187 "instruction not implemented: "
8188 + std::string(get_enumerant_name(instruction
.get_operation())));
8191 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_cosh(Glsl_std_450_op_cosh instruction
,
8192 std::size_t instruction_start_index
)
8195 throw Parser_error(instruction_start_index
,
8196 instruction_start_index
,
8197 "instruction not implemented: "
8198 + std::string(get_enumerant_name(instruction
.get_operation())));
8201 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_tanh(Glsl_std_450_op_tanh instruction
,
8202 std::size_t instruction_start_index
)
8205 throw Parser_error(instruction_start_index
,
8206 instruction_start_index
,
8207 "instruction not implemented: "
8208 + std::string(get_enumerant_name(instruction
.get_operation())));
8211 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_asinh(Glsl_std_450_op_asinh instruction
,
8212 std::size_t instruction_start_index
)
8215 throw Parser_error(instruction_start_index
,
8216 instruction_start_index
,
8217 "instruction not implemented: "
8218 + std::string(get_enumerant_name(instruction
.get_operation())));
8221 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_acosh(Glsl_std_450_op_acosh instruction
,
8222 std::size_t instruction_start_index
)
8225 throw Parser_error(instruction_start_index
,
8226 instruction_start_index
,
8227 "instruction not implemented: "
8228 + std::string(get_enumerant_name(instruction
.get_operation())));
8231 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_atanh(Glsl_std_450_op_atanh instruction
,
8232 std::size_t instruction_start_index
)
8235 throw Parser_error(instruction_start_index
,
8236 instruction_start_index
,
8237 "instruction not implemented: "
8238 + std::string(get_enumerant_name(instruction
.get_operation())));
8241 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_atan2(Glsl_std_450_op_atan2 instruction
,
8242 std::size_t instruction_start_index
)
8245 throw Parser_error(instruction_start_index
,
8246 instruction_start_index
,
8247 "instruction not implemented: "
8248 + std::string(get_enumerant_name(instruction
.get_operation())));
8251 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_pow(Glsl_std_450_op_pow instruction
,
8252 std::size_t instruction_start_index
)
8255 throw Parser_error(instruction_start_index
,
8256 instruction_start_index
,
8257 "instruction not implemented: "
8258 + std::string(get_enumerant_name(instruction
.get_operation())));
8261 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_exp(Glsl_std_450_op_exp instruction
,
8262 std::size_t instruction_start_index
)
8265 throw Parser_error(instruction_start_index
,
8266 instruction_start_index
,
8267 "instruction not implemented: "
8268 + std::string(get_enumerant_name(instruction
.get_operation())));
8271 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_log(Glsl_std_450_op_log instruction
,
8272 std::size_t instruction_start_index
)
8275 throw Parser_error(instruction_start_index
,
8276 instruction_start_index
,
8277 "instruction not implemented: "
8278 + std::string(get_enumerant_name(instruction
.get_operation())));
8281 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_exp2(Glsl_std_450_op_exp2 instruction
,
8282 std::size_t instruction_start_index
)
8285 throw Parser_error(instruction_start_index
,
8286 instruction_start_index
,
8287 "instruction not implemented: "
8288 + std::string(get_enumerant_name(instruction
.get_operation())));
8291 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_log2(Glsl_std_450_op_log2 instruction
,
8292 std::size_t instruction_start_index
)
8295 throw Parser_error(instruction_start_index
,
8296 instruction_start_index
,
8297 "instruction not implemented: "
8298 + std::string(get_enumerant_name(instruction
.get_operation())));
8301 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_sqrt(Glsl_std_450_op_sqrt instruction
,
8302 std::size_t instruction_start_index
)
8305 throw Parser_error(instruction_start_index
,
8306 instruction_start_index
,
8307 "instruction not implemented: "
8308 + std::string(get_enumerant_name(instruction
.get_operation())));
8311 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_inverse_sqrt(
8312 Glsl_std_450_op_inverse_sqrt instruction
, std::size_t instruction_start_index
)
8315 throw Parser_error(instruction_start_index
,
8316 instruction_start_index
,
8317 "instruction not implemented: "
8318 + std::string(get_enumerant_name(instruction
.get_operation())));
8321 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_determinant(
8322 Glsl_std_450_op_determinant instruction
, std::size_t instruction_start_index
)
8325 throw Parser_error(instruction_start_index
,
8326 instruction_start_index
,
8327 "instruction not implemented: "
8328 + std::string(get_enumerant_name(instruction
.get_operation())));
8331 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_matrix_inverse(
8332 Glsl_std_450_op_matrix_inverse instruction
, std::size_t instruction_start_index
)
8335 throw Parser_error(instruction_start_index
,
8336 instruction_start_index
,
8337 "instruction not implemented: "
8338 + std::string(get_enumerant_name(instruction
.get_operation())));
8341 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_modf(Glsl_std_450_op_modf instruction
,
8342 std::size_t instruction_start_index
)
8345 throw Parser_error(instruction_start_index
,
8346 instruction_start_index
,
8347 "instruction not implemented: "
8348 + std::string(get_enumerant_name(instruction
.get_operation())));
8351 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_modf_struct(
8352 Glsl_std_450_op_modf_struct instruction
, std::size_t instruction_start_index
)
8355 throw Parser_error(instruction_start_index
,
8356 instruction_start_index
,
8357 "instruction not implemented: "
8358 + std::string(get_enumerant_name(instruction
.get_operation())));
8361 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_f_min(Glsl_std_450_op_f_min instruction
,
8362 std::size_t instruction_start_index
)
8365 throw Parser_error(instruction_start_index
,
8366 instruction_start_index
,
8367 "instruction not implemented: "
8368 + std::string(get_enumerant_name(instruction
.get_operation())));
8371 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_u_min(Glsl_std_450_op_u_min instruction
,
8372 std::size_t instruction_start_index
)
8375 throw Parser_error(instruction_start_index
,
8376 instruction_start_index
,
8377 "instruction not implemented: "
8378 + std::string(get_enumerant_name(instruction
.get_operation())));
8381 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_s_min(Glsl_std_450_op_s_min instruction
,
8382 std::size_t instruction_start_index
)
8385 throw Parser_error(instruction_start_index
,
8386 instruction_start_index
,
8387 "instruction not implemented: "
8388 + std::string(get_enumerant_name(instruction
.get_operation())));
8391 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_f_max(Glsl_std_450_op_f_max instruction
,
8392 std::size_t instruction_start_index
)
8395 throw Parser_error(instruction_start_index
,
8396 instruction_start_index
,
8397 "instruction not implemented: "
8398 + std::string(get_enumerant_name(instruction
.get_operation())));
8401 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_u_max(Glsl_std_450_op_u_max instruction
,
8402 std::size_t instruction_start_index
)
8405 throw Parser_error(instruction_start_index
,
8406 instruction_start_index
,
8407 "instruction not implemented: "
8408 + std::string(get_enumerant_name(instruction
.get_operation())));
8411 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_s_max(Glsl_std_450_op_s_max instruction
,
8412 std::size_t instruction_start_index
)
8415 throw Parser_error(instruction_start_index
,
8416 instruction_start_index
,
8417 "instruction not implemented: "
8418 + std::string(get_enumerant_name(instruction
.get_operation())));
8421 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_f_clamp(Glsl_std_450_op_f_clamp instruction
,
8422 std::size_t instruction_start_index
)
8425 throw Parser_error(instruction_start_index
,
8426 instruction_start_index
,
8427 "instruction not implemented: "
8428 + std::string(get_enumerant_name(instruction
.get_operation())));
8431 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_u_clamp(Glsl_std_450_op_u_clamp instruction
,
8432 std::size_t instruction_start_index
)
8435 throw Parser_error(instruction_start_index
,
8436 instruction_start_index
,
8437 "instruction not implemented: "
8438 + std::string(get_enumerant_name(instruction
.get_operation())));
8441 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_s_clamp(Glsl_std_450_op_s_clamp instruction
,
8442 std::size_t instruction_start_index
)
8445 throw Parser_error(instruction_start_index
,
8446 instruction_start_index
,
8447 "instruction not implemented: "
8448 + std::string(get_enumerant_name(instruction
.get_operation())));
8451 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_f_mix(Glsl_std_450_op_f_mix instruction
,
8452 std::size_t instruction_start_index
)
8455 throw Parser_error(instruction_start_index
,
8456 instruction_start_index
,
8457 "instruction not implemented: "
8458 + std::string(get_enumerant_name(instruction
.get_operation())));
8461 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_i_mix(Glsl_std_450_op_i_mix instruction
,
8462 std::size_t instruction_start_index
)
8465 throw Parser_error(instruction_start_index
,
8466 instruction_start_index
,
8467 "instruction not implemented: "
8468 + std::string(get_enumerant_name(instruction
.get_operation())));
8471 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_step(Glsl_std_450_op_step instruction
,
8472 std::size_t instruction_start_index
)
8475 throw Parser_error(instruction_start_index
,
8476 instruction_start_index
,
8477 "instruction not implemented: "
8478 + std::string(get_enumerant_name(instruction
.get_operation())));
8481 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_smooth_step(
8482 Glsl_std_450_op_smooth_step instruction
, std::size_t instruction_start_index
)
8485 throw Parser_error(instruction_start_index
,
8486 instruction_start_index
,
8487 "instruction not implemented: "
8488 + std::string(get_enumerant_name(instruction
.get_operation())));
8491 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_fma(Glsl_std_450_op_fma instruction
,
8492 std::size_t instruction_start_index
)
8495 throw Parser_error(instruction_start_index
,
8496 instruction_start_index
,
8497 "instruction not implemented: "
8498 + std::string(get_enumerant_name(instruction
.get_operation())));
8501 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_frexp(Glsl_std_450_op_frexp instruction
,
8502 std::size_t instruction_start_index
)
8505 throw Parser_error(instruction_start_index
,
8506 instruction_start_index
,
8507 "instruction not implemented: "
8508 + std::string(get_enumerant_name(instruction
.get_operation())));
8511 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_frexp_struct(
8512 Glsl_std_450_op_frexp_struct instruction
, std::size_t instruction_start_index
)
8515 throw Parser_error(instruction_start_index
,
8516 instruction_start_index
,
8517 "instruction not implemented: "
8518 + std::string(get_enumerant_name(instruction
.get_operation())));
8521 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_ldexp(Glsl_std_450_op_ldexp instruction
,
8522 std::size_t instruction_start_index
)
8525 throw Parser_error(instruction_start_index
,
8526 instruction_start_index
,
8527 "instruction not implemented: "
8528 + std::string(get_enumerant_name(instruction
.get_operation())));
8531 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_pack_snorm4x8(
8532 Glsl_std_450_op_pack_snorm4x8 instruction
, std::size_t instruction_start_index
)
8535 throw Parser_error(instruction_start_index
,
8536 instruction_start_index
,
8537 "instruction not implemented: "
8538 + std::string(get_enumerant_name(instruction
.get_operation())));
8541 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_pack_unorm4x8(
8542 Glsl_std_450_op_pack_unorm4x8 instruction
, std::size_t instruction_start_index
)
8545 throw Parser_error(instruction_start_index
,
8546 instruction_start_index
,
8547 "instruction not implemented: "
8548 + std::string(get_enumerant_name(instruction
.get_operation())));
8551 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_pack_snorm2x16(
8552 Glsl_std_450_op_pack_snorm2x16 instruction
, std::size_t instruction_start_index
)
8555 throw Parser_error(instruction_start_index
,
8556 instruction_start_index
,
8557 "instruction not implemented: "
8558 + std::string(get_enumerant_name(instruction
.get_operation())));
8561 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_pack_unorm2x16(
8562 Glsl_std_450_op_pack_unorm2x16 instruction
, std::size_t instruction_start_index
)
8565 throw Parser_error(instruction_start_index
,
8566 instruction_start_index
,
8567 "instruction not implemented: "
8568 + std::string(get_enumerant_name(instruction
.get_operation())));
8571 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_pack_half2x16(
8572 Glsl_std_450_op_pack_half2x16 instruction
, std::size_t instruction_start_index
)
8575 throw Parser_error(instruction_start_index
,
8576 instruction_start_index
,
8577 "instruction not implemented: "
8578 + std::string(get_enumerant_name(instruction
.get_operation())));
8581 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_pack_double2x32(
8582 Glsl_std_450_op_pack_double2x32 instruction
, std::size_t instruction_start_index
)
8585 throw Parser_error(instruction_start_index
,
8586 instruction_start_index
,
8587 "instruction not implemented: "
8588 + std::string(get_enumerant_name(instruction
.get_operation())));
8591 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_unpack_snorm2x16(
8592 Glsl_std_450_op_unpack_snorm2x16 instruction
, std::size_t instruction_start_index
)
8595 throw Parser_error(instruction_start_index
,
8596 instruction_start_index
,
8597 "instruction not implemented: "
8598 + std::string(get_enumerant_name(instruction
.get_operation())));
8601 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_unpack_unorm2x16(
8602 Glsl_std_450_op_unpack_unorm2x16 instruction
, std::size_t instruction_start_index
)
8605 throw Parser_error(instruction_start_index
,
8606 instruction_start_index
,
8607 "instruction not implemented: "
8608 + std::string(get_enumerant_name(instruction
.get_operation())));
8611 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_unpack_half2x16(
8612 Glsl_std_450_op_unpack_half2x16 instruction
, std::size_t instruction_start_index
)
8615 throw Parser_error(instruction_start_index
,
8616 instruction_start_index
,
8617 "instruction not implemented: "
8618 + std::string(get_enumerant_name(instruction
.get_operation())));
8621 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_unpack_snorm4x8(
8622 Glsl_std_450_op_unpack_snorm4x8 instruction
, std::size_t instruction_start_index
)
8625 throw Parser_error(instruction_start_index
,
8626 instruction_start_index
,
8627 "instruction not implemented: "
8628 + std::string(get_enumerant_name(instruction
.get_operation())));
8631 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_unpack_unorm4x8(
8632 Glsl_std_450_op_unpack_unorm4x8 instruction
, std::size_t instruction_start_index
)
8635 throw Parser_error(instruction_start_index
,
8636 instruction_start_index
,
8637 "instruction not implemented: "
8638 + std::string(get_enumerant_name(instruction
.get_operation())));
8641 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_unpack_double2x32(
8642 Glsl_std_450_op_unpack_double2x32 instruction
, std::size_t instruction_start_index
)
8645 throw Parser_error(instruction_start_index
,
8646 instruction_start_index
,
8647 "instruction not implemented: "
8648 + std::string(get_enumerant_name(instruction
.get_operation())));
8651 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_length(Glsl_std_450_op_length instruction
,
8652 std::size_t instruction_start_index
)
8655 throw Parser_error(instruction_start_index
,
8656 instruction_start_index
,
8657 "instruction not implemented: "
8658 + std::string(get_enumerant_name(instruction
.get_operation())));
8661 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_distance(
8662 Glsl_std_450_op_distance instruction
, std::size_t instruction_start_index
)
8665 throw Parser_error(instruction_start_index
,
8666 instruction_start_index
,
8667 "instruction not implemented: "
8668 + std::string(get_enumerant_name(instruction
.get_operation())));
8671 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_cross(Glsl_std_450_op_cross instruction
,
8672 std::size_t instruction_start_index
)
8675 throw Parser_error(instruction_start_index
,
8676 instruction_start_index
,
8677 "instruction not implemented: "
8678 + std::string(get_enumerant_name(instruction
.get_operation())));
8681 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_normalize(
8682 Glsl_std_450_op_normalize instruction
, std::size_t instruction_start_index
)
8685 throw Parser_error(instruction_start_index
,
8686 instruction_start_index
,
8687 "instruction not implemented: "
8688 + std::string(get_enumerant_name(instruction
.get_operation())));
8691 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_face_forward(
8692 Glsl_std_450_op_face_forward instruction
, std::size_t instruction_start_index
)
8695 throw Parser_error(instruction_start_index
,
8696 instruction_start_index
,
8697 "instruction not implemented: "
8698 + std::string(get_enumerant_name(instruction
.get_operation())));
8701 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_reflect(Glsl_std_450_op_reflect instruction
,
8702 std::size_t instruction_start_index
)
8705 throw Parser_error(instruction_start_index
,
8706 instruction_start_index
,
8707 "instruction not implemented: "
8708 + std::string(get_enumerant_name(instruction
.get_operation())));
8711 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_refract(Glsl_std_450_op_refract instruction
,
8712 std::size_t instruction_start_index
)
8715 throw Parser_error(instruction_start_index
,
8716 instruction_start_index
,
8717 "instruction not implemented: "
8718 + std::string(get_enumerant_name(instruction
.get_operation())));
8721 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_find_i_lsb(
8722 Glsl_std_450_op_find_i_lsb instruction
, std::size_t instruction_start_index
)
8725 throw Parser_error(instruction_start_index
,
8726 instruction_start_index
,
8727 "instruction not implemented: "
8728 + std::string(get_enumerant_name(instruction
.get_operation())));
8731 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_find_s_msb(
8732 Glsl_std_450_op_find_s_msb instruction
, std::size_t instruction_start_index
)
8735 throw Parser_error(instruction_start_index
,
8736 instruction_start_index
,
8737 "instruction not implemented: "
8738 + std::string(get_enumerant_name(instruction
.get_operation())));
8741 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_find_u_msb(
8742 Glsl_std_450_op_find_u_msb instruction
, std::size_t instruction_start_index
)
8745 throw Parser_error(instruction_start_index
,
8746 instruction_start_index
,
8747 "instruction not implemented: "
8748 + std::string(get_enumerant_name(instruction
.get_operation())));
8751 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_interpolate_at_centroid(
8752 Glsl_std_450_op_interpolate_at_centroid instruction
, std::size_t instruction_start_index
)
8755 throw Parser_error(instruction_start_index
,
8756 instruction_start_index
,
8757 "instruction not implemented: "
8758 + std::string(get_enumerant_name(instruction
.get_operation())));
8761 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_interpolate_at_sample(
8762 Glsl_std_450_op_interpolate_at_sample instruction
, std::size_t instruction_start_index
)
8765 throw Parser_error(instruction_start_index
,
8766 instruction_start_index
,
8767 "instruction not implemented: "
8768 + std::string(get_enumerant_name(instruction
.get_operation())));
8771 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_interpolate_at_offset(
8772 Glsl_std_450_op_interpolate_at_offset instruction
, std::size_t instruction_start_index
)
8775 throw Parser_error(instruction_start_index
,
8776 instruction_start_index
,
8777 "instruction not implemented: "
8778 + std::string(get_enumerant_name(instruction
.get_operation())));
8781 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_n_min(Glsl_std_450_op_n_min instruction
,
8782 std::size_t instruction_start_index
)
8785 throw Parser_error(instruction_start_index
,
8786 instruction_start_index
,
8787 "instruction not implemented: "
8788 + std::string(get_enumerant_name(instruction
.get_operation())));
8791 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_n_max(Glsl_std_450_op_n_max instruction
,
8792 std::size_t instruction_start_index
)
8795 throw Parser_error(instruction_start_index
,
8796 instruction_start_index
,
8797 "instruction not implemented: "
8798 + std::string(get_enumerant_name(instruction
.get_operation())));
8801 void Spirv_to_llvm::handle_instruction_glsl_std_450_op_n_clamp(Glsl_std_450_op_n_clamp instruction
,
8802 std::size_t instruction_start_index
)
8805 throw Parser_error(instruction_start_index
,
8806 instruction_start_index
,
8807 "instruction not implemented: "
8808 + std::string(get_enumerant_name(instruction
.get_operation())));
8811 Converted_module
spirv_to_llvm(::LLVMContextRef context
,
8812 ::LLVMTargetMachineRef target_machine
,
8813 const Word
*shader_words
,
8814 std::size_t shader_size
,
8815 std::uint64_t shader_id
)
8817 return Spirv_to_llvm(context
, target_machine
, shader_id
).run(shader_words
, shader_size
);