[llvm-commits] [gcc-plugin] r83258 - in /gcc-plugin/trunk: llvm-convert.cpp llvm-internal.h

Duncan Sands baldrick at free.fr
Sat Oct 3 06:51:09 PDT 2009


Author: baldrick
Date: Sat Oct  3 08:51:09 2009
New Revision: 83258

URL: http://llvm.org/viewvc/llvm-project?rev=83258&view=rev
Log:
Running over a lot of code, I never saw a case where the
same gimple invariant ADDR_EXPR occurred twice, so there
is no point in caching them.

Modified:
    gcc-plugin/trunk/llvm-convert.cpp
    gcc-plugin/trunk/llvm-internal.h

Modified: gcc-plugin/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-convert.cpp?rev=83258&r1=83257&r2=83258&view=diff

==============================================================================
--- gcc-plugin/trunk/llvm-convert.cpp (original)
+++ gcc-plugin/trunk/llvm-convert.cpp Sat Oct  3 08:51:09 2009
@@ -2162,10 +2162,6 @@
          "Expected a locally constant address!");
   assert(is_gimple_reg_type(TREE_TYPE(reg)) && "Not of register type!");
 
-  DenseMap<tree, AssertingVH<> >::iterator I = MinInvariants.find(reg);
-  if (I != MinInvariants.end())
-    return I->second;
-
   // Any generated code goes in the entry block.
   BasicBlock *EntryBlock = SSAInsertionPoint->getParent();
 
@@ -2196,7 +2192,7 @@
   if (SavedInsertBB != EntryBlock)
     Builder.SetInsertPoint(SavedInsertBB, SavedInsertPoint);
 
-  return MinInvariants[reg] = Address;
+  return Address;
 }
 
 /// EmitGimpleConstant - Return the LLVM constant for this global constant.

Modified: gcc-plugin/trunk/llvm-internal.h
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-internal.h?rev=83258&r1=83257&r2=83258&view=diff

==============================================================================
--- gcc-plugin/trunk/llvm-internal.h (original)
+++ gcc-plugin/trunk/llvm-internal.h Sat Oct  3 08:51:09 2009
@@ -353,10 +353,6 @@
   /// PendingPhis - Phi nodes which have not yet been populated with operands.
   SmallVector<PhiRecord, 16> PendingPhis;
 
-  // MinInvariants - Map from gimple minimal invariants to their corresponding
-  // LLVM values.
-  DenseMap<tree, AssertingVH<> > MinInvariants;
-
   // SSANames - Map from GCC ssa names to the defining LLVM value.
   DenseMap<tree, AssertingVH<> > SSANames;
 





More information about the llvm-commits mailing list