Lines Matching full:module
32 // A struct for containing the module header information.
41 // A SPIR-V module. It contains all the information for a SPIR-V module and
43 class Module {
50 // Creates an empty module with zero'd header.
51 Module() : header_({}) {} in Module() function
73 // Appends a capability instruction to this module.
76 // Appends an extension instruction to this module.
79 // Appends an extended instruction set instruction to this module.
82 // Set the memory model for this module.
85 // Appends an entry point instruction to this module.
88 // Appends an execution mode instruction to this module.
91 // Appends a debug 1 instruction (excluding OpLine & OpNoLine) to this module.
93 // 2.4 Logical Layout of a Module from the SPIR-V specification.
96 // Appends a debug 2 instruction (excluding OpLine & OpNoLine) to this module.
98 // 2.4 Logical Layout of a Module from the SPIR-V specification.
101 // Appends a debug 3 instruction (OpModuleProcessed) to this module.
105 // Appends an annotation instruction to this module.
108 // Appends a type-declaration instruction to this module.
111 // Appends a constant, global variable, or OpUndef instruction to this module.
114 // Appends a function to this module.
118 // module.
122 // module.
136 // Iterators for capabilities instructions contained in this module.
142 // Iterators for ext_inst_imports instructions contained in this module.
148 // Return the memory model instruction contained inthis module.
155 // appear in the logical layout of a module:
163 // in this module. These are for layout section 7a.
170 // in this module. These are for layout section 7b.
177 // in this module. These are for layout section 7c.
183 // Iterators for entry point instructions contained in this module
187 // Iterators for execution_modes instructions contained in this module.
209 // Iterators for annotation instructions contained in this module.
215 // Iterators for extension instructions contained in this module.
227 // Iterators for functions contained in this module.
235 // Invokes function |f| on all instructions in this module, and optionally on
246 // Returns 1 more than the maximum Id value mentioned in the module.
249 // Returns true if module has capability |cap|
256 // Sets the associated context for this module
259 // Gets the associated context for this module
263 ModuleHeader header_; // Module header
265 // The following fields respect the "Logical Layout of a Module" in
271 // A module only has one memory model instruction.
284 // Pretty-prints |module| to |str|. Returns |str|.
285 std::ostream& operator<<(std::ostream& str, const Module& module);
287 inline void Module::AddCapability(std::unique_ptr<Instruction> c) { in AddCapability()
291 inline void Module::AddExtension(std::unique_ptr<Instruction> e) { in AddExtension()
295 inline void Module::AddExtInstImport(std::unique_ptr<Instruction> e) { in AddExtInstImport()
299 inline void Module::SetMemoryModel(std::unique_ptr<Instruction> m) { in SetMemoryModel()
303 inline void Module::AddEntryPoint(std::unique_ptr<Instruction> e) { in AddEntryPoint()
307 inline void Module::AddExecutionMode(std::unique_ptr<Instruction> e) { in AddExecutionMode()
311 inline void Module::AddDebug1Inst(std::unique_ptr<Instruction> d) { in AddDebug1Inst()
315 inline void Module::AddDebug2Inst(std::unique_ptr<Instruction> d) { in AddDebug2Inst()
319 inline void Module::AddDebug3Inst(std::unique_ptr<Instruction> d) { in AddDebug3Inst()
323 inline void Module::AddAnnotationInst(std::unique_ptr<Instruction> a) { in AddAnnotationInst()
327 inline void Module::AddType(std::unique_ptr<Instruction> t) { in AddType()
331 inline void Module::AddGlobalValue(std::unique_ptr<Instruction> v) { in AddGlobalValue()
335 inline void Module::AddFunction(std::unique_ptr<Function> f) { in AddFunction()
339 inline Module::inst_iterator Module::capability_begin() { in capability_begin()
342 inline Module::inst_iterator Module::capability_end() { in capability_end()
346 inline IteratorRange<Module::inst_iterator> Module::capabilities() { in capabilities()
350 inline IteratorRange<Module::const_inst_iterator> Module::capabilities() const { in capabilities()
354 inline Module::inst_iterator Module::ext_inst_import_begin() { in ext_inst_import_begin()
357 inline Module::inst_iterator Module::ext_inst_import_end() { in ext_inst_import_end()
361 inline IteratorRange<Module::inst_iterator> Module::ext_inst_imports() { in ext_inst_imports()
365 inline IteratorRange<Module::const_inst_iterator> Module::ext_inst_imports() in ext_inst_imports()
370 inline Module::inst_iterator Module::debug1_begin() { return debugs1_.begin(); } in debug1_begin()
371 inline Module::inst_iterator Module::debug1_end() { return debugs1_.end(); } in debug1_end()
373 inline IteratorRange<Module::inst_iterator> Module::debugs1() { in debugs1()
377 inline IteratorRange<Module::const_inst_iterator> Module::debugs1() const { in debugs1()
381 inline Module::inst_iterator Module::debug2_begin() { return debugs2_.begin(); } in debug2_begin()
382 inline Module::inst_iterator Module::debug2_end() { return debugs2_.end(); } in debug2_end()
384 inline IteratorRange<Module::inst_iterator> Module::debugs2() { in debugs2()
388 inline IteratorRange<Module::const_inst_iterator> Module::debugs2() const { in debugs2()
392 inline Module::inst_iterator Module::debug3_begin() { return debugs3_.begin(); } in debug3_begin()
393 inline Module::inst_iterator Module::debug3_end() { return debugs3_.end(); } in debug3_end()
395 inline IteratorRange<Module::inst_iterator> Module::debugs3() { in debugs3()
399 inline IteratorRange<Module::const_inst_iterator> Module::debugs3() const { in debugs3()
403 inline IteratorRange<Module::inst_iterator> Module::entry_points() { in entry_points()
407 inline IteratorRange<Module::const_inst_iterator> Module::entry_points() const { in entry_points()
411 inline Module::inst_iterator Module::execution_mode_begin() { in execution_mode_begin()
414 inline Module::inst_iterator Module::execution_mode_end() { in execution_mode_end()
418 inline IteratorRange<Module::inst_iterator> Module::execution_modes() { in execution_modes()
422 inline IteratorRange<Module::const_inst_iterator> Module::execution_modes() in execution_modes()
427 inline Module::inst_iterator Module::annotation_begin() { in annotation_begin()
430 inline Module::inst_iterator Module::annotation_end() { in annotation_end()
434 inline IteratorRange<Module::inst_iterator> Module::annotations() { in annotations()
438 inline IteratorRange<Module::const_inst_iterator> Module::annotations() const { in annotations()
442 inline Module::inst_iterator Module::extension_begin() { in extension_begin()
445 inline Module::inst_iterator Module::extension_end() { in extension_end()
449 inline IteratorRange<Module::inst_iterator> Module::extensions() { in extensions()
453 inline IteratorRange<Module::const_inst_iterator> Module::extensions() const { in extensions()
457 inline Module::inst_iterator Module::types_values_begin() { in types_values_begin()
461 inline Module::inst_iterator Module::types_values_end() { in types_values_end()
465 inline IteratorRange<Module::inst_iterator> Module::types_values() { in types_values()
469 inline IteratorRange<Module::const_inst_iterator> Module::types_values() const { in types_values()
473 inline Module::const_iterator Module::cbegin() const { in cbegin()
477 inline Module::const_iterator Module::cend() const { in cend()