Roll out r126169 and r126170 in an attempt to fix the selfhost bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126185 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
index 8adaf05..98582ba 100644
--- a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
+++ b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
@@ -127,13 +127,10 @@
     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 (!EnableFastISel && isa<PHINode>(I)) {
-        PHIDestRegs.insert(InitializeRegForValue(I));
-      } else if (isUsedOutsideOfDefiningBlock(I)) {
+      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
@@ -222,9 +219,6 @@
   CatchInfoFound.clear();
 #endif
   LiveOutRegInfo.clear();
-  VisitedBBs.clear();
-  PHIDestRegs.clear();
-  PHISrcToDestMap.clear();
   ArgDbgValues.clear();
   ByValArgFrameIndexMap.clear();
   RegFixups.clear();