summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arm/arm.c12
-rw-r--r--gcc/config/i386/winnt.c16
-rw-r--r--gcc/config/ia64/ia64.c9
-rw-r--r--gcc/config/mips/mips.c19
-rw-r--r--gcc/config/sol2.c13
5 files changed, 34 insertions, 35 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 70682f1189e..464dec1dd83 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -4661,25 +4661,25 @@ libcall_hasher::hash (const value_type *p1)
return hash_rtx (p1, VOIDmode, NULL, NULL, FALSE);
}
-typedef hash_table <libcall_hasher> libcall_table_type;
+typedef hash_table<libcall_hasher> libcall_table_type;
static void
-add_libcall (libcall_table_type htab, rtx libcall)
+add_libcall (libcall_table_type *htab, rtx libcall)
{
- *htab.find_slot (libcall, INSERT) = libcall;
+ *htab->find_slot (libcall, INSERT) = libcall;
}
static bool
arm_libcall_uses_aapcs_base (const_rtx libcall)
{
static bool init_done = false;
- static libcall_table_type libcall_htab;
+ static libcall_table_type *libcall_htab = NULL;
if (!init_done)
{
init_done = true;
- libcall_htab.create (31);
+ libcall_htab = new libcall_table_type (31);
add_libcall (libcall_htab,
convert_optab_libfunc (sfloat_optab, SFmode, SImode));
add_libcall (libcall_htab,
@@ -4738,7 +4738,7 @@ arm_libcall_uses_aapcs_base (const_rtx libcall)
DFmode));
}
- return libcall && libcall_htab.find (libcall) != NULL;
+ return libcall && libcall_htab->find (libcall) != NULL;
}
static rtx
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 10c0b003f8d..dd521331984 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -469,7 +469,7 @@ i386_pe_reloc_rw_mask (void)
unsigned int
i386_pe_section_type_flags (tree decl, const char *name, int reloc)
{
- static hash_table <pointer_hash <unsigned int> > htab;
+ static hash_table<pointer_hash<unsigned int> > *htab = NULL;
unsigned int flags;
unsigned int **slot;
@@ -480,8 +480,8 @@ i386_pe_section_type_flags (tree decl, const char *name, int reloc)
/* The names we put in the hashtable will always be the unique
versions given to us by the stringtable, so we can just use
their addresses as the keys. */
- if (!htab.is_created ())
- htab.create (31);
+ if (!htab)
+ htab = new hash_table<pointer_hash<unsigned int> > (31);
if (decl && TREE_CODE (decl) == FUNCTION_DECL)
flags = SECTION_CODE;
@@ -500,7 +500,7 @@ i386_pe_section_type_flags (tree decl, const char *name, int reloc)
flags |= SECTION_LINKONCE;
/* See if we already have an entry for this section. */
- slot = htab.find_slot ((const unsigned int *)name, INSERT);
+ slot = htab->find_slot ((const unsigned int *)name, INSERT);
if (!*slot)
{
*slot = (unsigned int *) xmalloc (sizeof (unsigned int));
@@ -771,7 +771,7 @@ static const char *
i386_find_on_wrapper_list (const char *target)
{
static char first_time = 1;
- static hash_table <wrapped_symbol_hasher> wrappers;
+ static hash_table<wrapped_symbol_hasher> *wrappers;
if (first_time)
{
@@ -784,7 +784,7 @@ i386_find_on_wrapper_list (const char *target)
char *bufptr;
/* Breaks up the char array into separated strings
strings and enter them into the hash table. */
- wrappers.create (8);
+ wrappers = new hash_table_c<wrapped_symbol_hasher> (8);
for (bufptr = wrapper_list_buffer; *bufptr; ++bufptr)
{
char *found = NULL;
@@ -797,12 +797,12 @@ i386_find_on_wrapper_list (const char *target)
if (*bufptr)
*bufptr = 0;
if (found)
- *wrappers.find_slot (found, INSERT) = found;
+ *wrappers->find_slot (found, INSERT) = found;
}
first_time = 0;
}
- return wrappers.find (target);
+ return wrappers->find (target);
}
#endif /* CXX_WRAP_SPEC_LIST */
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index de486c6dfac..c2e807c314d 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -8586,7 +8586,7 @@ bundle_state_hasher::equal (const value_type *state1,
/* Hash table of the bundle states. The key is dfa_state and insn_num
of the bundle states. */
-static hash_table <bundle_state_hasher> bundle_state_table;
+static hash_table<bundle_state_hasher> *bundle_state_table;
/* The function inserts the BUNDLE_STATE into the hash table. The
function returns nonzero if the bundle has been inserted into the
@@ -8597,7 +8597,7 @@ insert_bundle_state (struct bundle_state *bundle_state)
{
struct bundle_state **entry_ptr;
- entry_ptr = bundle_state_table.find_slot (bundle_state, INSERT);
+ entry_ptr = bundle_state_table->find_slot (bundle_state, INSERT);
if (*entry_ptr == NULL)
{
bundle_state->next = index_to_bundle_states [bundle_state->insn_num];
@@ -8634,7 +8634,7 @@ insert_bundle_state (struct bundle_state *bundle_state)
static void
initiate_bundle_state_table (void)
{
- bundle_state_table.create (50);
+ bundle_state_table = new hash_table<bundle_state_hasher> (50);
}
/* Finish work with the hash table. */
@@ -8642,7 +8642,8 @@ initiate_bundle_state_table (void)
static void
finish_bundle_state_table (void)
{
- bundle_state_table.dispose ();
+ delete bundle_state_table;
+ bundle_state_table = NULL;
}
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index f224ae8d511..b1504ee621e 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -16018,14 +16018,14 @@ mips_lo_sum_offset_hasher::equal (const value_type *entry,
return rtx_equal_p (entry->base, value);
}
-typedef hash_table <mips_lo_sum_offset_hasher> mips_offset_table;
+typedef hash_table<mips_lo_sum_offset_hasher> mips_offset_table;
/* Look up symbolic constant X in HTAB, which is a hash table of
mips_lo_sum_offsets. If OPTION is NO_INSERT, return true if X can be
paired with a recorded LO_SUM, otherwise record X in the table. */
static bool
-mips_lo_sum_offset_lookup (mips_offset_table htab, rtx x,
+mips_lo_sum_offset_lookup (mips_offset_table *htab, rtx x,
enum insert_option option)
{
rtx base, offset;
@@ -16038,7 +16038,7 @@ mips_lo_sum_offset_lookup (mips_offset_table htab, rtx x,
base = UNSPEC_ADDRESS (base);
/* Look up the base in the hash table. */
- slot = htab.find_slot_with_hash (base, mips_hash_base (base), option);
+ slot = htab->find_slot_with_hash (base, mips_hash_base (base), option);
if (slot == NULL)
return false;
@@ -16068,7 +16068,7 @@ static int
mips_record_lo_sum (rtx *loc, void *data)
{
if (GET_CODE (*loc) == LO_SUM)
- mips_lo_sum_offset_lookup (*(mips_offset_table*) data,
+ mips_lo_sum_offset_lookup ((mips_offset_table*) data,
XEXP (*loc, 1), INSERT);
return 0;
}
@@ -16078,7 +16078,7 @@ mips_record_lo_sum (rtx *loc, void *data)
LO_SUMs in the current function. */
static bool
-mips_orphaned_high_part_p (mips_offset_table htab, rtx insn)
+mips_orphaned_high_part_p (mips_offset_table *htab, rtx insn)
{
enum mips_symbol_type type;
rtx x, set;
@@ -16186,7 +16186,6 @@ mips_reorg_process_insns (void)
{
rtx insn, last_insn, subinsn, next_insn, lo_reg, delayed_reg;
int hilo_delay;
- mips_offset_table htab;
/* Force all instructions to be split into their final form. */
split_all_insns_noflow ();
@@ -16227,7 +16226,7 @@ mips_reorg_process_insns (void)
if (TARGET_FIX_VR4130 && !ISA_HAS_MACCHI)
cfun->machine->all_noreorder_p = false;
- htab.create (37);
+ mips_offset_table htab (37);
/* Make a first pass over the instructions, recording all the LO_SUMs. */
for (insn = get_insns (); insn != 0; insn = NEXT_INSN (insn))
@@ -16272,7 +16271,7 @@ mips_reorg_process_insns (void)
FOR_EACH_SUBINSN (subinsn, insn)
if (INSN_P (subinsn))
{
- if (mips_orphaned_high_part_p (htab, subinsn))
+ if (mips_orphaned_high_part_p (&htab, subinsn))
{
PATTERN (subinsn) = gen_nop ();
INSN_CODE (subinsn) = CODE_FOR_nop;
@@ -16286,7 +16285,7 @@ mips_reorg_process_insns (void)
{
/* INSN is a single instruction. Delete it if it's an
orphaned high-part relocation. */
- if (mips_orphaned_high_part_p (htab, insn))
+ if (mips_orphaned_high_part_p (&htab, insn))
delete_insn (insn);
/* Also delete cache barriers if the last instruction
was an annulled branch. INSN will not be speculatively
@@ -16305,8 +16304,6 @@ mips_reorg_process_insns (void)
}
}
}
-
- htab.dispose ();
}
/* Return true if the function has a long branch instruction. */
diff --git a/gcc/config/sol2.c b/gcc/config/sol2.c
index d07a9411faf..c7764b1993d 100644
--- a/gcc/config/sol2.c
+++ b/gcc/config/sol2.c
@@ -195,7 +195,7 @@ comdat_entry_hasher::equal (const value_type *entry1,
/* Hash table of group signature symbols. */
-static hash_table <comdat_entry_hasher> solaris_comdat_htab;
+static hash_table<comdat_entry_hasher> *solaris_comdat_htab;
/* Output assembly to switch to COMDAT group section NAME with attributes
FLAGS and group signature symbol DECL, using Sun as syntax. */
@@ -236,11 +236,11 @@ solaris_elf_asm_comdat_section (const char *name, unsigned int flags, tree decl)
identify the missing ones without changing the affected frontents,
remember the signature symbols and emit those not marked
TREE_SYMBOL_REFERENCED in solaris_file_end. */
- if (!solaris_comdat_htab.is_created ())
- solaris_comdat_htab.create (37);
+ if (!solaris_comdat_htab)
+ solaris_comdat_htab = new hash_table<comdat_entry_hasher> (37);
entry.sig = signature;
- slot = solaris_comdat_htab.find_slot (&entry, INSERT);
+ slot = solaris_comdat_htab->find_slot (&entry, INSERT);
if (*slot == NULL)
{
@@ -284,10 +284,11 @@ solaris_define_comdat_signature (comdat_entry **slot,
void
solaris_file_end (void)
{
- if (!solaris_comdat_htab.is_created ())
+ if (!solaris_comdat_htab)
return;
- solaris_comdat_htab.traverse <void *, solaris_define_comdat_signature> (NULL);
+ solaris_comdat_htab->traverse <void *, solaris_define_comdat_signature>
+ (NULL);
}
void