[llvm-commits] CVS: reopt/include/reopt/BinInterface/LLVMTrace.h analyze.h bitmath.h regmask.h sparc9.h sparcbin.h sparcdis.h sparcpriv.h

Brian Gaeke gaeke at cs.uiuc.edu
Wed Nov 19 16:53:26 CST 2003


Changes in directory reopt/include/reopt/BinInterface:

LLVMTrace.h updated: 1.3 -> 1.4
analyze.h updated: 1.2 -> 1.3
bitmath.h updated: 1.12 -> 1.13
regmask.h updated: 1.5 -> 1.6
sparc9.h updated: 1.16 -> 1.17
sparcbin.h updated: 1.7 -> 1.8
sparcdis.h updated: 1.8 -> 1.9
sparcpriv.h updated: 1.4 -> 1.5

---
Log message:

Put reoptimizer code into 'llvm' namespace.
Other minor cleanups.


---
Diffs of the changes:  (+39 -17)

Index: reopt/include/reopt/BinInterface/LLVMTrace.h
diff -u reopt/include/reopt/BinInterface/LLVMTrace.h:1.3 reopt/include/reopt/BinInterface/LLVMTrace.h:1.4
--- reopt/include/reopt/BinInterface/LLVMTrace.h:1.3	Fri Aug 22 12:43:35 2003
+++ reopt/include/reopt/BinInterface/LLVMTrace.h	Wed Nov 19 16:51:43 2003
@@ -10,13 +10,15 @@
 #include<map>
 #include<vector>
 
+namespace llvm {
+
 class BinInterface;
 class TraceCache;
 class VirtualMem;
 class Instruction;
 class BasicBlock;
 
-class LLVMTrace{
+class LLVMTrace {
 private:
   //LLVM instr to cids
   std::map<Instruction *, std::vector<unsigned int> > InstrToCid;
@@ -87,5 +89,7 @@
   void moveInstrBefore(Instruction *I, unsigned int cid);
 
 };
+
+} // end namespace llvm
 
 #endif // REOPT_BININTERFACE_LLVMTRACE_H


Index: reopt/include/reopt/BinInterface/analyze.h
diff -u reopt/include/reopt/BinInterface/analyze.h:1.2 reopt/include/reopt/BinInterface/analyze.h:1.3
--- reopt/include/reopt/BinInterface/analyze.h:1.2	Fri Aug 22 12:43:35 2003
+++ reopt/include/reopt/BinInterface/analyze.h	Wed Nov 19 16:51:43 2003
@@ -15,7 +15,9 @@
 #ifndef REOPT_BININTERFACE_ANALYZE_H
 #define REOPT_BININTERFACE_ANALYZE_H
 
-#include "sparcpriv.h"
+#include "reopt/BinInterface/sparcpriv.h"
+
+namespace llvm {
 
 #define IF_RS1   0x001			// Presence of RS1 field in instruction
 #define IF_RS2   0x002			// Presence of RS2 field in instruction
@@ -34,9 +36,6 @@
 
 #define IF_RS1_RS2_DEFINED IF_USR //for adding one ALU instruction
 
-
-
-
 /*
     Important NOTE!
     
@@ -45,7 +44,6 @@
     analysis.  IF_RS1, IF_RS2, and IF_RD are set independantly of whether
     their respective register is 0 HOWEVER the read/write flags before are
     turned off if their respective register is 0.
-
 */
 
 //check if its a floating point instruction
@@ -66,5 +64,6 @@
 unsigned sparc_setbrdest(unsigned instr, signed reladdr);
 signed sparc_getbrdest(unsigned instr);
 
-#endif // REOPT_BININTERFACE_ANALYZE_H
+} // end namespace llvm
 
+#endif // REOPT_BININTERFACE_ANALYZE_H


Index: reopt/include/reopt/BinInterface/bitmath.h
diff -u reopt/include/reopt/BinInterface/bitmath.h:1.12 reopt/include/reopt/BinInterface/bitmath.h:1.13
--- reopt/include/reopt/BinInterface/bitmath.h:1.12	Fri Aug 22 12:43:35 2003
+++ reopt/include/reopt/BinInterface/bitmath.h	Wed Nov 19 16:51:43 2003
@@ -18,6 +18,8 @@
 
 #include "Support/DataTypes.h"
 
+namespace llvm {
+
 //*********************************
 //	Misc functions
 //*********************************
@@ -135,5 +137,7 @@
 static unsigned HIGH22(unsigned value)   { return value >> 10;              }
 static unsigned HIGHWORD(uint64_t value) { return (unsigned) (value >> 32); }
 static unsigned LOWWORD(uint64_t value)  { return (unsigned) value;         }
+
+} // end namespace llvm
 
 #endif // REOPT_BININTERFACE_BITMATH_H


Index: reopt/include/reopt/BinInterface/regmask.h
diff -u reopt/include/reopt/BinInterface/regmask.h:1.5 reopt/include/reopt/BinInterface/regmask.h:1.6
--- reopt/include/reopt/BinInterface/regmask.h:1.5	Sat Sep 13 16:12:02 2003
+++ reopt/include/reopt/BinInterface/regmask.h	Wed Nov 19 16:51:43 2003
@@ -13,12 +13,14 @@
 #include <vector>
 #include <iostream>
 
+using std::vector;
+
+namespace llvm {
+
 #define VREG_ISMEM(x) (x >= 32)
 #define VREG_ISREG(x) (x <  32)
 #define VREG_GETMEM(x) ((x-32) * 8)
 
-using std::vector;
-
 class regmask32
 {
    private:
@@ -159,5 +161,6 @@
       }
 };
 
-#endif // REOPT_BININTERFACE_REGMASK_H
+} // end namespace llvm
 
