您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ timevar_push函数代码示例

51自学网 2021-06-03 08:52:10
  C++
这篇教程C++ timevar_push函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中timevar_push函数的典型用法代码示例。如果您正苦于以下问题:C++ timevar_push函数的具体用法?C++ timevar_push怎么用?C++ timevar_push使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了timevar_push函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: c_common_write_pch

voidc_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: lto_end_compression

voidlto_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,


示例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: build_type_inheritance_graph

voidbuild_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,


示例5: c_lex_one_token

static voidc_lex_one_token (c_token *token){#if 0  timevar_push (TV_LEX);  token->type = c_lex_with_flags (&token->value, &token->location, NULL);#else  token->type = clilex();  token->value = yylval.type_node_p;#endif}
开发者ID:Rick33,项目名称:freevms,代码行数:11,


示例6: 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,


示例7: loop_optimizer_init

voidloop_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,


示例8: rest_of_type_compilation

voidrest_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,


示例9: 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,


示例10: verify_symtab_node

DEBUG_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,


示例11: timevar_push

DEBUG_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,


示例12: loop_optimizer_finalize

voidloop_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: finish_optimization_passes

voidfinish_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,


示例14: rest_of_type_compilation

voidrest_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,


示例15: 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,


示例16: update_stmt_operands

voidupdate_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: 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,


示例18: rest_of_decl_compilation

voidrest_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,


示例19: c_lex_with_flags

enum cpp_ttypec_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags){  static bool no_more_pch;  const cpp_token *tok;  enum cpp_ttype type;  timevar_push (TV_CPP); retry:  tok = cpp_get_token (parse_in);  type = tok->type;   retry_after_at:#ifdef USE_MAPPED_LOCATION  *loc = tok->src_loc;#else  *loc = input_location;#endif  switch (type)    {    case CPP_PADDING:      goto retry;          case CPP_NAME:      *value = HT_IDENT_TO_GCC_IDENT (HT_NODE (tok->val.node));      break;    case CPP_NUMBER:      {	unsigned int flags = cpp_classify_number (parse_in, tok);	switch (flags & CPP_N_CATEGORY)	  {	  case CPP_N_INVALID:	    /* cpplib has issued an error.  */	    *value = error_mark_node;	    errorcount++;	    break;	  case CPP_N_INTEGER:	    *value = interpret_integer (tok, flags);	    break;	  case CPP_N_FLOATING:	    *value = interpret_float (tok, flags);	    break;	  default:	    gcc_unreachable ();	  }      }      break;    case CPP_ATSIGN:      /* An @ may give the next token special significance in Objective-C.  */      if (c_dialect_objc ())	{	  location_t atloc = input_location;	  	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);      }      //.........这里部分代码省略.........
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:101,


示例20: main

intmain (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 (&quote_quoting_options, "'", "'");    else      set_quoting_style (&quote_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,


示例21: c_lex_with_flags

enum cpp_ttype/* APPLE LOCAL CW asm blocks C++ comments 6338079 */c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags, int defer){  static bool no_more_pch;  const cpp_token *tok;  enum cpp_ttype type;  unsigned char add_flags = 0;  /* APPLE LOCAL CW asm blocks C++ */  const cpp_token *lasttok;  /* APPLE LOCAL begin CW asm blocks */  /* Make a local copy of the flag for efficiency, since the compiler can't     figure that it won't change during a compilation.  */  int flag_iasm_blocks_local = flag_iasm_blocks;  if (flag_iasm_blocks_local)    ++c_lex_depth;  /* APPLE LOCAL end CW asm blocks */  timevar_push (TV_CPP); retry:  /* APPLE LOCAL begin CW asm blocks */  /* If there's a token we saved while returning the special BOL     token, return it now.  */  if (iasm_saved_token)    {      tok = iasm_saved_token;      type = tok->type;      iasm_saved_token = NULL;      goto bypass;    }  /* APPLE LOCAL end CW asm blocks */  tok = cpp_get_token (parse_in);  type = tok->type;  /* APPLE LOCAL begin CW asm blocks */  /* This test should be as efficient as possible, because it affects       all lexing with or without CW asm enabled.  */  if (flag_iasm_blocks_local && iasm_state != iasm_none && c_lex_depth == 1      && type != CPP_PADDING)    {      /* "}" switches us out of our special mode.  */      if (tok->type == CPP_CLOSE_BRACE && iasm_state >= iasm_decls)	iasm_state = iasm_none;      /* This is tricky.  We're only ready to start parsing assembly	 instructions if we're in the asm block, we're not in the	 middle of parsing a C decl, and the next token is plausibly	 the beginning of an asm line.  This works because if we have	 a "typedef int nop", a nop at the beginning of a line should	 be taken as an instruction rather than a declaration of type	 nop.  (Doesn't have to go this way, but it's how CW works.)	 We're not quite as good as CW yet, because CW knows about the	 complete list of valid opcodes, and will try to take anything	 as a decl that is not in the opcode list.  */      if (iasm_state == iasm_decls	  && !iasm_in_decl)	{	  if (tok->type == CPP_ATSIGN	      || tok->type == CPP_DOT	      || (tok->type == CPP_SEMICOLON)	      || (tok->type == CPP_NAME		  && (*value = HT_IDENT_TO_GCC_IDENT (HT_NODE (tok->val.node)))		  && !iasm_typename_or_reserved (*value)))	    {	      iasm_state = iasm_asm;	      inside_iasm_block = true;	    }	  else	    {	      iasm_in_decl = true;	    }	}    } bypass:  /* APPLE LOCAL end CW asm blocks */ retry_after_at:#ifdef USE_MAPPED_LOCATION  *loc = tok->src_loc;#else  *loc = input_location;#endif  switch (type)    {    case CPP_PADDING:      goto retry;    case CPP_NAME:      *value = HT_IDENT_TO_GCC_IDENT (HT_NODE (tok->val.node));      /* APPLE LOCAL begin CW asm blocks */      if (iasm_state >= iasm_decls	  && flag_ms_asms	  && strcasecmp (IDENTIFIER_POINTER (HT_IDENT_TO_GCC_IDENT (HT_NODE (tok->val.node))),			 "offset") == 0)	{	  type = CPP_AND;	  *value = NULL_TREE;	  break;	}      /* APPLE LOCAL end CW asm blocks *///.........这里部分代码省略.........
开发者ID:aosm,项目名称:llvmgcc42,代码行数:101,


示例22: output_skeleton

static 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,


示例23: 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,



注:本文中的timevar_push函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ tint_color函数代码示例
C++ timevar_pop函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。