diff options
Diffstat (limited to 'gcc/lra-int.h')
-rw-r--r-- | gcc/lra-int.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/lra-int.h b/gcc/lra-int.h index 42e4a54..25bd3ce 100644 --- a/gcc/lra-int.h +++ b/gcc/lra-int.h @@ -84,6 +84,22 @@ struct lra_copy 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). */ @@ -191,6 +207,21 @@ struct lra_insn_reg 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 |