diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/alloc-pool.h | 2 | ||||
-rw-r--r-- | gcc/final.c | 7 | ||||
-rw-r--r-- | gcc/ggc.h | 24 |
4 files changed, 29 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f54f9ba..2bff39a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2012-07-13 Steven Bosscher <steven@gcc.gnu.org> + * ggc.h (ggc_internal_alloc_stat, ggc_alloc_typed_stat, + ggc_internal_cleared_alloc_stat, ggc_cleared_alloc_htab_ignore_args, + ggc_cleared_alloc_ptr_array_two_args, ggc_splay_alloc): Add + ATTRIBUTE_MALLOC. + * alloc-pool.h (pool_alloc): Likewise. + + * final.c (final): Do not loop to find max_uid. + +2012-07-13 Steven Bosscher <steven@gcc.gnu.org> + * emit-rtl.c (make_debug_insn_raw, make_jump_insn_raw): Make static. * rtl.h (make_debug_insn_raw, make_jump_insn_raw): Remove prototypes. diff --git a/gcc/alloc-pool.h b/gcc/alloc-pool.h index fa9848a..4593b70 100644 --- a/gcc/alloc-pool.h +++ b/gcc/alloc-pool.h @@ -61,7 +61,7 @@ extern alloc_pool create_alloc_pool (const char *, size_t, size_t); extern void free_alloc_pool (alloc_pool); extern void empty_alloc_pool (alloc_pool); extern void free_alloc_pool_if_empty (alloc_pool *); -extern void *pool_alloc (alloc_pool); +extern void *pool_alloc (alloc_pool) ATTRIBUTE_MALLOC; extern void pool_free (alloc_pool, void *); extern void dump_alloc_pool_statistics (void); #endif diff --git a/gcc/final.c b/gcc/final.c index 668aacb..5f9a5cb 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1826,7 +1826,6 @@ void final (rtx first, FILE *file, int optimize_p) { rtx insn, next; - int max_uid = 0; int seen = 0; /* Used for -dA dump. */ @@ -1837,11 +1836,9 @@ final (rtx first, FILE *file, int optimize_p) last_ignored_compare = 0; +#ifdef HAVE_cc0 for (insn = first; insn; insn = NEXT_INSN (insn)) { - if (INSN_UID (insn) > max_uid) /* Find largest UID. */ - max_uid = INSN_UID (insn); -#ifdef HAVE_cc0 /* If CC tracking across branches is enabled, record the insn which jumps to each branch only reached from one place. */ if (optimize_p && JUMP_P (insn)) @@ -1852,8 +1849,8 @@ final (rtx first, FILE *file, int optimize_p) LABEL_REFS (lab) = insn; } } -#endif } +#endif init_recog (); @@ -143,19 +143,22 @@ extern void gt_pch_save (FILE *f); /* Allocation. */ /* The internal primitive. */ -extern void *ggc_internal_alloc_stat (size_t MEM_STAT_DECL); +extern void *ggc_internal_alloc_stat (size_t MEM_STAT_DECL) + ATTRIBUTE_MALLOC; extern size_t ggc_round_alloc_size (size_t requested_size); #define ggc_internal_alloc(s) ggc_internal_alloc_stat (s MEM_STAT_INFO) /* Allocate an object of the specified type and size. */ -extern void *ggc_alloc_typed_stat (enum gt_types_enum, size_t MEM_STAT_DECL); +extern void *ggc_alloc_typed_stat (enum gt_types_enum, size_t MEM_STAT_DECL) + ATTRIBUTE_MALLOC; #define ggc_alloc_typed(s, z) ggc_alloc_typed_stat (s, z MEM_STAT_INFO) /* Allocates cleared memory. */ -extern void *ggc_internal_cleared_alloc_stat (size_t MEM_STAT_DECL); +extern void *ggc_internal_cleared_alloc_stat (size_t MEM_STAT_DECL) + ATTRIBUTE_MALLOC; /* Resize a block. */ extern void *ggc_realloc_stat (void *, size_t MEM_STAT_DECL); @@ -202,9 +205,11 @@ ggc_alloc_atomic_stat (size_t s MEM_STAT_DECL) #define ggc_alloc_cleared_atomic(S) \ (ggc_internal_cleared_alloc_stat ((S) MEM_STAT_INFO)) -extern void * ggc_cleared_alloc_htab_ignore_args (size_t, size_t); +extern void *ggc_cleared_alloc_htab_ignore_args (size_t, size_t) + ATTRIBUTE_MALLOC; -extern void * ggc_cleared_alloc_ptr_array_two_args (size_t, size_t); +extern void *ggc_cleared_alloc_ptr_array_two_args (size_t, size_t) + ATTRIBUTE_MALLOC; #define htab_create_ggc(SIZE, HASH, EQ, DEL) \ htab_create_typed_alloc (SIZE, HASH, EQ, DEL, \ @@ -216,7 +221,8 @@ extern void * ggc_cleared_alloc_ptr_array_two_args (size_t, size_t); splay_tree_new_typed_alloc (COMPARE, NULL, NULL, &ALLOC_TREE, &ALLOC_NODE, \ &ggc_splay_dont_free, NULL) -extern void *ggc_splay_alloc (enum gt_types_enum, int, void *); +extern void *ggc_splay_alloc (enum gt_types_enum, int, void *) + ATTRIBUTE_MALLOC; extern void ggc_splay_dont_free (void *, void *); @@ -276,10 +282,12 @@ extern struct alloc_zone tree_id_zone; /* Allocate an object into the specified allocation zone. */ extern void *ggc_internal_alloc_zone_stat (size_t, - struct alloc_zone * MEM_STAT_DECL); + struct alloc_zone * MEM_STAT_DECL) + ATTRIBUTE_MALLOC; extern void *ggc_internal_cleared_alloc_zone_stat (size_t, - struct alloc_zone * MEM_STAT_DECL); + struct alloc_zone * MEM_STAT_DECL) + ATTRIBUTE_MALLOC; static inline void * ggc_internal_zone_alloc_stat (struct alloc_zone * z, size_t s MEM_STAT_DECL) |