We first find regs that have pool in simple linear scale, and save them in HoleRegPool, when allocte regs we first try to search fit candidate in the pool and choose the most fit one to reuse.
V2: Refine hole reuse only in one block.
V3: Refine data structure with less variable, add OCL_REUSE_HOLE_REG to control the optimization.
V4: Spilt the patch into instruction ID part and hole reuse, refine the blockID of the reg.
V5: Refine some variable and function name. Add check for not spill the hole regs that already been used.
V6: Fix some case when the dst is partial write.
V7: Fix hole spill dead loop.
a7dc769 Backend: Add hole reuse in reg alloction
backend/src/backend/gen_reg_allocation.cpp | 127 +++++++++++++++++++++++++----
backend/src/backend/gen_reg_allocation.hpp | 11 +++
2 files changed, 121 insertions(+), 17 deletions(-)