예제 #1
0
void CodeGen_SPIR_Dev::init_module() {

    CodeGen::init_module();

    module = get_initial_module_for_spir_device(context, bits);

    // Fix the target triple
    debug(1) << "Target triple of initial module: " << module->getTargetTriple() << "\n";

    module->setModuleIdentifier("<halide_spir>");

    for(Module::iterator i = module->begin(); i != module->end(); ++i)
        i->setCallingConv(CallingConv::SPIR_FUNC);

    owns_module = true;
}