Don't waste time jit-compiling isolated functions.

This is already done ahead of time when building the executable.
This commit is contained in:
pyos 2018-05-03 16:34:42 +03:00
parent 23bbf632e5
commit a286dea2e1

View File

@ -488,6 +488,9 @@ void compileFunctions(ExpressionActions::Actions & actions, const Names & output
fused[i].push_back(actions[i]);
if (dependents[i].find({}) != dependents[i].end())
{
/// the result of compiling one function in isolation is pretty much the same as its `execute` method.
if (fused[i].size() == 1)
continue;
auto fn = std::make_shared<LLVMFunction>(std::move(fused[i]), context, sample_block);
actions[i].function = fn;
actions[i].argument_names = fn->getArgumentNames();