[drreg] Omit adjacent tool-val restore and spill
Today, drreg restores app value of a spilled reg around app instrs that read that reg. E.g. for instr1
and instr2
that both read reg1
, drreg will produce a sequence like the following:
<tool val spill for reg1>
<app val restore for reg1>
<app instr 1>
<tool val restore for reg1> // can be omitted
<tool val spill for reg1> // can be omitted
<app val restore for reg1>
<app instr 2>
<tool val restore for reg1>
The commented tool val restore and tool val spill instrs can possibly be omitted. This can be done in instru2instru phase in drreg.