[llvm-commits] CVS: reopt/include/reopt/CFG.h GetTraceTime.h InstrUtils.h MappingInfo.h MemoryManager.h TraceCache.h VirtualMem.h
Brian Gaeke
gaeke at cs.uiuc.edu
Wed Nov 19 16:53:32 PST 2003
Changes in directory reopt/include/reopt:
CFG.h updated: 1.2 -> 1.3
GetTraceTime.h updated: 1.5 -> 1.6
InstrUtils.h updated: 1.9 -> 1.10
MappingInfo.h updated: 1.10 -> 1.11
MemoryManager.h updated: 1.5 -> 1.6
TraceCache.h updated: 1.16 -> 1.17
VirtualMem.h updated: 1.11 -> 1.12
---
Log message:
Put reoptimizer code into 'llvm' namespace.
Other minor cleanups.
---
Diffs of the changes: (+31 -5)
Index: reopt/include/reopt/CFG.h
diff -u reopt/include/reopt/CFG.h:1.2 reopt/include/reopt/CFG.h:1.3
--- reopt/include/reopt/CFG.h:1.2 Fri Aug 22 12:43:33 2003
+++ reopt/include/reopt/CFG.h Wed Nov 19 16:51:41 2003
@@ -11,6 +11,8 @@
#include <vector>
#include <set>
+namespace llvm {
+
struct CFG_Node{
uint64_t start;
uint64_t end;
@@ -33,5 +35,7 @@
std::set<CFG_Node *> allNodes; //for efficient lookup
std::vector<CFG_Node *> nodes;
};
+
+} // end namespace llvm
#endif
Index: reopt/include/reopt/GetTraceTime.h
diff -u reopt/include/reopt/GetTraceTime.h:1.5 reopt/include/reopt/GetTraceTime.h:1.6
--- reopt/include/reopt/GetTraceTime.h:1.5 Fri Aug 22 12:43:33 2003
+++ reopt/include/reopt/GetTraceTime.h Wed Nov 19 16:51:41 2003
@@ -10,10 +10,11 @@
#ifndef LLVM_REOPTIMIZER_TRACECACHE_GETTRACETIME_H
#define LLVM_REOPTIMIZER_TRACECACHE_GETTRACETIME_H
+namespace llvm {
+
#ifdef __sparc
//#define EXIT_CHECK
-
//#define GET_TRACE_TIME
//#define MAP_TIME
//#define READER_TIME
@@ -25,12 +26,13 @@
extern "C" void llvm_time_end();
#endif
-
#ifdef GET_TRIGGER_TIME
void llvm_trigger_time_start();
void llvm_trigger_time_end();
#endif
#endif
+
+} // end namespace llvm
#endif
Index: reopt/include/reopt/InstrUtils.h
diff -u reopt/include/reopt/InstrUtils.h:1.9 reopt/include/reopt/InstrUtils.h:1.10
--- reopt/include/reopt/InstrUtils.h:1.9 Mon Oct 27 13:00:59 2003
+++ reopt/include/reopt/InstrUtils.h Wed Nov 19 16:51:41 2003
@@ -12,6 +12,8 @@
#include "Support/DataTypes.h"
#include <algorithm>
+namespace llvm {
+
#define BRANCH_ALWAYS 0x10800000
#define CALL 0x40000000
#define NOP 0x01000000
@@ -27,10 +29,9 @@
uint64_t getDepJmpTarget(unsigned int y, uint64_t oldAdd);
unsigned int getDepJumpInstr(unsigned int a, uint64_t to, uint64_t pc);
-
bool isCallInstr(unsigned int a);
uint64_t getCallTarget(unsigned int y, uint64_t oldAdd);
-unsigned int getCallInstr(uint64_t to , uint64_t pc);
+unsigned int getCallInstr(uint64_t to, uint64_t pc);
bool isBranchAlways(unsigned int b);
bool isBranchNever(unsigned int b);
@@ -38,7 +39,6 @@
//BPR: (b&(2^22+2^23+2^24) == (2^22+2^23)
bool isBPR(unsigned int b);
uint64_t getBPRTarget(unsigned int b, uint64_t oldAdd);
-
unsigned int getBPRInstr(unsigned int b, uint64_t to, uint64_t frm);
bool isBranchInstr(unsigned int y);
@@ -50,4 +50,7 @@
bool isIndirectCall(unsigned instr);
bool isReturn(unsigned int inst);
+
+} // end namespace llvm
+
#endif
Index: reopt/include/reopt/MappingInfo.h
diff -u reopt/include/reopt/MappingInfo.h:1.10 reopt/include/reopt/MappingInfo.h:1.11
--- reopt/include/reopt/MappingInfo.h:1.10 Sat Nov 8 12:14:13 2003
+++ reopt/include/reopt/MappingInfo.h Wed Nov 19 16:51:42 2003
@@ -12,6 +12,9 @@
#include "Support/DataTypes.h"
#include <vector>
+
+namespace llvm {
+
class Instruction;
class BasicBlock;
class Module;
@@ -56,5 +59,7 @@
/// function.
///
Function *getRevFunction(Module *M, uint64_t addr);
+
+} // end namespace llvm
#endif // REOPT_MAPPINGINFO_H
Index: reopt/include/reopt/MemoryManager.h
diff -u reopt/include/reopt/MemoryManager.h:1.5 reopt/include/reopt/MemoryManager.h:1.6
--- reopt/include/reopt/MemoryManager.h:1.5 Fri Aug 22 12:43:34 2003
+++ reopt/include/reopt/MemoryManager.h Wed Nov 19 16:51:42 2003
@@ -29,6 +29,8 @@
#include "Support/DataTypes.h"
#include <list>
+namespace llvm {
+
static const int globalMemSize = 10000;
class MemoryManager{
@@ -52,5 +54,7 @@
uint64_t getMemory(int sz); //return a pointer to memory of size sz
void freeTraceMemory(uint64_t toRemove, int size);//size is no if instructions
};
+
+} // end namespace llvm
#endif // REOPT_MEMORYMANAGER_H
Index: reopt/include/reopt/TraceCache.h
diff -u reopt/include/reopt/TraceCache.h:1.16 reopt/include/reopt/TraceCache.h:1.17
--- reopt/include/reopt/TraceCache.h:1.16 Mon Oct 27 13:01:07 2003
+++ reopt/include/reopt/TraceCache.h Wed Nov 19 16:51:42 2003
@@ -14,6 +14,8 @@
#include <list>
#include <utility>
+namespace llvm {
+
class VirtualMem;
class MemoryManager;
@@ -139,5 +141,7 @@
VirtualMem *vm;
MemoryManager *mm;
};
+
+} // end namespace llvm
#endif // REOPT_TRACECACHE_H
Index: reopt/include/reopt/VirtualMem.h
diff -u reopt/include/reopt/VirtualMem.h:1.11 reopt/include/reopt/VirtualMem.h:1.12
--- reopt/include/reopt/VirtualMem.h:1.11 Fri Oct 10 14:12:34 2003
+++ reopt/include/reopt/VirtualMem.h Wed Nov 19 16:51:42 2003
@@ -16,6 +16,8 @@
#include <map>
#include "reopt/GetTraceTime.h"
+namespace llvm {
+
class TraceCache;
class VirtualMem {
@@ -50,5 +52,7 @@
unsigned int getInvertedBranch(unsigned int br1);
};
+
+} // end namespace llvm
#endif // REOPT_VIRTUALMEM_H
More information about the llvm-commits
mailing list