这篇教程C++ timevar_pop函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中timevar_pop函数的典型用法代码示例。如果您正苦于以下问题:C++ timevar_pop函数的具体用法?C++ timevar_pop怎么用?C++ timevar_pop使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了timevar_pop函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: c_common_write_pchvoidc_common_write_pch (void){ timevar_push (TV_PCH_SAVE); targetm.prepare_pch_save (); (*debug_hooks->handle_pch) (1); cpp_write_pch_deps (parse_in, pch_outfile); gt_pch_save (pch_outfile); timevar_push (TV_PCH_CPP_SAVE); cpp_write_pch_state (parse_in, pch_outfile); timevar_pop (TV_PCH_CPP_SAVE); if (fseek (pch_outfile, 0, SEEK_SET) != 0 || fwrite (get_ident (), IDENT_LENGTH, 1, pch_outfile) != 1) fatal_error ("can%'t write %s: %m", pch_file); fclose (pch_outfile); timevar_pop (TV_PCH_SAVE);}
开发者ID:Dasoccerguy,项目名称:gcc,代码行数:25,
示例2: build_type_inheritance_graphvoidbuild_type_inheritance_graph (void){ struct cgraph_node *n; FILE *inheritance_dump_file; int flags; if (odr_hash.is_created ()) return; timevar_push (TV_IPA_INHERITANCE); inheritance_dump_file = dump_begin (TDI_inheritance, &flags); odr_hash.create (23); /* We reconstruct the graph starting of types of all methods seen in the the unit. */ FOR_EACH_FUNCTION (n) if (DECL_VIRTUAL_P (n->decl) && symtab_real_symbol_p (n)) get_odr_type (method_class_type (TREE_TYPE (n->decl)), true); if (inheritance_dump_file) { dump_type_inheritance_graph (inheritance_dump_file); dump_end (TDI_inheritance, inheritance_dump_file); } timevar_pop (TV_IPA_INHERITANCE);}
开发者ID:Nodplus,项目名称:gcc,代码行数:26,
示例3: varpool_analyze_pending_decls/* Walk the decls we marked as necessary and see if they reference new variables or functions and add them into the worklists. */boolvarpool_analyze_pending_decls (void){ bool changed = false; timevar_push (TV_CGRAPH); while (varpool_first_unanalyzed_node) { tree decl = varpool_first_unanalyzed_node->decl; bool analyzed = varpool_first_unanalyzed_node->analyzed; varpool_first_unanalyzed_node->analyzed = true; varpool_first_unanalyzed_node = varpool_first_unanalyzed_node->next_needed; /* When reading back varpool at LTO time, we re-construct the queue in order to have "needed" list right by inserting all needed nodes into varpool. We however don't want to re-analyze already analyzed nodes. */ if (!analyzed) { gcc_assert (!in_lto_p); /* Compute the alignment early so function body expanders are already informed about increased alignment. */ align_variable (decl, 0); } if (DECL_INITIAL (decl)) record_references_in_initializer (decl, analyzed); changed = true; } timevar_pop (TV_CGRAPH); return changed;}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.toolchain,代码行数:34,
示例4: lto_end_compressionvoidlto_end_compression (struct lto_compression_stream *stream){ unsigned char *cursor = (unsigned char *) stream->buffer; size_t remaining = stream->bytes; const size_t outbuf_length = Z_BUFFER_LENGTH; unsigned char *outbuf = (unsigned char *) xmalloc (outbuf_length); z_stream out_stream; size_t compressed_bytes = 0; int status; gcc_assert (stream->is_compression); timevar_push (TV_IPA_LTO_COMPRESS); out_stream.next_out = outbuf; out_stream.avail_out = outbuf_length; out_stream.next_in = cursor; out_stream.avail_in = remaining; out_stream.zalloc = lto_zalloc; out_stream.zfree = lto_zfree; out_stream.opaque = Z_NULL; status = deflateInit (&out_stream, lto_normalized_zlib_level ()); if (status != Z_OK) internal_error ("compressed stream: %s", zError (status)); do { size_t in_bytes, out_bytes; status = deflate (&out_stream, Z_FINISH); if (status != Z_OK && status != Z_STREAM_END) internal_error ("compressed stream: %s", zError (status)); in_bytes = remaining - out_stream.avail_in; out_bytes = outbuf_length - out_stream.avail_out; stream->callback ((const char *) outbuf, out_bytes, stream->opaque); lto_stats.num_compressed_il_bytes += out_bytes; compressed_bytes += out_bytes; cursor += in_bytes; remaining -= in_bytes; out_stream.next_out = outbuf; out_stream.avail_out = outbuf_length; out_stream.next_in = cursor; out_stream.avail_in = remaining; } while (status != Z_STREAM_END); status = deflateEnd (&out_stream); if (status != Z_OK) internal_error ("compressed stream: %s", zError (status)); lto_destroy_compression_stream (stream); free (outbuf); timevar_pop (TV_IPA_LTO_COMPRESS);}
开发者ID:chinabin,项目名称:gcc-tiny,代码行数:60,
示例5: llvm_asm_file_start// llvm_asm_file_start - Start the .s file.void llvm_asm_file_start(void) { timevar_push(TV_LLVM_INIT); AsmOutStream = new oFILEstream(asm_out_file); AsmOutFile = new OStream(*AsmOutStream); flag_llvm_pch_read = 0; createOptimizationPasses(); timevar_pop(TV_LLVM_INIT);}
开发者ID:BackupTheBerlios,项目名称:iphone-binutils-svn,代码行数:12,
示例6: loop_optimizer_initvoidloop_optimizer_init (unsigned flags){ timevar_push (TV_LOOP_INIT); if (!current_loops) { gcc_assert (!(cfun->curr_properties & PROP_loops)); /* Find the loops. */ current_loops = flow_loops_find (NULL); } else { bool recorded_exits = loops_state_satisfies_p (LOOPS_HAVE_RECORDED_EXITS); bool needs_fixup = loops_state_satisfies_p (LOOPS_NEED_FIXUP); gcc_assert (cfun->curr_properties & PROP_loops); /* Ensure that the dominators are computed, like flow_loops_find does. */ calculate_dominance_info (CDI_DOMINATORS);#ifdef ENABLE_CHECKING if (!needs_fixup) verify_loop_structure ();#endif /* Clear all flags. */ if (recorded_exits) release_recorded_exits (); loops_state_clear (~0U); if (needs_fixup) { /* Apply LOOPS_MAY_HAVE_MULTIPLE_LATCHES early as fix_loop_structure re-applies flags. */ loops_state_set (flags & LOOPS_MAY_HAVE_MULTIPLE_LATCHES); fix_loop_structure (NULL); } } /* Apply flags to loops. */ apply_loop_flags (flags); /* Dump loops. */ flow_loops_dump (dump_file, NULL, 1);#ifdef ENABLE_CHECKING verify_loop_structure ();#endif timevar_pop (TV_LOOP_INIT);}
开发者ID:AlexMioMio,项目名称:gcc,代码行数:53,
示例7: rest_of_type_compilationvoidrest_of_type_compilation (tree type, int toplev){ /* Avoid confusing the debug information machinery when there are errors. */ if (errorcount != 0 || sorrycount != 0) return; timevar_push (TV_SYMOUT); debug_hooks->type_decl (TYPE_STUB_DECL (type), !toplev); timevar_pop (TV_SYMOUT);}
开发者ID:coolshou,项目名称:screenplay-dx_Toolchain,代码行数:12,
示例8: llvm_emit_code_for_current_function// llvm_emit_code_for_current_function - Top level interface for emitting a// function to the .s file.void llvm_emit_code_for_current_function(tree fndecl) { if (cfun->nonlocal_goto_save_area) sorry("%Jnon-local gotos not supported by LLVM", fndecl); if (errorcount || sorrycount) { TREE_ASM_WRITTEN(fndecl) = 1; return; // Do not process broken code. } timevar_push(TV_LLVM_FUNCS); // Convert the AST to raw/ugly LLVM code. Function *Fn; { TreeToLLVM Emitter(fndecl); // Set up parameters and prepare for return, for the function. Emitter.StartFunctionBody(); // Emit the body of the function. Emitter.Emit(DECL_SAVED_TREE(fndecl), 0); // Wrap things up. Fn = Emitter.FinishFunctionBody(); }#if 0 if (dump_file) { fprintf (dump_file, "/n/n;;/n;; Full LLVM generated for this function:/n;;/n"); Fn->dump(); }#endif if (PerFunctionPasses) PerFunctionPasses->run(*Fn); // TODO: Nuke the .ll code for the function at -O[01] if we don't want to // inline it or something else. // There's no need to defer outputting this function any more; we // know we want to output it. DECL_DEFER_OUTPUT(fndecl) = 0; // Finally, we have written out this function! TREE_ASM_WRITTEN(fndecl) = 1; timevar_pop(TV_LLVM_FUNCS);}
开发者ID:BackupTheBerlios,项目名称:iphone-binutils-svn,代码行数:49,
示例9: verify_symtab_nodeDEBUG_FUNCTION voidverify_symtab_node (symtab_node node){ if (seen_error ()) return; timevar_push (TV_CGRAPH_VERIFY); if (symtab_function_p (node)) verify_cgraph_node (cgraph (node)); else if (verify_symtab_base (node)) { dump_symtab_node (stderr, node); internal_error ("verify_symtab_node failed"); } timevar_pop (TV_CGRAPH_VERIFY);}
开发者ID:zxombie,项目名称:aarch64-freebsd-gcc,代码行数:17,
示例10: timevar_pushDEBUG_FUNCTION voidsymtab_node::verify (void){ if (seen_error ()) return; timevar_push (TV_CGRAPH_VERIFY); if (cgraph_node *node = dyn_cast <cgraph_node *> (this)) node->verify_node (); else if (verify_base ()) { debug (); internal_error ("symtab_node::verify failed"); } timevar_pop (TV_CGRAPH_VERIFY);}
开发者ID:lv88h,项目名称:gcc,代码行数:17,
示例11: finish_optimization_passesvoidfinish_optimization_passes (void){ /* LLVM LOCAL begin Dead code strip cc1. */#ifdef ENABLE_LLVM return;#else enum tree_dump_index i; struct dump_file_info *dfi; char *name; timevar_push (TV_DUMP); if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities) { dump_file = dump_begin (pass_profile.static_pass_number, NULL); end_branch_prob (); if (dump_file) dump_end (pass_profile.static_pass_number, dump_file); } if (optimize > 0) { dump_file = dump_begin (pass_combine.static_pass_number, NULL); if (dump_file) { dump_combine_total_stats (dump_file); dump_end (pass_combine.static_pass_number, dump_file); } } /* Do whatever is necessary to finish printing the graphs. */ if (graph_dump_format != no_graph) for (i = TDI_end; (dfi = get_dump_file_info (i)) != NULL; ++i) if (dump_initialized_p (i) && (dfi->flags & TDF_GRAPH) != 0 && (name = get_dump_file_name (i)) != NULL) { finish_graph_dump_file (name); free (name); } timevar_pop (TV_DUMP);#endif /* LLVM LOCAL end Dead code strip cc1. */}
开发者ID:Persper,项目名称:PTMC,代码行数:45,
示例12: loop_optimizer_finalizevoidloop_optimizer_finalize (void){ struct loop *loop; basic_block bb; timevar_push (TV_LOOP_FINI); if (loops_state_satisfies_p (LOOPS_HAVE_RECORDED_EXITS)) release_recorded_exits (); free_numbers_of_iterations_estimates (); /* If we should preserve loop structure, do not free it but clear flags that advanced properties are there as we are not preserving that in full. */ if (cfun->curr_properties & PROP_loops) { loops_state_clear (LOOP_CLOSED_SSA | LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS | LOOPS_HAVE_PREHEADERS | LOOPS_HAVE_SIMPLE_LATCHES | LOOPS_HAVE_FALLTHRU_PREHEADERS); loops_state_set (LOOPS_MAY_HAVE_MULTIPLE_LATCHES); goto loop_fini_done; } gcc_assert (current_loops != NULL); FOR_EACH_LOOP (loop, 0) free_simple_loop_desc (loop); /* Clean up. */ flow_loops_free (current_loops); ggc_free (current_loops); current_loops = NULL; FOR_ALL_BB_FN (bb, cfun) { bb->loop_father = NULL; }loop_fini_done: timevar_pop (TV_LOOP_FINI);}
开发者ID:AlexMioMio,项目名称:gcc,代码行数:45,
示例13: rest_of_type_compilationvoidrest_of_type_compilation (tree type, int toplev){ /* Avoid confusing the debug information machinery when there are errors. */ if (errorcount != 0 || sorrycount != 0) return; /* LLVM LOCAL begin */#ifndef ENABLE_LLVM timevar_push (TV_SYMOUT); debug_hooks->type_decl (TYPE_STUB_DECL (type), !toplev); timevar_pop (TV_SYMOUT);#else llvm_emit_typedef (TYPE_STUB_DECL (type)); toplev = toplev; /* avoid unused var warning */#endif /* LLVM LOCAL end */}
开发者ID:Persper,项目名称:PTMC,代码行数:19,
示例14: llvm_pch_write_init// Initialize PCH writing. void llvm_pch_write_init(void) { timevar_push(TV_LLVM_INIT); AsmOutStream = new oFILEstream(asm_out_file); AsmOutFile = new OStream(*AsmOutStream); PerModulePasses = new PassManager(); PerModulePasses->add(new TargetData(*TheTarget->getTargetData())); // Emit an LLVM .bc file to the output. This is used when passed // -emit-llvm -c to the GCC driver. PerModulePasses->add(CreateBitcodeWriterPass(*AsmOutStream)); // Disable emission of .ident into the output file... which is completely // wrong for llvm/.bc emission cases. flag_no_ident = 1; flag_llvm_pch_read = 0; timevar_pop(TV_LLVM_INIT);}
开发者ID:BackupTheBerlios,项目名称:iphone-binutils-svn,代码行数:21,
示例15: varpool_output_variables/* Output all variables enqueued to be assembled. */boolvarpool_output_variables (void){ bool changed = false; varpool_node *node; if (seen_error ()) return false; varpool_remove_unreferenced_decls (); timevar_push (TV_VAROUT); FOR_EACH_DEFINED_VARIABLE (node) varpool_finalize_named_section_flags (node); FOR_EACH_DEFINED_VARIABLE (node) if (varpool_assemble_decl (node)) changed = true; timevar_pop (TV_VAROUT); return changed;}
开发者ID:palves,项目名称:gcc,代码行数:23,
示例16: update_stmt_operandsvoidupdate_stmt_operands (gimple stmt){ /* If update_stmt_operands is called before SSA is initialized, do nothing. */ if (!ssa_operands_active ()) return; timevar_push (TV_TREE_OPS); /* If the stmt is a noreturn call queue it to be processed by split_bbs_on_noreturn_calls during cfg cleanup. */ if (is_gimple_call (stmt) && gimple_call_noreturn_p (stmt)) VEC_safe_push (gimple, gc, MODIFIED_NORETURN_CALLS (cfun), stmt); gcc_assert (gimple_modified_p (stmt)); build_ssa_operands (stmt); gimple_set_modified (stmt, false); timevar_pop (TV_TREE_OPS);}
开发者ID:AsherBond,项目名称:MondocosmOS-Dependencies,代码行数:22,
示例17: rest_of_decl_compilationvoidrest_of_decl_compilation (tree decl, int top_level, int at_end){ /* We deferred calling assemble_alias so that we could collect other attributes such as visibility. Emit the alias now. */ { tree alias; alias = lookup_attribute ("alias", DECL_ATTRIBUTES (decl)); if (alias) { alias = TREE_VALUE (TREE_VALUE (alias)); alias = get_identifier (TREE_STRING_POINTER (alias)); assemble_alias (decl, alias); } } /* Emit tm_* attributes for declarations now */ { tree tm_attribute; tm_attribute = lookup_attribute ("tm_wrapper", DECL_ATTRIBUTES (decl)); if (tm_attribute == NULL) tm_attribute = lookup_attribute ("transaction_wrap", DECL_ATTRIBUTES (decl)); if (tm_attribute) { tm_attribute = TREE_VALUE (TREE_VALUE (tm_attribute)); tm_attribute = get_identifier (TREE_STRING_POINTER (tm_attribute)); assemble_tm_wrapper (decl, tm_attribute); } if (has_tm_pure_attribute(decl)) { assemble_tm_pure (decl); } if (has_tm_callable_attribute(decl)) { assemble_tm_callable (decl); } } /* Can't defer this, because it needs to happen before any later function definitions are processed. */ if (DECL_ASSEMBLER_NAME_SET_P (decl) && DECL_REGISTER (decl)) /* LLVM LOCAL begin */#ifndef ENABLE_LLVM make_decl_rtl (decl);#else make_decl_llvm (decl);#endif /* LLVM LOCAL end */ /* Forward declarations for nested functions are not "external", but we need to treat them as if they were. */ if (TREE_STATIC (decl) || DECL_EXTERNAL (decl) || TREE_CODE (decl) == FUNCTION_DECL) { timevar_push (TV_VARCONST); /* Don't output anything when a tentative file-scope definition is seen. But at end of compilation, do output code for them. We do output all variables when unit-at-a-time is active and rely on callgraph code to defer them except for forward declarations (see gcc.c-torture/compile/920624-1.c) */ if ((at_end || !DECL_DEFER_OUTPUT (decl) || DECL_INITIAL (decl)) && !DECL_EXTERNAL (decl)) { if (TREE_CODE (decl) != FUNCTION_DECL) cgraph_varpool_finalize_decl (decl); else assemble_variable (decl, top_level, at_end, 0); }#ifdef ASM_FINISH_DECLARE_OBJECT if (decl == last_assemble_variable_decl) { ASM_FINISH_DECLARE_OBJECT (asm_out_file, decl, top_level, at_end); }#endif timevar_pop (TV_VARCONST); } else if (TREE_CODE (decl) == TYPE_DECL /* Like in rest_of_type_compilation, avoid confusing the debug information machinery when there are errors. */ && !(sorrycount || errorcount)) { /* LLVM LOCAL begin */#ifndef ENABLE_LLVM timevar_push (TV_SYMOUT); debug_hooks->type_decl (decl, !top_level); timevar_pop (TV_SYMOUT);#else llvm_emit_typedef (decl);#endif /* LLVM LOCAL end */ }//.........这里部分代码省略.........
开发者ID:Persper,项目名称:PTMC,代码行数:101,
示例18: c_lex_with_flags//.........这里部分代码省略......... retry_at: tok = cpp_get_token (parse_in); type = tok->type; switch (type) { case CPP_PADDING: goto retry_at; case CPP_STRING: case CPP_WSTRING: type = lex_string (tok, value, true); break; case CPP_NAME: *value = HT_IDENT_TO_GCC_IDENT (HT_NODE (tok->val.node)); if (objc_is_reserved_word (*value)) { type = CPP_AT_NAME; break; } /* FALLTHROUGH */ default: /* ... or not. */ error ("%Hstray %<@%> in program", &atloc); goto retry_after_at; } break; } /* FALLTHROUGH */ case CPP_HASH: case CPP_PASTE: { unsigned char name[4]; *cpp_spell_token (parse_in, tok, name, true) = 0; error ("stray %qs in program", name); } goto retry; case CPP_OTHER: { cppchar_t c = tok->val.str.text[0]; if (c == '"' || c == '/'') error ("missing terminating %c character", (int) c); else if (ISGRAPH (c)) error ("stray %qc in program", (int) c); else error ("stray %<//%o%> in program", (int) c); } goto retry; case CPP_CHAR: case CPP_WCHAR: *value = lex_charconst (tok); break; case CPP_STRING: case CPP_WSTRING: if (!c_lex_return_raw_strings) { type = lex_string (tok, value, false); break; } /* FALLTHROUGH */ case CPP_PRAGMA: *value = build_string (tok->val.str.len, (char *) tok->val.str.text); break; /* These tokens should not be visible outside cpplib. */ case CPP_HEADER_NAME: case CPP_COMMENT: case CPP_MACRO_ARG: gcc_unreachable (); default: *value = NULL_TREE; break; } if (cpp_flags) *cpp_flags = tok->flags; if (!no_more_pch) { no_more_pch = true; c_common_no_more_pch (); } timevar_pop (TV_CPP); return type;}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:101,
示例19: mainintmain (int argc, char *argv[]){ set_program_name (argv[0]); setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); bindtextdomain ("bison-runtime", LOCALEDIR); textdomain (PACKAGE); { char const *cp = getenv ("LC_CTYPE"); if (cp && STREQ (cp, "C")) set_custom_quoting ("e_quoting_options, "'", "'"); else set_quoting_style ("e_quoting_options, locale_quoting_style); } atexit (close_stdout); uniqstrs_new (); muscle_init (); complain_init (); getargs (argc, argv); timevar_report = trace_flag & trace_time; init_timevar (); timevar_start (TV_TOTAL); if (trace_flag & trace_bitsets) bitset_stats_enable (); /* Read the input. Copy some parts of it to FGUARD, FACTION, FTABLE and FATTRS. In file reader.c. The other parts are recorded in the grammar; see gram.h. */ timevar_push (TV_READER); reader (); timevar_pop (TV_READER); if (complaint_status == status_complaint) goto finish; /* Find useless nonterminals and productions and reduce the grammar. */ timevar_push (TV_REDUCE); reduce_grammar (); timevar_pop (TV_REDUCE); /* Record other info about the grammar. In files derives and nullable. */ timevar_push (TV_SETS); derives_compute (); nullable_compute (); timevar_pop (TV_SETS); /* Compute LR(0) parser states. See state.h for more info. */ timevar_push (TV_LR0); generate_states (); timevar_pop (TV_LR0); /* Add lookahead sets to parser states. Except when LALR(1) is requested, split states to eliminate LR(1)-relative inadequacies. */ ielr (); /* Find and record any conflicts: places where one token of lookahead is not enough to disambiguate the parsing. In file conflicts. Also resolve s/r conflicts based on precedence declarations. */ timevar_push (TV_CONFLICTS); conflicts_solve (); if (!muscle_percent_define_flag_if ("lr.keep-unreachable-state")) { state_number *old_to_new = xnmalloc (nstates, sizeof *old_to_new); state_number nstates_old = nstates; state_remove_unreachable_states (old_to_new); lalr_update_state_numbers (old_to_new, nstates_old); conflicts_update_state_numbers (old_to_new, nstates_old); free (old_to_new); } conflicts_print (); timevar_pop (TV_CONFLICTS); /* Compute the parser tables. */ timevar_push (TV_ACTIONS); tables_generate (); timevar_pop (TV_ACTIONS); grammar_rules_useless_report (_("rule useless in parser due to conflicts")); print_precedence_warnings (); /* Output file names. */ compute_output_file_names (); /* Output the detailed report on the grammar. */ if (report_flag) { timevar_push (TV_REPORT); print_results ();//.........这里部分代码省略.........
开发者ID:Yui-Qi-Tang,项目名称:openwrtPKG,代码行数:101,
示例20: c_lex_with_flags//.........这里部分代码省略......... lexing, we have to pass this back to the parser to error out with or eat as a comment as appropriate. */ if (defer && flag_iasm_blocks_local) { *value = build_int_cst_wide (char_type_node, c, 0); break; } /* APPLE LOCAL end CW asm blocks C++ comments 4248139 */ if (c == '"' || c == '/'') error ("missing terminating %c character", (int) c); else if (ISGRAPH (c)) error ("stray %qc in program", (int) c); else error ("stray %<//%o%> in program", (int) c); } goto retry; case CPP_CHAR: case CPP_WCHAR: *value = lex_charconst (tok); break; case CPP_STRING: case CPP_WSTRING: if (!c_lex_return_raw_strings) { type = lex_string (tok, value, false); break; } *value = build_string (tok->val.str.len, (char *) tok->val.str.text); break; case CPP_PRAGMA: *value = build_int_cst (NULL, tok->val.pragma); break; /* APPLE LOCAL begin CW asm blocks */ case CPP_MULT: if (inside_iasm_block) { /* Check and replace use of '*' with '.' if '*' is followed by '-' or '+'. This is to allow "b *+8" which is disallwed by darwin's assembler but nevertheless is needed to be compatible with CW tools. */ lasttok = tok; ++parse_in->keep_tokens; do tok = cpp_get_token (parse_in); while (tok->type == CPP_PADDING); _cpp_backup_tokens (parse_in, 1); --parse_in->keep_tokens; if (tok->type == CPP_PLUS || tok->type == CPP_MINUS) type = CPP_DOT; tok = lasttok; } *value = NULL_TREE; break; /* APPLE LOCAL end CW asm blocks */ /* APPLE LOCAL begin 4137741 */ /* For CPP_BINCL and CPP_EINCL tokens, we shall need to propagate line number information; the location field shall already include the desired file name. */ case CPP_BINCL: case CPP_EINCL: *value = build_int_cst (integer_type_node, (HOST_WIDE_INT) tok->src_loc); break; /* APPLE LOCAL end 4137741 */ /* These tokens should not be visible outside cpplib. */ case CPP_HEADER_NAME: case CPP_COMMENT: case CPP_MACRO_ARG: gcc_unreachable (); default: *value = NULL_TREE; break; } if (cpp_flags) *cpp_flags = tok->flags | add_flags; /* APPLE LOCAL begin CW asm blocks */ if (flag_iasm_blocks_local) --c_lex_depth; /* APPLE LOCAL end CW asm blocks */ /* APPLE LOCAL begin 4137741 */ if (!no_more_pch && type != CPP_BINCL && type != CPP_EINCL) /* APPLE LOCAL end 4137741 */ { no_more_pch = true; c_common_no_more_pch (); } timevar_pop (TV_CPP); return type;}
开发者ID:aosm,项目名称:llvmgcc42,代码行数:101,
示例21: output_skeletonstatic voidoutput_skeleton (void){ FILE *in; FILE *out; int filter_fd[2]; char const *argv[6]; pid_t pid; /* Compute the names of the package data dir and skeleton file. Test whether m4sugar.m4 is readable, to check for proper installation. A faulty installation can cause deadlock, so a cheap sanity check is worthwhile. */ char const m4sugar[] = "m4sugar/m4sugar.m4"; char *full_m4sugar; char *full_skeleton; char const *p; char const *m4 = (p = getenv ("M4")) ? p : M4; char const *pkgdatadir = (p = getenv ("BISON_PKGDATADIR")) ? p : PKGDATADIR; size_t skeleton_size = strlen (skeleton) + 1; size_t pkgdatadirlen = strlen (pkgdatadir); while (pkgdatadirlen && pkgdatadir[pkgdatadirlen - 1] == '/') pkgdatadirlen--; full_skeleton = xmalloc (pkgdatadirlen + 1 + (skeleton_size < sizeof m4sugar ? sizeof m4sugar : skeleton_size)); strcpy (full_skeleton, pkgdatadir); full_skeleton[pkgdatadirlen] = '/'; strcpy (full_skeleton + pkgdatadirlen + 1, m4sugar); full_m4sugar = xstrdup (full_skeleton); strcpy (full_skeleton + pkgdatadirlen + 1, skeleton); xfclose (xfopen (full_m4sugar, "r")); /* Create an m4 subprocess connected to us via two pipes. */ if (trace_flag & trace_tools) fprintf (stderr, "running: %s %s - %s/n", m4, full_m4sugar, full_skeleton); argv[0] = m4; argv[1] = full_m4sugar; argv[2] = "-"; argv[3] = full_skeleton; argv[4] = trace_flag & trace_m4 ? "-dV" : NULL; argv[5] = NULL; init_subpipe (); pid = create_subpipe (argv, filter_fd); free (full_m4sugar); free (full_skeleton); out = fdopen (filter_fd[0], "w"); if (! out) error (EXIT_FAILURE, get_errno (), "fdopen"); /* Output the definitions of all the muscles. */ fputs ("m4_init()/n", out); user_actions_output (out); merger_output (out); token_definitions_output (out); symbol_destructors_output (out); symbol_printers_output (out); muscles_m4_output (out); fputs ("m4_wrap([m4_divert_pop(0)])/n", out); fputs ("m4_divert_push(0)dnl/n", out); xfclose (out); /* Read and process m4's output. */ timevar_push (TV_M4); end_of_output_subpipe (pid, filter_fd); in = fdopen (filter_fd[1], "r"); if (! in) error (EXIT_FAILURE, get_errno (), "fdopen"); scan_skel (in); xfclose (in); reap_subpipe (pid, m4); timevar_pop (TV_M4);}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:83,
示例22: varpool_analyze_pending_decls/* Walk the decls we marked as necessary and see if they reference new variables or functions and add them into the worklists. */boolvarpool_analyze_pending_decls (void){ bool changed = false; timevar_push (TV_VARPOOL); while (varpool_first_unanalyzed_node) { struct varpool_node *node = varpool_first_unanalyzed_node, *next; tree decl = node->decl; bool analyzed = node->analyzed; varpool_first_unanalyzed_node->analyzed = true; varpool_first_unanalyzed_node = varpool_first_unanalyzed_node->next_needed; /* When reading back varpool at LTO time, we re-construct the queue in order to have "needed" list right by inserting all needed nodes into varpool. We however don't want to re-analyze already analyzed nodes. */ if (!analyzed) { gcc_assert (!in_lto_p || cgraph_function_flags_ready); /* Compute the alignment early so function body expanders are already informed about increased alignment. */ align_variable (decl, 0); } if (node->alias && node->alias_of) { struct varpool_node *tgt = varpool_node (node->alias_of); struct varpool_node *n; for (n = tgt; n && n->alias; n = n->analyzed ? varpool_alias_aliased_node (n) : NULL) if (n == node) { error ("variable %q+D part of alias cycle", node->decl); node->alias = false; continue; } if (!VEC_length (ipa_ref_t, node->ref_list.references)) ipa_record_reference (NULL, node, NULL, tgt, IPA_REF_ALIAS, NULL); /* C++ FE sometimes change linkage flags after producing same body aliases. */ if (node->extra_name_alias) { DECL_WEAK (node->decl) = DECL_WEAK (node->alias_of); TREE_PUBLIC (node->decl) = TREE_PUBLIC (node->alias_of); DECL_EXTERNAL (node->decl) = DECL_EXTERNAL (node->alias_of); DECL_VISIBILITY (node->decl) = DECL_VISIBILITY (node->alias_of); if (TREE_PUBLIC (node->decl)) { DECL_COMDAT (node->decl) = DECL_COMDAT (node->alias_of); DECL_COMDAT_GROUP (node->decl) = DECL_COMDAT_GROUP (node->alias_of); if (DECL_ONE_ONLY (node->alias_of) && !node->same_comdat_group) { node->same_comdat_group = tgt; if (!tgt->same_comdat_group) tgt->same_comdat_group = node; else { struct varpool_node *n; for (n = tgt->same_comdat_group; n->same_comdat_group != tgt; n = n->same_comdat_group) ; n->same_comdat_group = node; } } } } } else if (DECL_INITIAL (decl)) record_references_in_initializer (decl, analyzed); if (node->same_comdat_group) { for (next = node->same_comdat_group; next != node; next = next->same_comdat_group) varpool_mark_needed_node (next); } changed = true; } timevar_pop (TV_VARPOOL); return changed;}
开发者ID:Gwenio,项目名称:DragonFlyBSD,代码行数:86,
示例23: tree_rest_of_compilationvoidtree_rest_of_compilation (tree fndecl){ location_t saved_loc; timevar_push (TV_EXPAND); gcc_assert (cgraph_global_info_ready); /* Initialize the default bitmap obstack. */ bitmap_obstack_initialize (NULL); /* Initialize the RTL code for the function. */ current_function_decl = fndecl; saved_loc = input_location; input_location = DECL_SOURCE_LOCATION (fndecl); init_function_start (fndecl); /* Even though we're inside a function body, we still don't want to call expand_expr to calculate the size of a variable-sized array. We haven't necessarily assigned RTL to all variables yet, so it's not safe to try to expand expressions involving them. */ cfun->dont_save_pending_sizes_p = 1; gimple_register_cfg_hooks (); bitmap_obstack_initialize (®_obstack); /* FIXME, only at RTL generation*/ execute_all_ipa_transforms (); /* Perform all tree transforms and optimizations. */ /* Signal the start of passes. */ invoke_plugin_callbacks (PLUGIN_ALL_PASSES_START, NULL); execute_pass_list (all_passes); /* Signal the end of passes. */ invoke_plugin_callbacks (PLUGIN_ALL_PASSES_END, NULL); bitmap_obstack_release (®_obstack); /* Release the default bitmap obstack. */ bitmap_obstack_release (NULL); set_cfun (NULL); /* If requested, warn about function definitions where the function will return a value (usually of some struct or union type) which itself will take up a lot of stack space. */ if (warn_larger_than && !DECL_EXTERNAL (fndecl) && TREE_TYPE (fndecl)) { tree ret_type = TREE_TYPE (TREE_TYPE (fndecl)); if (ret_type && TYPE_SIZE_UNIT (ret_type) && TREE_CODE (TYPE_SIZE_UNIT (ret_type)) == INTEGER_CST && 0 < compare_tree_int (TYPE_SIZE_UNIT (ret_type), larger_than_size)) { unsigned int size_as_int = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (ret_type)); if (compare_tree_int (TYPE_SIZE_UNIT (ret_type), size_as_int) == 0) warning (OPT_Wlarger_than_eq, "size of return value of %q+D is %u bytes", fndecl, size_as_int); else warning (OPT_Wlarger_than_eq, "size of return value of %q+D is larger than %wd bytes", fndecl, larger_than_size); } } gimple_set_body (fndecl, NULL); if (DECL_STRUCT_FUNCTION (fndecl) == 0 && !cgraph_node (fndecl)->origin) { /* Stop pointing to the local nodes about to be freed. But DECL_INITIAL must remain nonzero so we know this was an actual function definition. For a nested function, this is done in c_pop_function_context. If rest_of_compilation set this to 0, leave it 0. */ if (DECL_INITIAL (fndecl) != 0) DECL_INITIAL (fndecl) = error_mark_node; } input_location = saved_loc; ggc_collect (); timevar_pop (TV_EXPAND);}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.toolchain,代码行数:89,
注:本文中的timevar_pop函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ timevar_push函数代码示例 C++ timeval_to_ns函数代码示例 |