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

Duncan Sands baldrick at free.fr
Sat Oct 3 06:55:54 PDT 2009


Author: baldrick
Date: Sat Oct  3 08:55:53 2009
New Revision: 83259

URL: http://llvm.org/viewvc/llvm-project?rev=83259&view=rev
Log:
LLVM values local to a function are now kept in maps that live
only as long as we are converting the function.  So there is no
need for eraseLocalLLVMValues - delete it.

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

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

==============================================================================
--- gcc-plugin/trunk/bits_and_bobs.cpp (original)
+++ gcc-plugin/trunk/bits_and_bobs.cpp Sat Oct  3 08:55:53 2009
@@ -20,10 +20,6 @@
 
 bool flag_odr = false;
 
-void eraseLocalLLVMValues() {
-abort();
-}
-
 int ix86_regparm;
 
 extern "C" bool contains_aligned_value_p (tree type) {

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

==============================================================================
--- gcc-plugin/trunk/llvm-backend.cpp (original)
+++ gcc-plugin/trunk/llvm-backend.cpp Sat Oct  3 08:55:53 2009
@@ -290,25 +290,6 @@
 //TODO                     LLVMValuesTable,
 //TODO                     "llvm.pch.values");
 //TODO}
-//TODO
-//TODO/// eraseLocalLLVMValues - drop all non-global values from the LLVM values map.
-//TODOvoid eraseLocalLLVMValues() {
-//TODO  // Erase all the local values, these are stored in LocalLLVMValueIDs.
-//TODO  while (!LocalLLVMValueIDs.empty()) {
-//TODO    unsigned Idx = LocalLLVMValueIDs.back()-1;
-//TODO    LocalLLVMValueIDs.pop_back();
-//TODO
-//TODO    if (Value *V = LLVMValues[Idx]) {
-//TODO      assert(!isa<Constant>(V) && "Found global value");
-//TODO      LLVMValuesMap.erase(V);
-//TODO    }
-//TODO
-//TODO    if (Idx == LLVMValues.size()-1)
-//TODO      LLVMValues.pop_back();
-//TODO    else
-//TODO      LLVMValues[Idx] = 0;
-//TODO  }
-//TODO}
 
 /// handleVisibility - Forward decl visibility style to global.
 void handleVisibility(tree decl, GlobalValue *GV) {

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

==============================================================================
--- gcc-plugin/trunk/llvm-convert.cpp (original)
+++ gcc-plugin/trunk/llvm-convert.cpp Sat Oct  3 08:55:53 2009
@@ -866,12 +866,6 @@
   // defined and all basic blocks output.
   PopulatePhiNodes();
 
-// Local llvm values should probably just be cached in a local map, making this
-// routine unnecessary.
-//TODO  // Remove any cached LLVM values that are local to this function.  Such values
-//TODO  // may be deleted when the optimizers run, so would be dangerous to keep.
-//TODO  eraseLocalLLVMValues();
-
   return Fn;
 }
 

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

==============================================================================
--- gcc-plugin/trunk/llvm-internal.h (original)
+++ gcc-plugin/trunk/llvm-internal.h Sat Oct  3 08:55:53 2009
@@ -132,7 +132,6 @@
 void writeLLVMTypesStringTable();
 void readLLVMValues();
 void writeLLVMValues();
-void eraseLocalLLVMValues();
 void clearTargetBuiltinCache();
 const char* extractRegisterName(union tree_node*);
 void handleVisibility(union tree_node* decl, GlobalValue *GV);





More information about the llvm-commits mailing list