From ecb2a8b9bc727308a0ccfbd92c87b7533c68aab8 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 5 Mar 2008 22:09:42 +0000 Subject: Fix a coalescer bug wrt how dead copy interval is shortened. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47966 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SimpleRegisterCoalescing.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/CodeGen/SimpleRegisterCoalescing.h') diff --git a/lib/CodeGen/SimpleRegisterCoalescing.h b/lib/CodeGen/SimpleRegisterCoalescing.h index 1c21620..543d470 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.h +++ b/lib/CodeGen/SimpleRegisterCoalescing.h @@ -201,6 +201,12 @@ namespace llvm { /// subregister. void UpdateRegDefsUses(unsigned SrcReg, unsigned DstReg, unsigned SubIdx); + /// ShortenDeadCopyLiveRange - Shorten a live range as it's artificially + /// extended by a dead copy. Mark the last use (if any) of the val# as kill + /// as ends the live range there. If there isn't another use, then this + /// live range is dead. + void ShortenDeadCopyLiveRange(LiveInterval &li, MachineInstr *CopyMI); + /// lastRegisterUse - Returns the last use of the specific register between /// cycles Start and End or NULL if there are no uses. MachineOperand *lastRegisterUse(unsigned Start, unsigned End, unsigned Reg, -- cgit v1.1