+#endif // REOPT_BININTERFACE_REGMASK_H


Index: reopt/include/reopt/BinInterface/sparc9.h
diff -u reopt/include/reopt/BinInterface/sparc9.h:1.16 reopt/include/reopt/BinInterface/sparc9.h:1.17
--- reopt/include/reopt/BinInterface/sparc9.h:1.16	Fri Aug 22 12:43:36 2003
+++ reopt/include/reopt/BinInterface/sparc9.h	Wed Nov 19 16:51:43 2003
@@ -7,6 +7,8 @@
 #ifndef REOPT_BININTERFACE_SPARC9_H
 #define REOPT_BININTERFACE_SPARC9_H
 
+namespace llvm {
+
 //*****************************************************************************
 //    Register Names
 //*****************************************************************************
@@ -541,5 +543,7 @@
    MK_FLD(INSTR_RS1, sreg)        |         \
    MK_FLD(INSTR_I, 1)             |         \
    MK_FLD(INSTR_SIMM13, imm))
+
+} // end namespace llvm
 
 #endif // REOPT_BININTERFACE_SPARC9_H


Index: reopt/include/reopt/BinInterface/sparcbin.h
diff -u reopt/include/reopt/BinInterface/sparcbin.h:1.7 reopt/include/reopt/BinInterface/sparcbin.h:1.8
--- reopt/include/reopt/BinInterface/sparcbin.h:1.7	Sat Sep 13 16:12:02 2003
+++ reopt/include/reopt/BinInterface/sparcbin.h	Wed Nov 19 16:51:44 2003
@@ -14,14 +14,16 @@
 #include "reopt/VirtualMem.h"
 #include "reopt/TraceCache.h"
 #include "reopt/InstrUtils.h"
-#include "analyze.h"
-#include "sparcpriv.h"
+#include "reopt/BinInterface/analyze.h"
+#include "reopt/BinInterface/sparcpriv.h"
 #include <cassert>
 #include <map>
 #include <vector>
 
 using std::vector;
 
+namespace llvm {
+
 struct vreginfo;
 struct regmask;
 struct regmask32;
@@ -29,7 +31,6 @@
 struct regalloc;
 struct shufflepair;
 
-
 static const unsigned SECTION_PROLOG =0;
 static const unsigned SECTION_TRACE  =1;
 
@@ -275,5 +276,8 @@
       BinInterface(unsigned heapsize, VirtualMem *vmem, TraceCache *trc);
       ~BinInterface();
 };
+
+} // end namespace llvm
+
 #endif // REOPT_BININTERFACE_SPARCBIN_H
 


Index: reopt/include/reopt/BinInterface/sparcdis.h
diff -u reopt/include/reopt/BinInterface/sparcdis.h:1.8 reopt/include/reopt/BinInterface/sparcdis.h:1.9
--- reopt/include/reopt/BinInterface/sparcdis.h:1.8	Fri Aug 22 12:43:36 2003
+++ reopt/include/reopt/BinInterface/sparcdis.h	Wed Nov 19 16:51:44 2003
@@ -20,6 +20,8 @@
 #ifndef REOPT_BININTERFACE_SPARCDIS_H
 #define REOPT_BININTERFACE_SPARCDIS_H
 
+namespace llvm {
+
 // Conventional Disassembly.  Prints instruction (no newline)
 void sparc_print(unsigned instr);
 
@@ -28,5 +30,7 @@
 //  gen labels for the parameter sources
 //  instead of printing rxx for rs1, it will print l__labelrs1__
 void sparc_print_pseudo(unsigned instr, int labelrs1, int labelrs2, int labelrd, int labelccf);
+
+} // end namespace llvm
 
 #endif // REOPT_BININTERFACE_SPARCDIS_H


Index: reopt/include/reopt/BinInterface/sparcpriv.h
diff -u reopt/include/reopt/BinInterface/sparcpriv.h:1.4 reopt/include/reopt/BinInterface/sparcpriv.h:1.5
--- reopt/include/reopt/BinInterface/sparcpriv.h:1.4	Fri Aug 22 12:43:36 2003
+++ reopt/include/reopt/BinInterface/sparcpriv.h	Wed Nov 19 16:51:44 2003
@@ -10,6 +10,8 @@
 #include <vector>
 using std::vector;
 
+namespace llvm {
+
 //
 //  Instruction flag definitions
 //
@@ -20,12 +22,9 @@
 #define IF_BRINTERNAL   (IF_USR << 6)  // is this an INTERNAL branch 
 #define IF_LIVEOUT      (IF_USR << 7)  // this instruction is liveout?
 
-
-
 // a call instruction will spill all the outgoing registers O0->O7 (R8-R15)
 #define R_CALLSPILLS  0x0000FF00
 
-
 // a mask of registers that if a trace
 // reads/writes to we IGNORE dataflow
 // implications (stack register and null register)
@@ -44,7 +43,6 @@
    int      mreg;       // mreg mapped to (use VREG_ISMEM/VREG_ISREG)
 };
 
-
 // This is the data passed back from the register allocator
 struct regalloc
 {
@@ -111,5 +109,7 @@
     } regshuffle;
   };
 };
+
+} // end namespace llvm
 
 #endif // REOPT_BININTERFACE_SPARCPRIV_H





More information about the llvm-commits mailing list