Okay, the list of link-time passes wasn't such a hot idea. Its prone to
authorReid Spencer <rspencer@reidspencer.com>
Tue, 14 Sep 2004 05:43:23 +0000 (05:43 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 14 Sep 2004 05:43:23 +0000 (05:43 +0000)
error. We'll strategize on this when we have multiple front ends to deal
with. For now llvm-ld just runs a standard set of transforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16333 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Module.h
lib/AsmParser/Lexer.l
lib/AsmParser/llvmAsmParser.y
lib/VMCore/AsmWriter.cpp
lib/VMCore/Module.cpp

index 64a84d4db10f0357c9419e0279ce0695ad1fb9bf..a4b675fd476602504a11c6773c2accd99bc9100d 100644 (file)
@@ -49,7 +49,6 @@ public:
   typedef iplist<GlobalVariable> GlobalListType;
   typedef iplist<Function> FunctionListType;
   typedef SetVector<std::string> LibraryListType;
-  typedef std::vector<std::string> PassListType;
 
   // Global Variable iterators...
   typedef GlobalListType::iterator                             giterator;
@@ -66,9 +65,6 @@ public:
   // Library list iterators
   typedef LibraryListType::const_iterator lib_iterator;
 
-  // Link-time Pass list iterators
-  typedef PassListType::const_iterator pass_iterator;
-
   enum Endianness  { AnyEndianness, LittleEndian, BigEndian };
   enum PointerSize { AnyPointerSize, Pointer32, Pointer64 };
 
@@ -76,7 +72,6 @@ private:
   GlobalListType GlobalList;     // The Global Variables in the module
   FunctionListType FunctionList; // The Functions in the module
   LibraryListType LibraryList;   // The Libraries needed by the module
-  PassListType PassList;         // The Passes needed by the module at link time
   SymbolTable *SymTab;           // Symbol Table for the module
   std::string ModuleID;          // Human readable identifier for the module
   std::string TargetTriple;      // Platform target triple Module compiled on
@@ -252,27 +247,6 @@ public:
   /// @brief Get all the libraries 
   inline const LibraryListType& getLibraries() const { return LibraryList; }
 
-  //===--------------------------------------------------------------------===//
-  // Access functions for Link-time pass list
-
-  /// @brief Get a constant iterator to beginning of pass list.
-  inline pass_iterator pass_begin() const { return PassList.begin(); }
-
-  /// @brief Get a constant iterator to end of pass list.
-  inline pass_iterator pass_end() const { return PassList.end(); }
-
-  /// @brief Returns the number of items in the list of passes.
-  inline unsigned pass_size() const { return PassList.size(); }
-
-  /// @brief Add a library to the list of passes
-  inline void addPass(const std::string& Pass){ PassList.push_back(Pass); }
-
-  /// @brief Remove a library from the list of passes
-  void removePass(const std::string& Lib); 
-
-  /// @brief Get all the passes 
-  inline const PassListType& getPasses() const { return PassList; }
-
   //===--------------------------------------------------------------------===//
   // Utility functions for printing and dumping Module objects
 
index 9290cf1ae077c4bf73ec9ac07f174dc3e5d35d90..45361bd77b8e6ee5218208098f6b05615671251b 100644 (file)
@@ -195,7 +195,6 @@ not             { return NOT; }  /* Deprecated, turned into XOR */
 target          { return TARGET; }
 triple          { return TRIPLE; }
 deplibs         { return DEPLIBS; }
-passes          { return PASSES; }
 endian          { return ENDIAN; }
 pointersize     { return POINTERSIZE; }
 little          { return LITTLE; }
index aec7b38dbdc19c5eea6e70be6e9978906aa368c4..ce92c9cb6974f68f8be0bb88fdbac9d711890f00 100644 (file)
@@ -910,7 +910,7 @@ Module *llvm::RunVMAsmParser(const std::string &Filename, FILE *F) {
 %token DECLARE GLOBAL CONSTANT VOLATILE
 %token TO DOTDOTDOT NULL_TOK CONST INTERNAL LINKONCE WEAK  APPENDING
 %token OPAQUE NOT EXTERNAL TARGET TRIPLE ENDIAN POINTERSIZE LITTLE BIG
-%token DEPLIBS PASSES
+%token DEPLIBS 
 
 // Basic Block Terminating Operators 
 %token <TermOpVal> RET BR SWITCH INVOKE UNWIND
@@ -1484,8 +1484,6 @@ ConstPool : ConstPool OptAssign TYPE TypesV {  // Types can be defined in the co
   }
   | ConstPool DEPLIBS '=' LibrariesDefinition {
   }
-  | ConstPool PASSES '=' PassesDefinition {
-  }
   | /* empty: end of list */ { 
   };
 
@@ -1524,19 +1522,6 @@ LibList : LibList ',' STRINGCONSTANT {
         }
         ;
 
-PassesDefinition : '[' PassList ']';
-PassList : PassList ',' STRINGCONSTANT {
-           CurModule.CurrentModule->addLibrary($3);
-           free($3);
-         }
-         | STRINGCONSTANT {
-           CurModule.CurrentModule->addLibrary($1);
-           free($1);
-         }
-         | /* empty: end of list */ {
-         }
-         ;
-
 //===----------------------------------------------------------------------===//
 //                       Rules to match Function Headers
 //===----------------------------------------------------------------------===//
index 0cca2a7882445b90e4cd1e9134b270ed9c33893b..236e243caad1c04483dd0cd293af65dca1df8373 100644 (file)
@@ -778,20 +778,6 @@ void AssemblyWriter::printModule(const Module *M) {
     Out << " ]\n";
   }
 
-  // Loop over the link time pass list and emit them.
-  Module::pass_iterator PI = M->pass_begin();
-  Module::pass_iterator PE = M->pass_end();
-  if (LI != LE) {
-    Out << "passes = [ ";
-    while (LI != LE) {
-      Out << '"' << *LI << '"';
-      ++LI;
-      if (LI != LE)
-        Out << ", ";
-    }
-    Out << " ]\n";
-  }
-  
   // Loop over the symbol table, emitting all named constants.
   printSymbolTable(M->getSymbolTable());
   
index 1dae14ec53f901acd0f66f803cb3258c22225b53..3759cfd85eba13c441dcc3296f66e05820ebfa06 100644 (file)
@@ -270,13 +270,6 @@ std::string Module::getTypeName(const Type *Ty) const {
   return "";     // Must not have found anything...
 }
 
-void Module::removePass(const std::string& Lib) { 
-  PassListType::iterator I = find(PassList.begin(),PassList.end(),Lib);
-  if (I != PassList.end())
-    PassList.erase(I);
-}
-
-
 //===----------------------------------------------------------------------===//
 // Other module related stuff.
 //