From 92efda7e9183ae16bde7a3ad96b682e779d89cf3 Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Tue, 22 Feb 2011 00:46:27 +0000 Subject: Merge information about the number of zero, one, and sign bits of live-out registers at phis. This enables us to eliminate a lot of pointless zexts during the DAGCombine phase. This fixes . git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126170 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/FunctionLoweringInfo.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'include/llvm/CodeGen/FunctionLoweringInfo.h') diff --git a/include/llvm/CodeGen/FunctionLoweringInfo.h b/include/llvm/CodeGen/FunctionLoweringInfo.h index 27631b7ea1..6bc10dfaa3 100644 --- a/include/llvm/CodeGen/FunctionLoweringInfo.h +++ b/include/llvm/CodeGen/FunctionLoweringInfo.h @@ -101,14 +101,30 @@ public: #endif struct LiveOutInfo { - unsigned NumSignBits; + unsigned NumSignBits : 31; + bool IsValid : 1; APInt KnownOne, KnownZero; - LiveOutInfo() : NumSignBits(0), KnownOne(1, 0), KnownZero(1, 0) {} + LiveOutInfo() : NumSignBits(0), IsValid(false), KnownOne(1, 0), + KnownZero(1, 0) {} }; /// LiveOutRegInfo - Information about live out vregs. IndexedMap LiveOutRegInfo; + /// VisitedBBs - Basic blocks that have been visited by reverse postorder. + DenseSet VisitedBBs; + + /// AllPredsVisited - Tracks whether all predecessors of the current basic + /// block have already been visited. + bool AllPredsVisited; + + /// PHIDestRegs - Virtual registers that are the destinations of PHIs. + DenseSet PHIDestRegs; + + /// PHISrcToDestMap - Maps the virtual register defining a PHI's source to the + /// virtual register defining its destination. + DenseMap PHISrcToDestMap; + /// PHINodesToUpdate - A list of phi instructions whose operand list will /// be updated after processing the current basic block. /// TODO: This isn't per-function state, it's per-basic-block state. But -- cgit v1.2.3