[llvm-commits] [llvm] r52649 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp

Evan Cheng evan.cheng at apple.com
Mon Jun 23 23:49:56 PDT 2008


Hi Owen,

What does this mean? There might be empty slots after the last  
instruction in a MBB? I am not sure that's useful. The gaps are  
generally useful for inserting instructions before existing  
instructions, not after them. Besides, I am not sure this is the only  
place that makes this assumption.

Evan

On Jun 23, 2008, at 3:12 PM, Owen Anderson wrote:

> Author: resistor
> Date: Mon Jun 23 17:12:23 2008
> New Revision: 52649
>
> URL: http://llvm.org/viewvc/llvm-project?rev=52649&view=rev
> Log:
> Use getMBBEndIdx rather than assuming that the end is right after  
> the last instruction in the block.
>
> Modified:
>    llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
>
> Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=52649&r1=52648&r2=52649&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon Jun 23  
> 17:12:23 2008
> @@ -443,7 +443,7 @@
>     LI.FindLiveRangeContaining(li_->getDefIndex(DefIdx));
>   if (DstLR == LI.end())
>     return false;
> -  unsigned KillIdx = li_->getInstructionIndex(&MBB->back()) +  
> InstrSlots::NUM;
> +  unsigned KillIdx = li_->getMBBEndIdx(MBB) + 1;
>   if (DstLR->valno->kills.size() == 1 &&
>       DstLR->valno->kills[0] == KillIdx && DstLR->valno->hasPHIKill)
>     return true;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list