[llvm-commits] [llvm] r153071 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp

Eric Christopher echristo at apple.com
Mon Mar 19 18:07:47 PDT 2012


Author: echristo
Date: Mon Mar 19 20:07:47 2012
New Revision: 153071

URL: http://llvm.org/viewvc/llvm-project?rev=153071&view=rev
Log:
Use lookUpRegForValue here instead of duplicating the code.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=153071&r1=153070&r2=153071&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Mon Mar 19 20:07:47 2012
@@ -136,15 +136,8 @@
       return 0;
   }
 
-  // Look up the value to see if we already have a register for it. We
-  // cache values defined by Instructions across blocks, and other values
-  // only locally. This is because Instructions already have the SSA
-  // def-dominates-use requirement enforced.
-  DenseMap<const Value *, unsigned>::iterator I = FuncInfo.ValueMap.find(V);
-  if (I != FuncInfo.ValueMap.end())
-    return I->second;
-
-  unsigned Reg = LocalValueMap[V];
+  // Look up the value to see if we already have a register for it.
+  unsigned Reg = lookUpRegForValue(V);
   if (Reg != 0)
     return Reg;
 





More information about the llvm-commits mailing list