<div dir="ltr">Now I am debugging a function named RAGreedy::selectOrSplit(). Two functions called by it, "trySplit()" and "spill()". I am lost in them long time.<div>I am very confused why it must split VirtReg's LiveRange, and where I can delete the redundant COPY? Or is there any function estimates if a COPY is redundant?</div>
<div><br></div><div>For example, one IR after trySplit():</div><div>ST_dword_ri32_reg  %vreg203, <fi#10>, 0, 0;  GR32:%vreg203</div><div>%vreg24<def> = SHR_ri7  %vreg203, 31;  GR32:%vreg24, %vreg203</div><div>
%vreg202<def> = COPY %vreg203;  GR32:%vreg202, %vreg203</div><div>%vreg23<def> = LD_dword_ri32 %vreg43, <ga:@wn32>, 0; mem:LD4[%real15](tbaa=<badref>)  GR32:%vreg23, %vreg43</div><div><br></div><div>
I consider the COPY is redundant.</div><div>Any advice will be appreciated. Thanks in advance.</div></div>