[llvm-commits] CVS: llvm/lib/Transforms/IPO/ConstantMerge.cpp DeadArgumentElimination.cpp DeadTypeElimination.cpp ExtractFunction.cpp FunctionResolution.cpp GlobalDCE.cpp IPConstantPropagation.cpp InlineSimple.cpp Inliner.cpp Inliner.h Internalize.cpp LowerSetJmp.cpp MutateStructTypes.cpp Parallelize.cpp PruneEH.cpp RaiseAllocations.cpp SimpleStructMutation.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Tue Nov 11 16:42:09 PST 2003


Changes in directory llvm/lib/Transforms/IPO:

ConstantMerge.cpp updated: 1.22 -> 1.23
DeadArgumentElimination.cpp updated: 1.12 -> 1.13
DeadTypeElimination.cpp updated: 1.46 -> 1.47
ExtractFunction.cpp updated: 1.4 -> 1.5
FunctionResolution.cpp updated: 1.42 -> 1.43
GlobalDCE.cpp updated: 1.29 -> 1.30
IPConstantPropagation.cpp updated: 1.3 -> 1.4
InlineSimple.cpp updated: 1.56 -> 1.57
Inliner.cpp updated: 1.4 -> 1.5
Inliner.h updated: 1.3 -> 1.4
Internalize.cpp updated: 1.19 -> 1.20
LowerSetJmp.cpp updated: 1.11 -> 1.12
MutateStructTypes.cpp updated: 1.42 -> 1.43
Parallelize.cpp updated: 1.10 -> 1.11
PruneEH.cpp updated: 1.5 -> 1.6
RaiseAllocations.cpp updated: 1.19 -> 1.20
SimpleStructMutation.cpp updated: 1.22 -> 1.23

---
Log message:

Put all LLVM code into the llvm namespace, as per bug 109.

---
Diffs of the changes:  (+67 -2)

Index: llvm/lib/Transforms/IPO/ConstantMerge.cpp
diff -u llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.22 llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.23
--- llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.22	Wed Oct 29 00:01:26 2003
+++ llvm/lib/Transforms/IPO/ConstantMerge.cpp	Tue Nov 11 16:41:33 2003
@@ -22,6 +22,8 @@
 #include "llvm/Pass.h"
 #include "Support/Statistic.h"
 
