From c3fc7d9ec9b495c8a88cd854247105c296d3aabd Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 29 Nov 2007 09:49:23 +0000 Subject: Replace the odd kill# hack with something less fragile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44434 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/LiveInterval.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/llvm/CodeGen') diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 69936a0302..48c7ab6807 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -38,16 +38,18 @@ namespace llvm { /// contains ~1u,x to indicate that the value # is not used. /// def - Instruction # of the definition. /// reg - Source reg iff val# is defined by a copy; zero otherwise. + /// hasPHIKill - One or more of the kills are PHI nodes. /// kills - Instruction # of the kills. If a kill is an odd #, it means /// the kill is a phi join point. struct VNInfo { unsigned id; unsigned def; unsigned reg; + bool hasPHIKill; SmallVector kills; - VNInfo() : id(~1U), def(~1U), reg(0) {} + VNInfo() : id(~1U), def(~1U), reg(0), hasPHIKill(false) {} VNInfo(unsigned i, unsigned d, unsigned r) - : id(i), def(d), reg(r) {} + : id(i), def(d), reg(r), hasPHIKill(false) {} }; /// LiveRange structure - This represents a simple register range in the @@ -158,6 +160,7 @@ namespace llvm { void copyValNumInfo(VNInfo *DstValNo, const VNInfo *SrcValNo) { DstValNo->def = SrcValNo->def; DstValNo->reg = SrcValNo->reg; + DstValNo->hasPHIKill = SrcValNo->hasPHIKill; DstValNo->kills = SrcValNo->kills; } -- cgit v1.2.3-70-g09d2