[llvm-commits] [llvm] r106878 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Bill Wendling
wendling at apple.com
Fri Jun 25 13:44:33 PDT 2010
This patch is from a suggestion by Jacob!
-bw
On Jun 25, 2010, at 1:42 PM, Bill Wendling wrote:
> Author: void
> Date: Fri Jun 25 15:42:55 2010
> New Revision: 106878
>
> URL: http://llvm.org/viewvc/llvm-project?rev=106878&view=rev
> Log:
> We should remove the live range from the destination register only if *all* defs
> are dead, not just the def of this register. I.e., a register could be dead, but
> it's subreg isn't.
>
> Testcase to follow with a subsequent patch.
>
> 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=106878&r1=106877&r2=106878&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Fri Jun 25 15:42:55 2010
> @@ -1892,8 +1892,8 @@
> if (li_->hasInterval(SrcReg)) {
> LiveInterval &RegInt = li_->getInterval(SrcReg);
> // If def of this move instruction is dead, remove its live range
> - // from the dstination register's live interval.
> - if (MI->registerDefIsDead(DstReg)) {
> + // from the destination register's live interval.
> + if (MI->allDefsAreDead()) {
> if (!ShortenDeadCopySrcLiveRange(RegInt, MI))
> ShortenDeadCopyLiveRange(RegInt, MI);
> } else {
>
>
> _______________________________________________
> 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