[llvm] r269445 - [EarlyCSE] Change key type of AvailableCalls to Instruction*. NFCI.

Geoff Berry via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 10:54:58 PDT 2016


Author: gberry
Date: Fri May 13 12:54:58 2016
New Revision: 269445

URL: http://llvm.org/viewvc/llvm-project?rev=269445&view=rev
Log:
[EarlyCSE] Change key type of AvailableCalls to Instruction*.  NFCI.

Modified:
    llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp?rev=269445&r1=269444&r2=269445&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/EarlyCSE.cpp Fri May 13 12:54:58 2016
@@ -301,7 +301,8 @@ public:
   /// values.
   ///
   /// It uses the same generation count as loads.
-  typedef ScopedHashTable<CallValue, std::pair<Value *, unsigned>> CallHTType;
+  typedef ScopedHashTable<CallValue, std::pair<Instruction *, unsigned>>
+      CallHTType;
   CallHTType AvailableCalls;
 
   /// \brief This is the current generation of the memory value.
@@ -654,7 +655,7 @@ bool EarlyCSE::processNode(DomTreeNode *
     if (CallValue::canHandle(Inst)) {
       // If we have an available version of this call, and if it is the right
       // generation, replace this instruction.
-      std::pair<Value *, unsigned> InVal = AvailableCalls.lookup(Inst);
+      std::pair<Instruction *, unsigned> InVal = AvailableCalls.lookup(Inst);
       if (InVal.first != nullptr && InVal.second == CurrentGeneration) {
         DEBUG(dbgs() << "EarlyCSE CSE CALL: " << *Inst
                      << "  to: " << *InVal.first << '\n');
@@ -668,7 +669,7 @@ bool EarlyCSE::processNode(DomTreeNode *
 
       // Otherwise, remember that we have this instruction.
       AvailableCalls.insert(
-          Inst, std::pair<Value *, unsigned>(Inst, CurrentGeneration));
+          Inst, std::pair<Instruction *, unsigned>(Inst, CurrentGeneration));
       continue;
     }
 




More information about the llvm-commits mailing list