Mercurial > hg > CbC > CbC_gcc
comparison gcc/lto-section-in.c @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
56:3c8a44c06a95 | 63:b7f97abdc517 |
---|---|
27 #include "tree.h" | 27 #include "tree.h" |
28 #include "expr.h" | 28 #include "expr.h" |
29 #include "flags.h" | 29 #include "flags.h" |
30 #include "params.h" | 30 #include "params.h" |
31 #include "input.h" | 31 #include "input.h" |
32 #include "varray.h" | |
33 #include "hashtab.h" | 32 #include "hashtab.h" |
34 #include "basic-block.h" | 33 #include "basic-block.h" |
35 #include "tree-flow.h" | 34 #include "tree-flow.h" |
36 #include "cgraph.h" | 35 #include "cgraph.h" |
37 #include "function.h" | 36 #include "function.h" |
41 #include "vec.h" | 40 #include "vec.h" |
42 #include "timevar.h" | 41 #include "timevar.h" |
43 #include "output.h" | 42 #include "output.h" |
44 #include "lto-streamer.h" | 43 #include "lto-streamer.h" |
45 #include "lto-compress.h" | 44 #include "lto-compress.h" |
45 #include "ggc.h" | |
46 | 46 |
47 /* Section names. These must correspond to the values of | 47 /* Section names. These must correspond to the values of |
48 enum lto_section_type. */ | 48 enum lto_section_type. */ |
49 const char *lto_section_name[LTO_N_SECTION_TYPES] = | 49 const char *lto_section_name[LTO_N_SECTION_TYPES] = |
50 { | 50 { |
51 "decls", | 51 "decls", |
52 "function_body", | 52 "function_body", |
53 "static_initializer", | 53 "static_initializer", |
54 "cgraph", | 54 "cgraph", |
55 "varpool", | |
56 "refs", | |
57 "jump_funcs" | |
55 "ipa_pure_const", | 58 "ipa_pure_const", |
56 "ipa_reference", | 59 "ipa_reference", |
57 "symtab", | 60 "symtab", |
58 "wpa_fixup", | 61 "opts", |
59 "opts" | 62 "cgraphopt" |
60 }; | 63 }; |
61 | 64 |
62 unsigned char | 65 unsigned char |
63 lto_input_1_unsigned (struct lto_input_block *ib) | 66 lto_input_1_unsigned (struct lto_input_block *ib) |
64 { | 67 { |
430 struct lto_in_decl_state * | 433 struct lto_in_decl_state * |
431 lto_new_in_decl_state (void) | 434 lto_new_in_decl_state (void) |
432 { | 435 { |
433 struct lto_in_decl_state *state; | 436 struct lto_in_decl_state *state; |
434 | 437 |
435 state = ((struct lto_in_decl_state *) xmalloc (sizeof (*state))); | 438 state = ((struct lto_in_decl_state *) ggc_alloc (sizeof (*state))); |
436 memset (state, 0, sizeof (*state)); | 439 memset (state, 0, sizeof (*state)); |
437 return state; | 440 return state; |
438 } | 441 } |
439 | 442 |
440 /* Delete STATE and its components. */ | 443 /* Delete STATE and its components. */ |
444 { | 447 { |
445 int i; | 448 int i; |
446 | 449 |
447 for (i = 0; i < LTO_N_DECL_STREAMS; i++) | 450 for (i = 0; i < LTO_N_DECL_STREAMS; i++) |
448 if (state->streams[i].trees) | 451 if (state->streams[i].trees) |
449 free (state->streams[i].trees); | 452 ggc_free (state->streams[i].trees); |
450 free (state); | 453 ggc_free (state); |
451 } | 454 } |
452 | 455 |
453 /* Hashtable helpers. lto_in_decl_states are hash by their function decls. */ | 456 /* Hashtable helpers. lto_in_decl_states are hash by their function decls. */ |
454 | 457 |
455 hashval_t | 458 hashval_t |