summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/FunctionLoweringInfo.h
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-02-22 00:46:27 +0000
committerCameron Zwarich <zwarich@apple.com>2011-02-22 00:46:27 +0000
commit92efda7e9183ae16bde7a3ad96b682e779d89cf3 (patch)
treec95dc6ff9ae0c0bf7b6a7698974efbddf606a779 /include/llvm/CodeGen/FunctionLoweringInfo.h
parent63a8dae64dea89ae4a6f93ee17cf3fbbc2815084 (diff)
downloadllvm-92efda7e9183ae16bde7a3ad96b682e779d89cf3.tar.gz
llvm-92efda7e9183ae16bde7a3ad96b682e779d89cf3.tar.bz2
llvm-92efda7e9183ae16bde7a3ad96b682e779d89cf3.tar.xz
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 <rdar://problem/8760114>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126170 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/FunctionLoweringInfo.h')
-rw-r--r--include/llvm/CodeGen/FunctionLoweringInfo.h20
1 files changed, 18 insertions, 2 deletions
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<LiveOutInfo, VirtReg2IndexFunctor> LiveOutRegInfo;
+ /// VisitedBBs - Basic blocks that have been visited by reverse postorder.
+ DenseSet<const BasicBlock*> 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<unsigned> PHIDestRegs;
+
+ /// PHISrcToDestMap - Maps the virtual register defining a PHI's source to the
+ /// virtual register defining its destination.
+ DenseMap<unsigned, unsigned> 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