MCPcopy Create free account
hub / github.com/chigraph/chigraph / codegenHelper

Function codegenHelper

libchigraph/src/FunctionCompiler.cpp:305–321  ·  view source on GitHub ↗

\internal Codegens a single input to a node All of these nodes are garunteed to be impure

Source from the content-addressed store, hash-verified

303/// Codegens a single input to a node
304/// All of these nodes are garunteed to be impure
305void codegenHelper(NodeInstance* node, unsigned execInputID, llvm::BasicBlock* block,
306 codegenMetadata& data, Result& res) {
307 boost::dynamic_bitset<> needsCodegen;
308 std::vector<llvm::BasicBlock*> outputBlocks;
309 std::tie(needsCodegen, outputBlocks) =
310 codegenNode(node, nullptr, nullptr, execInputID, block, data, res);
311
312 if (!res) { return; }
313
314 // recurse!
315 for (auto idx = 0ull; idx < node->outputExecConnections.size(); ++idx) {
316 auto& output = node->outputExecConnections[idx];
317 if (output.first != nullptr && needsCodegen[idx]) {
318 codegenHelper(output.first, output.second, outputBlocks[idx], data, res);
319 }
320 }
321}
322
323} // anonymous namespace
324

Callers 1

compileFunctionFunction · 0.85

Calls 1

codegenNodeFunction · 0.85

Tested by

no test coverage detected