summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
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
commit800f85baf9dadd899fed7a4be6ce95524bfe83ba (patch)
tree70b22cb404e0f87262a47ec01a3fa4df072ca3d8 /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
parentf248f945c8a4e2fd109c55e07560e3619e8ea59e (diff)
downloadbcm5719-llvm-800f85baf9dadd899fed7a4be6ce95524bfe83ba.tar.gz
bcm5719-llvm-800f85baf9dadd899fed7a4be6ce95524bfe83ba.zip
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>. llvm-svn: 126170
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index 98582ba99f1..8adaf057c0a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -127,10 +127,13 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf) {
for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
// Mark values used outside their block as exported, by allocating
// a virtual register for them.
- if (isUsedOutsideOfDefiningBlock(I))
+ if (!EnableFastISel && isa<PHINode>(I)) {
+ PHIDestRegs.insert(InitializeRegForValue(I));
+ } else if (isUsedOutsideOfDefiningBlock(I)) {
if (!isa<AllocaInst>(I) ||
!StaticAllocaMap.count(cast<AllocaInst>(I)))
InitializeRegForValue(I);
+ }
// Collect llvm.dbg.declare information. This is done now instead of
// during the initial isel pass through the IR so that it is done
@@ -219,6 +222,9 @@ void FunctionLoweringInfo::clear() {
CatchInfoFound.clear();
#endif
LiveOutRegInfo.clear();
+ VisitedBBs.clear();
+ PHIDestRegs.clear();
+ PHISrcToDestMap.clear();
ArgDbgValues.clear();
ByValArgFrameIndexMap.clear();
RegFixups.clear();
OpenPOWER on IntegriCloud