MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / InitializeInline

Method InitializeInline

source/opt/inline_pass.cpp:838–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836}
837
838void InlinePass::InitializeInline() {
839 false_id_ = 0;
840
841 // clear collections
842 id2function_.clear();
843 id2block_.clear();
844 inlinable_.clear();
845 no_return_in_loop_.clear();
846 early_return_funcs_.clear();
847 funcs_called_from_continue_ =
848 context()->GetStructuredCFGAnalysis()->FindFuncsCalledFromContinue();
849
850 for (auto& fn : *get_module()) {
851 // Initialize function and block maps.
852 id2function_[fn.result_id()] = &fn;
853 for (auto& blk : fn) {
854 id2block_[blk.id()] = &blk;
855 }
856 // Compute inlinability
857 if (IsInlinableFunction(&fn)) inlinable_.insert(fn.result_id());
858 }
859}
860
861InlinePass::InlinePass() {}
862

Callers

nothing calls this directly

Calls 6

clearMethod · 0.45
result_idMethod · 0.45
idMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected