| 281 | } |
| 282 | |
| 283 | llvm::FunctionType* GraphFunction::functionType() const { |
| 284 | std::vector<llvm::Type*> arguments; |
| 285 | arguments.reserve(1 + dataInputs().size() + dataOutputs().size()); |
| 286 | |
| 287 | // this is for which exec input |
| 288 | arguments.push_back(llvm::IntegerType::getInt32Ty(context().llvmContext())); |
| 289 | |
| 290 | for (const auto& p : dataInputs()) { arguments.push_back(p.type.llvmType()); } |
| 291 | |
| 292 | // make these pointers |
| 293 | for (const auto& p : dataOutputs()) { |
| 294 | arguments.push_back(llvm::PointerType::get(p.type.llvmType(), 0)); |
| 295 | } |
| 296 | |
| 297 | return llvm::FunctionType::get(llvm::IntegerType::getInt32Ty(context().llvmContext()), |
| 298 | arguments, false); |
| 299 | } |
| 300 | |
| 301 | void GraphFunction::addExecInput(std::string name, size_t addBefore) { |
| 302 | // invalidate the cache |
no test coverage detected