[LLVMdev] Questions about split and spill VirtReg

程伟 stephenia1129 at gmail.com
Mon Mar 24 07:28:02 PDT 2014


Now I am debugging a function named RAGreedy::selectOrSplit(). Two
functions called by it, "trySplit()" and "spill()". I am lost in them long
time.
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?

For example, one IR after trySplit():
ST_dword_ri32_reg  %vreg203, <fi#10>, 0, 0;  GR32:%vreg203
%vreg24<def> = SHR_ri7  %vreg203, 31;  GR32:%vreg24, %vreg203
%vreg202<def> = COPY %vreg203;  GR32:%vreg202, %vreg203
%vreg23<def> = LD_dword_ri32 %vreg43, <ga:@wn32>, 0;
mem:LD4[%real15](tbaa=<badref>)  GR32:%vreg23, %vreg43

I consider the COPY is redundant.
Any advice will be appreciated. Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140324/357e498c/attachment.html>


More information about the llvm-dev mailing list