/* Local Register Allocator (LRA) intercommunication header file.
- Copyright (C) 2010-2014 Free Software Foundation, Inc.
+ Copyright (C) 2010-2015 Free Software Foundation, Inc.
Contributed by Vladimir Makarov <vmakarov@redhat.com>.
This file is part of GCC.
lra_live_range_t next;
/* Pointer to structures with the same start. */
lra_live_range_t start_next;
+
+ /* Pool allocation new operator. */
+ inline void *operator new (size_t)
+ {
+ return pool.allocate ();
+ }
+
+ /* Delete operator utilizing pool allocation. */
+ inline void operator delete (void *ptr)
+ {
+ pool.remove ((lra_live_range *) ptr);
+ }
+
+ /* Memory allocation pool. */
+ static pool_allocator<lra_live_range> pool;
};
typedef struct lra_copy *lra_copy_t;
int regno1, regno2;
/* Next copy with correspondingly REGNO1 and REGNO2. */
lra_copy_t regno1_next, regno2_next;
+
+ /* Pool allocation new operator. */
+ inline void *operator new (size_t)
+ {
+ return pool.allocate ();
+ }
+
+ /* Delete operator utilizing pool allocation. */
+ inline void operator delete (void *ptr)
+ {
+ pool.remove ((lra_copy *) ptr);
+ }
+
+ /* Memory allocation pool. */
+ static pool_allocator<lra_copy> pool;
+
};
/* Common info about a register (pseudo or hard register). */
int regno;
/* Next reg info of the same insn. */
struct lra_insn_reg *next;
+
+ /* Pool allocation new operator. */
+ inline void *operator new (size_t)
+ {
+ return pool.allocate ();
+ }
+
+ /* Delete operator utilizing pool allocation. */
+ inline void operator delete (void *ptr)
+ {
+ pool.remove ((lra_insn_reg *) ptr);
+ }
+
+ /* Memory allocation pool. */
+ static pool_allocator<lra_insn_reg> pool;
};
/* Static part (common info for insns with the same ICODE) of LRA
#error wrong LRA_MAX_INHERITANCE_PASSES value
#endif
+/* Analogous macro to the above one but for rematerialization. */
+#define LRA_MAX_REMATERIALIZATION_PASSES 2
+
+#if LRA_MAX_REMATERIALIZATION_PASSES <= 0 \
+ || LRA_MAX_REMATERIALIZATION_PASSES >= LRA_MAX_ASSIGNMENT_ITERATION_NUMBER - 8
+#error wrong LRA_MAX_REMATERIALIZATION_PASSES value
+#endif
+
/* lra.c: */
extern FILE *lra_dump_file;
extern lra_copy_t lra_get_copy (int);
extern bool lra_former_scratch_p (int);
extern bool lra_former_scratch_operand_p (rtx_insn *, int);
+extern void lra_register_new_scratch_op (rtx_insn *, int);
extern int lra_new_regno_start;
extern int lra_constraint_new_regno_start;
+extern int lra_bad_spill_regno_start;
extern bitmap_head lra_inheritance_pseudos;
extern bitmap_head lra_split_regs;
extern bitmap_head lra_subreg_reload_pseudos;
/* lra-remat.c: */
+extern int lra_rematerialization_iter;
extern bool lra_remat (void);
/* lra-elimination.c: */