static void maybeParseOptions(lto_code_gen_t cg) { if (!parsedOptions) { unwrap(cg)->parseCodeGenDebugOptions(); lto_add_attrs(cg); parsedOptions = true; } }
bool lto_codegen_write_merged_modules(lto_code_gen_t cg, const char *path) { if (!parsedOptions) { unwrap(cg)->parseCodeGenDebugOptions(); lto_add_attrs(cg); parsedOptions = true; } return !unwrap(cg)->writeMergedModules(path, sLastErrorString); }
const void *lto_codegen_compile_optimized(lto_code_gen_t cg, size_t *length) { if (!parsedOptions) { unwrap(cg)->parseCodeGenDebugOptions(); lto_add_attrs(cg); parsedOptions = true; } return unwrap(cg)->compileOptimized(length, sLastErrorString); }
/// lto_codegen_compile_to_file - Generates code for all added modules into one /// native object file. The name of the file is written to name. Returns true on /// error. bool lto_codegen_compile_to_file(lto_code_gen_t cg, const char **name) { if (!parsedOptions) { cg->parseCodeGenDebugOptions(); lto_add_attrs(cg); parsedOptions = true; } return !cg->compile_to_file(name, DisableOpt, DisableInline, DisableGVNLoadPRE, sLastErrorString); }
/// lto_codegen_compile - Generates code for all added modules into one native /// object file. On success returns a pointer to a generated mach-o/ELF buffer /// and length set to the buffer size. The buffer is owned by the lto_code_gen_t /// object and will be freed when lto_codegen_dispose() is called, or /// lto_codegen_compile() is called again. On failure, returns NULL (check /// lto_get_error_message() for details). const void *lto_codegen_compile(lto_code_gen_t cg, size_t *length) { if (!parsedOptions) { cg->parseCodeGenDebugOptions(); lto_add_attrs(cg); parsedOptions = true; } return cg->compile(length, DisableOpt, DisableInline, DisableGVNLoadPRE, sLastErrorString); }
bool lto_codegen_optimize(lto_code_gen_t cg) { if (!parsedOptions) { unwrap(cg)->parseCodeGenDebugOptions(); lto_add_attrs(cg); parsedOptions = true; } return !unwrap(cg)->optimize(DisableOpt, DisableInline, DisableGVNLoadPRE, DisableLTOVectorization, sLastErrorString); }