<div dir="ltr">Hi<div><br></div><div>I'm doing some MI scheduling optimization in which involves creating a new machine instruction and insert it into the machine basic block that is being scheduled. The new MI created is using a new virtual register which means at least I have to make registerPressureTracker be aware of it. </div><div><br></div><div>After a little digging, I found that in RegisterPressure.h</div><div><br></div><div>LiveRegSet LiveRegs   is responsible for keeping track of all the live virtual/physical registers, but it's using two sparseSets that only allow to resize before any element is inserted. But I have to insert the new instruction after calling buildDAGWithRegPressure() in which it calls  initRegPressure()</div><div><br></div><div>So I'm wondering what's the right approach of doing this, and also is there any other book keeping structure that I have to update.</div><div><br></div><div>Thanks,</div><div>Patrick</div></div>