From 3de23e6f6cf337451a0934159da494d645b93133 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sat, 7 Nov 2009 01:58:40 +0000 Subject: Fix inverted conflict test in -early-coalesce. A non-identity copy cannot be coalesced when the phi join destination register is live at the copy site. Also verify the condition that the PHI join source register is only used in the PHI join. Otherwise the coalescing is invalid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86322 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/LiveIntervalAnalysis.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index efb4a03..d71f960 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -290,9 +290,10 @@ namespace llvm { /// computeIntervals - Compute live intervals. void computeIntervals(); - bool isProfitableToCoalesce(LiveInterval &DstInt, LiveInterval &SrcInt, - SmallVector &IdentCopies, - SmallVector &OtherCopies); + bool isSafeAndProfitableToCoalesce(LiveInterval &DstInt, + LiveInterval &SrcInt, + SmallVector &IdentCopies, + SmallVector &OtherCopies); void performEarlyCoalescing(); -- cgit v1.1