comparison gcc/ggc-common.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
30 #include "params.h" 30 #include "params.h"
31 #include "hosthooks.h" 31 #include "hosthooks.h"
32 #include "hosthooks-def.h" 32 #include "hosthooks-def.h"
33 #include "plugin.h" 33 #include "plugin.h"
34 #include "vec.h" 34 #include "vec.h"
35 #include "timevar.h"
35 36
36 #ifdef HAVE_SYS_RESOURCE_H 37 #ifdef HAVE_SYS_RESOURCE_H
37 # include <sys/resource.h> 38 # include <sys/resource.h>
38 #endif 39 #endif
39 40
499 struct mmap_info mmi; 500 struct mmap_info mmi;
500 const size_t mmap_offset_alignment = host_hooks.gt_pch_alloc_granularity(); 501 const size_t mmap_offset_alignment = host_hooks.gt_pch_alloc_granularity();
501 502
502 gt_pch_save_stringpool (); 503 gt_pch_save_stringpool ();
503 504
505 timevar_push (TV_PCH_PTR_REALLOC);
504 saving_htab = htab_create (50000, saving_htab_hash, saving_htab_eq, free); 506 saving_htab = htab_create (50000, saving_htab_hash, saving_htab_eq, free);
505 507
506 for (rt = gt_ggc_rtab; *rt; rt++) 508 for (rt = gt_ggc_rtab; *rt; rt++)
507 for (rti = *rt; rti->base != NULL; rti++) 509 for (rti = *rt; rti->base != NULL; rti++)
508 for (i = 0; i < rti->nelt; i++) 510 for (i = 0; i < rti->nelt; i++)
530 532
531 ggc_pch_this_base (state.d, mmi.preferred_base); 533 ggc_pch_this_base (state.d, mmi.preferred_base);
532 534
533 state.ptrs = XNEWVEC (struct ptr_data *, state.count); 535 state.ptrs = XNEWVEC (struct ptr_data *, state.count);
534 state.ptrs_i = 0; 536 state.ptrs_i = 0;
537
535 htab_traverse (saving_htab, call_alloc, &state); 538 htab_traverse (saving_htab, call_alloc, &state);
539 timevar_pop (TV_PCH_PTR_REALLOC);
540
541 timevar_push (TV_PCH_PTR_SORT);
536 qsort (state.ptrs, state.count, sizeof (*state.ptrs), compare_ptr_data); 542 qsort (state.ptrs, state.count, sizeof (*state.ptrs), compare_ptr_data);
543 timevar_pop (TV_PCH_PTR_SORT);
537 544
538 /* Write out all the scalar variables. */ 545 /* Write out all the scalar variables. */
539 for (rt = gt_pch_scalar_rtab; *rt; rt++) 546 for (rt = gt_pch_scalar_rtab; *rt; rt++)
540 for (rti = *rt; rti->base != NULL; rti++) 547 for (rti = *rt; rti->base != NULL; rti++)
541 if (fwrite (rti->base, rti->stride, 1, f) != 1) 548 if (fwrite (rti->base, rti->stride, 1, f) != 1)