+namespace llvm {
+
 namespace {
   Statistic<> NumMerged("constmerge", "Number of global constants merged");
 
@@ -37,7 +39,6 @@
 
 Pass *createConstantMergePass() { return new ConstantMerge(); }
 
-
 bool ConstantMerge::run(Module &M) {
   std::map<Constant*, GlobalVariable*> CMap;
   bool MadeChanges = false;
@@ -78,3 +79,5 @@
 
   return MadeChanges;
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
diff -u llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.12 llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.13
--- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.12	Wed Nov  5 15:53:41 2003
+++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp	Tue Nov 11 16:41:33 2003
@@ -30,6 +30,8 @@
 #include "Support/iterator"
 #include <set>
 
+namespace llvm {
+
 namespace {
   Statistic<> NumArgumentsEliminated("deadargelim",
                                      "Number of unread args removed");
@@ -576,3 +578,6 @@
     RemoveDeadArgumentsFromFunction(*DeadRetVal.begin());
   return true;
 }
+
+} // End llvm namespace
+


Index: llvm/lib/Transforms/IPO/DeadTypeElimination.cpp
diff -u llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.46 llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.47
--- llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.46	Sat Nov  8 23:04:25 2003
+++ llvm/lib/Transforms/IPO/DeadTypeElimination.cpp	Tue Nov 11 16:41:33 2003
@@ -19,6 +19,8 @@
 #include "llvm/DerivedTypes.h"
 #include "Support/Statistic.h"
 
+namespace llvm {
+
 namespace {
   struct DTE : public Pass {
     // doPassInitialization - For this pass, it removes global symbol table
@@ -45,7 +47,6 @@
 }
 
 
-
 // ShouldNukeSymtabEntry - Return true if this module level symbol table entry
 // should be eliminated.
 //
@@ -95,3 +96,5 @@
 
   return Changed;
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/ExtractFunction.cpp
diff -u llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.4 llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.5
--- llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.4	Mon Oct 20 14:43:18 2003
+++ llvm/lib/Transforms/IPO/ExtractFunction.cpp	Tue Nov 11 16:41:33 2003
@@ -10,6 +10,8 @@
 #include "llvm/Pass.h"
 #include "llvm/Module.h"
 
+namespace llvm {
+
 namespace {
   class FunctionExtractorPass : public Pass {
     Function *Named;
@@ -90,3 +92,5 @@
 Pass *createFunctionExtractionPass(Function *F) {
   return new FunctionExtractorPass(F);
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/FunctionResolution.cpp
diff -u llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.42 llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.43
--- llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.42	Wed Oct 22 18:03:38 2003
+++ llvm/lib/Transforms/IPO/FunctionResolution.cpp	Tue Nov 11 16:41:33 2003
@@ -29,6 +29,8 @@
 #include "Support/Statistic.h"
 #include <algorithm>
 
+namespace llvm {
+
 namespace {
   Statistic<>NumResolved("funcresolve", "Number of varargs functions resolved");
   Statistic<> NumGlobals("funcresolve", "Number of global variables resolved");
@@ -329,3 +331,5 @@
 
   return Changed;
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/GlobalDCE.cpp
diff -u llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.29 llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.30
--- llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.29	Mon Oct 20 14:43:18 2003
+++ llvm/lib/Transforms/IPO/GlobalDCE.cpp	Tue Nov 11 16:41:33 2003
@@ -22,6 +22,8 @@
 #include "Support/Statistic.h"
 #include <set>
 
+namespace llvm {
+
 namespace {
   Statistic<> NumFunctions("globaldce","Number of functions removed");
   Statistic<> NumVariables("globaldce","Number of global variables removed");
@@ -195,3 +197,5 @@
 
   return true;
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
diff -u llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.3 llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.4
--- llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.3	Mon Oct 27 15:09:00 2003
+++ llvm/lib/Transforms/IPO/IPConstantPropagation.cpp	Tue Nov 11 16:41:33 2003
@@ -22,6 +22,8 @@
 #include "llvm/Support/CallSite.h"
 #include "Support/Statistic.h"
 
+namespace llvm {
+
 namespace {
   Statistic<> NumArgumentsProped("ipconstprop",
                                  "Number of args turned into constants");
@@ -121,3 +123,5 @@
     }
   return MadeChange;
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/InlineSimple.cpp
diff -u llvm/lib/Transforms/IPO/InlineSimple.cpp:1.56 llvm/lib/Transforms/IPO/InlineSimple.cpp:1.57
--- llvm/lib/Transforms/IPO/InlineSimple.cpp:1.56	Mon Oct 20 14:43:18 2003
+++ llvm/lib/Transforms/IPO/InlineSimple.cpp	Tue Nov 11 16:41:33 2003
@@ -17,6 +17,8 @@
 #include "llvm/Support/CallSite.h"
 #include "llvm/Transforms/IPO.h"
 
+namespace llvm {
+
 namespace {
   // FunctionInfo - For each function, calculate the size of it in blocks and
   // instructions.
@@ -114,3 +116,5 @@
   InlineCost += CalleeFI.NumInsts*10 + CalleeFI.NumBlocks*20;
   return InlineCost;
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/Inliner.cpp
diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.4 llvm/lib/Transforms/IPO/Inliner.cpp:1.5
--- llvm/lib/Transforms/IPO/Inliner.cpp:1.4	Sat Nov  8 23:05:36 2003
+++ llvm/lib/Transforms/IPO/Inliner.cpp	Tue Nov 11 16:41:33 2003
@@ -24,6 +24,8 @@
 #include "Support/Debug.h"
 #include "Support/Statistic.h"
 
+namespace llvm {
+
 namespace {
   Statistic<> NumInlined("inline", "Number of functions inlined");
   Statistic<> NumDeleted("inline", "Number of functions deleted because all callers found");
@@ -134,3 +136,5 @@
   }
   return true; 
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/Inliner.h
diff -u llvm/lib/Transforms/IPO/Inliner.h:1.3 llvm/lib/Transforms/IPO/Inliner.h:1.4
--- llvm/lib/Transforms/IPO/Inliner.h:1.3	Sat Nov  8 23:05:36 2003
+++ llvm/lib/Transforms/IPO/Inliner.h	Tue Nov 11 16:41:33 2003
@@ -20,6 +20,9 @@
 #define DEBUG_TYPE "inline"
 #include "llvm/CallGraphSCCPass.h"
 #include <set>
+
+namespace llvm {
+
 class CallSite;
 
 /// Inliner - This class contains all of the helper code which is used to
@@ -61,5 +64,6 @@
   bool performInlining(CallSite CS, std::set<Function*> &SCC);
 };
 
+} // End llvm namespace
 
 #endif


Index: llvm/lib/Transforms/IPO/Internalize.cpp
diff -u llvm/lib/Transforms/IPO/Internalize.cpp:1.19 llvm/lib/Transforms/IPO/Internalize.cpp:1.20
--- llvm/lib/Transforms/IPO/Internalize.cpp:1.19	Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/IPO/Internalize.cpp	Tue Nov 11 16:41:33 2003
@@ -22,6 +22,8 @@
 #include <fstream>
 #include <set>
 
+namespace llvm {
+
 namespace {
   Statistic<> NumFunctions("internalize", "Number of functions internalized");
   Statistic<> NumGlobals  ("internalize", "Number of global vars internalized");
@@ -119,3 +121,5 @@
 Pass *createInternalizePass() {
   return new InternalizePass();
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp
diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.11 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.12
--- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.11	Thu Nov  6 13:18:49 2003
+++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp	Tue Nov 11 16:41:33 2003
@@ -47,6 +47,8 @@
 #include "Support/StringExtras.h"
 #include "Support/VectorExtras.h"
 
+namespace llvm {
+
 namespace {
   Statistic<> LongJmpsTransformed("lowersetjmp",
                                   "Number of longjmps transformed");
@@ -538,3 +540,5 @@
 {
   return new LowerSetJmp();
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/MutateStructTypes.cpp
diff -u llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.42 llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.43
--- llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.42	Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/IPO/MutateStructTypes.cpp	Tue Nov 11 16:41:33 2003
@@ -28,6 +28,8 @@
 #include "Support/Debug.h"
 #include <algorithm>
 
+using namespace llvm;
+
 // ValuePlaceHolder - A stupid little marker value.  It appears as an
 // instruction of type Instruction::UserOp1.
 //


Index: llvm/lib/Transforms/IPO/Parallelize.cpp
diff -u llvm/lib/Transforms/IPO/Parallelize.cpp:1.10 llvm/lib/Transforms/IPO/Parallelize.cpp:1.11
--- llvm/lib/Transforms/IPO/Parallelize.cpp:1.10	Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/IPO/Parallelize.cpp	Tue Nov 11 16:41:33 2003
@@ -53,6 +53,8 @@
 #include <functional>
 #include <algorithm>
 
+namespace llvm {
+
 //---------------------------------------------------------------------------- 
 // Global constants used in marking Cilk functions and function calls.
 //---------------------------------------------------------------------------- 
@@ -535,3 +537,5 @@
 
   return true;
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/PruneEH.cpp
diff -u llvm/lib/Transforms/IPO/PruneEH.cpp:1.5 llvm/lib/Transforms/IPO/PruneEH.cpp:1.6
--- llvm/lib/Transforms/IPO/PruneEH.cpp:1.5	Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/IPO/PruneEH.cpp	Tue Nov 11 16:41:33 2003
@@ -23,6 +23,8 @@
 #include "Support/Statistic.h"
 #include <set>
 
+namespace llvm {
+
 namespace {
   Statistic<> NumRemoved("prune-eh", "Number of invokes removed");
 
@@ -104,3 +106,5 @@
 
   return MadeChange; 
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/RaiseAllocations.cpp
diff -u llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.19 llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.20
--- llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.19	Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/IPO/RaiseAllocations.cpp	Tue Nov 11 16:41:33 2003
@@ -22,6 +22,8 @@
 #include "llvm/Support/CallSite.h"
 #include "Support/Statistic.h"
 
+namespace llvm {
+
 namespace {
   Statistic<> NumRaised("raiseallocs", "Number of allocations raised");
 
@@ -194,3 +196,5 @@
 
   return Changed;
 }
+
+} // End llvm namespace


Index: llvm/lib/Transforms/IPO/SimpleStructMutation.cpp
diff -u llvm/lib/Transforms/IPO/SimpleStructMutation.cpp:1.22 llvm/lib/Transforms/IPO/SimpleStructMutation.cpp:1.23
--- llvm/lib/Transforms/IPO/SimpleStructMutation.cpp:1.22	Mon Oct 20 14:43:19 2003
+++ llvm/lib/Transforms/IPO/SimpleStructMutation.cpp	Tue Nov 11 16:41:33 2003
@@ -23,6 +23,8 @@
 using std::set;
 using std::pair;
 
+namespace llvm {
+
 namespace {
   struct SimpleStructMutation : public MutateStructTypes {
     enum Transform { SwapElements, SortElements };
@@ -188,3 +190,5 @@
   
   return Transforms;
 }
+
+} // End llvm namespace





More information about the llvm-commits mailing list