From edeffb37dc41591b3d3943a5c02c04e55d348524 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 26 Feb 2007 21:37:37 +0000 Subject: Joining an interval with a dead copy instruction. Shorten the live range to the last use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34645 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/LiveIntervalAnalysis.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include/llvm/CodeGen') diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index 451905f..4f3af88 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -258,9 +258,11 @@ namespace llvm { bool AdjustCopiesBackFrom(LiveInterval &IntA, LiveInterval &IntB, MachineInstr *CopyMI); - /// hasRegisterUse - Returns true if there is any use of the specific - /// reg between indexes Start and End. - bool hasRegisterUse(unsigned Reg, unsigned Start, unsigned End); + /// lastRegisterUse - Returns the last use of the specific register between + /// cycles Start and End. It also returns the use operand by reference. It + /// returns NULL if there are no uses. + MachineInstr *lastRegisterUse(unsigned Reg, unsigned Start, unsigned End, + MachineOperand *&MOU); /// unsetRegisterKill - Unset IsKill property of all uses of specific /// register of the specific instruction. -- cgit v1.1