[llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp MachineCodeEmitter.cpp MachineCodeForInstruction.cpp MachineFunction.cpp MachineInstr.cpp MachineInstrAnnot.cpp PHIElimination.cpp Passes.cpp PrologEpilogInserter.cpp RegAllocLocal.cpp RegAllocSimple.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Tue Nov 11 16:44:25 PST 2003


Changes in directory llvm/lib/CodeGen:

LiveVariables.cpp updated: 1.10 -> 1.11
MachineCodeEmitter.cpp updated: 1.13 -> 1.14
MachineCodeForInstruction.cpp updated: 1.8 -> 1.9
MachineFunction.cpp updated: 1.43 -> 1.44
MachineInstr.cpp updated: 1.80 -> 1.81
MachineInstrAnnot.cpp updated: 1.9 -> 1.10
PHIElimination.cpp updated: 1.12 -> 1.13
Passes.cpp updated: 1.2 -> 1.3
PrologEpilogInserter.cpp updated: 1.14 -> 1.15
RegAllocLocal.cpp updated: 1.30 -> 1.31
RegAllocSimple.cpp updated: 1.45 -> 1.46

---
Log message:

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

---
Diffs of the changes:  (+56 -14)

Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.10 llvm/lib/CodeGen/LiveVariables.cpp:1.11
--- llvm/lib/CodeGen/LiveVariables.cpp:1.10	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/LiveVariables.cpp	Tue Nov 11 16:41:32 2003
@@ -33,6 +33,8 @@
 #include "llvm/Support/CFG.h"
 #include "Support/DepthFirstIterator.h"
 
+namespace llvm {
+
 static RegisterAnalysis<LiveVariables> X("livevars", "Live Variable Analysis");
 
 const std::pair<MachineBasicBlock*, unsigned> &
@@ -307,3 +309,5 @@
   
   return false;
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/MachineCodeEmitter.cpp
diff -u llvm/lib/CodeGen/MachineCodeEmitter.cpp:1.13 llvm/lib/CodeGen/MachineCodeEmitter.cpp:1.14
--- llvm/lib/CodeGen/MachineCodeEmitter.cpp:1.13	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/MachineCodeEmitter.cpp	Tue Nov 11 16:41:32 2003
@@ -16,6 +16,8 @@
 #include "llvm/Function.h"
 #include <fstream>
 
+namespace llvm {
+
 namespace {
   struct DebugMachineCodeEmitter : public MachineCodeEmitter {
     void startFunction(MachineFunction &F) {
@@ -54,18 +56,7 @@
       return 0;
     }
   };
-}
-
-
-/// createDebugMachineCodeEmitter - Return a dynamically allocated machine
-/// code emitter, which just prints the opcodes and fields out the cout.  This
-/// can be used for debugging users of the MachineCodeEmitter interface.
-///
-MachineCodeEmitter *MachineCodeEmitter::createDebugEmitter() {
-  return new DebugMachineCodeEmitter();
-}
 
-namespace {
   class FilePrinterEmitter : public MachineCodeEmitter {
     std::ofstream actual;
     std::ostream &o;
@@ -169,7 +160,18 @@
   };
 }
 
+/// createDebugMachineCodeEmitter - Return a dynamically allocated machine
+/// code emitter, which just prints the opcodes and fields out the cout.  This
+/// can be used for debugging users of the MachineCodeEmitter interface.
+///
+MachineCodeEmitter *
+MachineCodeEmitter::createDebugEmitter() {
+  return new DebugMachineCodeEmitter();
+}
+
 MachineCodeEmitter *
 MachineCodeEmitter::createFilePrinterEmitter(MachineCodeEmitter &MCE) {
   return new FilePrinterEmitter(MCE, std::cerr);
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/MachineCodeForInstruction.cpp
diff -u llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.8 llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.9
--- llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.8	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/MachineCodeForInstruction.cpp	Tue Nov 11 16:41:32 2003
@@ -27,6 +27,8 @@
 #include "llvm/CodeGen/MachineInstrAnnot.h"
 #include "llvm/CodeGen/InstrSelection.h"
 
+namespace llvm {
+
 AnnotationID MCFI_AID(
              AnnotationManager::getID("CodeGen::MachineCodeForInstruction"));
 
@@ -68,3 +70,5 @@
   if (callArgsDesc)
     delete callArgsDesc;
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.43 llvm/lib/CodeGen/MachineFunction.cpp:1.44
--- llvm/lib/CodeGen/MachineFunction.cpp:1.43	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/MachineFunction.cpp	Tue Nov 11 16:41:32 2003
@@ -28,6 +28,8 @@
 #include "llvm/Pass.h"
 #include "Config/limits.h"
 
+namespace llvm {
+
 const int INVALID_FRAME_OFFSET = INT_MAX; // std::numeric_limits<int>::max();
 
 static AnnotationID MF_AID(
@@ -414,3 +416,5 @@
   hash_map<const Value*, int>::const_iterator pair = offsets.find(val);
   return (pair == offsets.end()) ? INVALID_FRAME_OFFSET : pair->second;
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.80 llvm/lib/CodeGen/MachineInstr.cpp:1.81
--- llvm/lib/CodeGen/MachineInstr.cpp:1.80	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/MachineInstr.cpp	Tue Nov 11 16:41:32 2003
@@ -16,6 +16,8 @@
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Target/MRegisterInfo.h"
 
+namespace llvm {
+
 // Global variable holding an array of descriptors for machine instructions.
 // The actual object needs to be created separately for each target machine.
 // This variable is initialized and reset by class TargetInstrInfo.
@@ -289,7 +291,7 @@
    // Specialize printing if op#0 is definition
   if (getNumOperands() &&
       (getOperand(0).opIsDefOnly() || getOperand(0).opIsDefAndUse())) {
-    ::print(getOperand(0), OS, TM);
+      llvm::print(getOperand(0), OS, TM);
     OS << " = ";
     ++StartOp;   // Don't print this operand again!
   }
@@ -300,7 +302,7 @@
     if (i != StartOp)
       OS << ",";
     OS << " ";
-    ::print(mop, OS, TM);
+    llvm::print(mop, OS, TM);
     
     if (mop.opIsDefAndUse())
       OS << "<def&use>";
@@ -433,3 +435,5 @@
   
   return OS;
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/MachineInstrAnnot.cpp
diff -u llvm/lib/CodeGen/MachineInstrAnnot.cpp:1.9 llvm/lib/CodeGen/MachineInstrAnnot.cpp:1.10
--- llvm/lib/CodeGen/MachineInstrAnnot.cpp:1.9	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/MachineInstrAnnot.cpp	Tue Nov 11 16:41:32 2003
@@ -18,6 +18,7 @@
 #include "llvm/iOther.h"
 #include "llvm/Type.h"
 
+namespace llvm {
 
 CallArgsDescriptor::CallArgsDescriptor(CallInst* _callInstr,
                                        TmpInstruction* _retAddrReg,
@@ -76,3 +77,5 @@
   assert(desc->getCallInst()==callInstr && "Incorrect call args descriptor?");
   return desc;
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/PHIElimination.cpp
diff -u llvm/lib/CodeGen/PHIElimination.cpp:1.12 llvm/lib/CodeGen/PHIElimination.cpp:1.13
--- llvm/lib/CodeGen/PHIElimination.cpp:1.12	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/PHIElimination.cpp	Tue Nov 11 16:41:32 2003
@@ -21,6 +21,8 @@
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Support/CFG.h"
 
+namespace llvm {
+
 namespace {
   struct PNE : public MachineFunctionPass {
     bool runOnMachineFunction(MachineFunction &Fn) {
@@ -52,6 +54,7 @@
 		      "Eliminate PHI nodes for register allocation");
 }
 
+
 const PassInfo *PHIEliminationID = X.getPassInfo();
 
 /// EliminatePHINodes - Eliminate phi nodes by inserting copy instructions in
@@ -260,3 +263,5 @@
 
   return true;
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/Passes.cpp
diff -u llvm/lib/CodeGen/Passes.cpp:1.2 llvm/lib/CodeGen/Passes.cpp:1.3
--- llvm/lib/CodeGen/Passes.cpp:1.2	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/Passes.cpp	Tue Nov 11 16:41:32 2003
@@ -15,6 +15,8 @@
 #include "llvm/CodeGen/Passes.h"
 #include "Support/CommandLine.h"
 
+namespace llvm {
+
 namespace {
   enum RegAllocName { simple, local };
 
@@ -40,3 +42,5 @@
     return 0; // not reached
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.14 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.15
--- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.14	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/PrologEpilogInserter.cpp	Tue Nov 11 16:41:32 2003
@@ -25,6 +25,8 @@
 #include "llvm/Target/TargetFrameInfo.h"
 #include "llvm/Target/TargetInstrInfo.h"
 
+namespace llvm {
+
 namespace {
   struct PEI : public MachineFunctionPass {
     const char *getPassName() const {
@@ -66,6 +68,7 @@
   };
 }
 
+
 /// createPrologEpilogCodeInserter - This function returns a pass that inserts
 /// prolog and epilog code, and eliminates abstract frame references.
 ///
@@ -258,3 +261,5 @@
 	  break;
 	}
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/RegAllocLocal.cpp
diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.30 llvm/lib/CodeGen/RegAllocLocal.cpp:1.31
--- llvm/lib/CodeGen/RegAllocLocal.cpp:1.30	Fri Oct 24 15:05:58 2003
+++ llvm/lib/CodeGen/RegAllocLocal.cpp	Tue Nov 11 16:41:32 2003
@@ -26,6 +26,8 @@
 #include "Support/Statistic.h"
 #include <iostream>
 
+namespace llvm {
+
 namespace {
   Statistic<> NumSpilled ("ra-local", "Number of registers spilled");
   Statistic<> NumReloaded("ra-local", "Number of registers reloaded");
@@ -203,7 +205,6 @@
   };
 }
 
-
 /// getStackSpaceFor - This allocates space for the specified virtual register
 /// to be held on the stack.
 int RA::getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) {
@@ -674,3 +675,5 @@
 FunctionPass *createLocalRegisterAllocator() {
   return new RA();
 }
+
+} // End llvm namespace


Index: llvm/lib/CodeGen/RegAllocSimple.cpp
diff -u llvm/lib/CodeGen/RegAllocSimple.cpp:1.45 llvm/lib/CodeGen/RegAllocSimple.cpp:1.46
--- llvm/lib/CodeGen/RegAllocSimple.cpp:1.45	Mon Oct 20 14:43:15 2003
+++ llvm/lib/CodeGen/RegAllocSimple.cpp	Tue Nov 11 16:41:32 2003
@@ -26,6 +26,8 @@
 #include "Support/Statistic.h"
 #include <iostream>
 
+namespace llvm {
+
 namespace {
   Statistic<> NumSpilled ("ra-simple", "Number of registers spilled");
   Statistic<> NumReloaded("ra-simple", "Number of registers reloaded");
@@ -234,3 +236,5 @@
 FunctionPass *createSimpleRegisterAllocator() {
   return new RegAllocSimple();
 }
+
+} // End llvm namespace





More information about the llvm-commits mailing list