Lines Matching full:module
33 // A struct for containing the module header information.
42 // A SPIR-V module. It contains all the information for a SPIR-V module and
44 class Module {
51 // Creates an empty module with zero'd header.
52 Module() : header_({}), contains_debug_info_(false) {} in Module() function
74 // Appends a capability instruction to this module.
77 // Appends an extension instruction to this module.
80 // Appends an extended instruction set instruction to this module.
83 // Set the memory model for this module.
86 // Appends an entry point instruction to this module.
89 // Appends an execution mode instruction to this module.
92 // Appends a debug 1 instruction (excluding OpLine & OpNoLine) to this module.
94 // 2.4 Logical Layout of a Module from the SPIR-V specification.
97 // Appends a debug 2 instruction (excluding OpLine & OpNoLine) to this module.
99 // 2.4 Logical Layout of a Module from the SPIR-V specification.
102 // Appends a debug 3 instruction (OpModuleProcessed) to this module.
107 // instruction to this module.
110 // Appends an annotation instruction to this module.
113 // Appends a type-declaration instruction to this module.
116 // Appends a constant, global variable, or OpUndef instruction to this module.
119 // Appends a function to this module.
127 // module.
131 // module.
147 // Iterators for capabilities instructions contained in this module.
153 // Iterators for ext_inst_imports instructions contained in this module.
159 // Return the memory model instruction contained inthis module.
166 // appear in the logical layout of a module:
174 // in this module. These are for layout section 7a.
181 // in this module. These are for layout section 7b.
188 // in this module. These are for layout section 7c.
195 // contained in this module. These are OpExtInst for OpenCL.DebugInfo.100
202 // Iterators for entry point instructions contained in this module
206 // Iterators for execution_modes instructions contained in this module.
212 // Iterators for annotation instructions contained in this module.
218 // Iterators for extension instructions contained in this module.
230 // Iterators for functions contained in this module.
238 // Invokes function |f| on all instructions in this module, and optionally on
249 // Returns 1 more than the maximum Id value mentioned in the module.
252 // Returns true if module has capability |cap|
259 // Sets the associated context for this module
262 // Gets the associated context for this module
279 ModuleHeader header_; // Module header
281 // The following fields respect the "Logical Layout of a Module" in
287 // A module only has one memory model instruction.
300 // If the module ends with Op*Line instruction, they will not be attached to
304 // This module contains DebugScope/DebugNoScope or OpLine/OpNoLine.
308 // Pretty-prints |module| to |str|. Returns |str|.
309 std::ostream& operator<<(std::ostream& str, const Module& module);
311 inline void Module::AddCapability(std::unique_ptr<Instruction> c) { in AddCapability()
315 inline void Module::AddExtension(std::unique_ptr<Instruction> e) { in AddExtension()
319 inline void Module::AddExtInstImport(std::unique_ptr<Instruction> e) { in AddExtInstImport()
323 inline void Module::SetMemoryModel(std::unique_ptr<Instruction> m) { in SetMemoryModel()
327 inline void Module::AddEntryPoint(std::unique_ptr<Instruction> e) { in AddEntryPoint()
331 inline void Module::AddExecutionMode(std::unique_ptr<Instruction> e) { in AddExecutionMode()
335 inline void Module::AddDebug1Inst(std::unique_ptr<Instruction> d) { in AddDebug1Inst()
339 inline void Module::AddDebug2Inst(std::unique_ptr<Instruction> d) { in AddDebug2Inst()
343 inline void Module::AddDebug3Inst(std::unique_ptr<Instruction> d) { in AddDebug3Inst()
347 inline void Module::AddExtInstDebugInfo(std::unique_ptr<Instruction> d) { in AddExtInstDebugInfo()
351 inline void Module::AddAnnotationInst(std::unique_ptr<Instruction> a) { in AddAnnotationInst()
355 inline void Module::AddType(std::unique_ptr<Instruction> t) { in AddType()
359 inline void Module::AddGlobalValue(std::unique_ptr<Instruction> v) { in AddGlobalValue()
363 inline void Module::AddFunction(std::unique_ptr<Function> f) { in AddFunction()
367 inline void Module::SetContainsDebugInfo() { contains_debug_info_ = true; } in SetContainsDebugInfo()
369 inline Module::inst_iterator Module::capability_begin() { in capability_begin()
372 inline Module::inst_iterator Module::capability_end() { in capability_end()
376 inline IteratorRange<Module::inst_iterator> Module::capabilities() { in capabilities()
380 inline IteratorRange<Module::const_inst_iterator> Module::capabilities() const { in capabilities()
384 inline Module::inst_iterator Module::ext_inst_import_begin() { in ext_inst_import_begin()
387 inline Module::inst_iterator Module::ext_inst_import_end() { in ext_inst_import_end()
391 inline IteratorRange<Module::inst_iterator> Module::ext_inst_imports() { in ext_inst_imports()
395 inline IteratorRange<Module::const_inst_iterator> Module::ext_inst_imports() in ext_inst_imports()
400 inline Module::inst_iterator Module::debug1_begin() { return debugs1_.begin(); } in debug1_begin()
401 inline Module::inst_iterator Module::debug1_end() { return debugs1_.end(); } in debug1_end()
403 inline IteratorRange<Module::inst_iterator> Module::debugs1() { in debugs1()
407 inline IteratorRange<Module::const_inst_iterator> Module::debugs1() const { in debugs1()
411 inline Module::inst_iterator Module::debug2_begin() { return debugs2_.begin(); } in debug2_begin()
412 inline Module::inst_iterator Module::debug2_end() { return debugs2_.end(); } in debug2_end()
414 inline IteratorRange<Module::inst_iterator> Module::debugs2() { in debugs2()
418 inline IteratorRange<Module::const_inst_iterator> Module::debugs2() const { in debugs2()
422 inline Module::inst_iterator Module::debug3_begin() { return debugs3_.begin(); } in debug3_begin()
423 inline Module::inst_iterator Module::debug3_end() { return debugs3_.end(); } in debug3_end()
425 inline IteratorRange<Module::inst_iterator> Module::debugs3() { in debugs3()
429 inline IteratorRange<Module::const_inst_iterator> Module::debugs3() const { in debugs3()
433 inline Module::inst_iterator Module::ext_inst_debuginfo_begin() { in ext_inst_debuginfo_begin()
436 inline Module::inst_iterator Module::ext_inst_debuginfo_end() { in ext_inst_debuginfo_end()
440 inline IteratorRange<Module::inst_iterator> Module::ext_inst_debuginfo() { in ext_inst_debuginfo()
444 inline IteratorRange<Module::const_inst_iterator> Module::ext_inst_debuginfo() in ext_inst_debuginfo()
449 inline IteratorRange<Module::inst_iterator> Module::entry_points() { in entry_points()
453 inline IteratorRange<Module::const_inst_iterator> Module::entry_points() const { in entry_points()
457 inline Module::inst_iterator Module::execution_mode_begin() { in execution_mode_begin()
460 inline Module::inst_iterator Module::execution_mode_end() { in execution_mode_end()
464 inline IteratorRange<Module::inst_iterator> Module::execution_modes() { in execution_modes()
468 inline IteratorRange<Module::const_inst_iterator> Module::execution_modes() in execution_modes()
473 inline Module::inst_iterator Module::annotation_begin() { in annotation_begin()
476 inline Module::inst_iterator Module::annotation_end() { in annotation_end()
480 inline IteratorRange<Module::inst_iterator> Module::annotations() { in annotations()
484 inline IteratorRange<Module::const_inst_iterator> Module::annotations() const { in annotations()
488 inline Module::inst_iterator Module::extension_begin() { in extension_begin()
491 inline Module::inst_iterator Module::extension_end() { in extension_end()
495 inline IteratorRange<Module::inst_iterator> Module::extensions() { in extensions()
499 inline IteratorRange<Module::const_inst_iterator> Module::extensions() const { in extensions()
503 inline Module::inst_iterator Module::types_values_begin() { in types_values_begin()
507 inline Module::inst_iterator Module::types_values_end() { in types_values_end()
511 inline IteratorRange<Module::inst_iterator> Module::types_values() { in types_values()
515 inline IteratorRange<Module::const_inst_iterator> Module::types_values() const { in types_values()
519 inline Module::const_iterator Module::cbegin() const { in cbegin()
523 inline Module::const_iterator Module::cend() const { in cend()