[llvm-commits] CVS: reopt/lib/TraceCache/TraceCache.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Jul 8 03:04:06 PDT 2004
Changes in directory reopt/lib/TraceCache:
TraceCache.cpp updated: 1.21 -> 1.22
---
Log message:
isLimitSet is always dynamically true. So get rid of it.
---
Diffs of the changes: (+4 -6)
Index: reopt/lib/TraceCache/TraceCache.cpp
diff -u reopt/lib/TraceCache/TraceCache.cpp:1.21 reopt/lib/TraceCache/TraceCache.cpp:1.22
--- reopt/lib/TraceCache/TraceCache.cpp:1.21 Thu Jul 8 02:14:16 2004
+++ reopt/lib/TraceCache/TraceCache.cpp Thu Jul 8 03:03:26 2004
@@ -24,7 +24,6 @@
void TraceCache::init (int limitSize) {
assert (limitSize <= mm->getMemSize () && "can't allocate this large space");
limit = limitSize;
- isLimitSet = true;
currSize = 0;
}
@@ -54,7 +53,6 @@
}
void TraceCache::setLimit(int n) {
- assert(isLimitSet && "can't chage limit, if not set initially");
assert(currSize < n && "trying to set to a smaller limit than current size");
limit = n;
}
@@ -118,7 +116,7 @@
sz += 8;
}
- while(isLimitSet && currSize+sz>limit){
+ while(currSize+sz>limit){
//assert(0 && "out of space");
@@ -270,7 +268,7 @@
int sz = trace.size();
- while(isLimitSet && currSize+sz>limit){
+ while(currSize+sz>limit){
if(currSize == 0)
return false;
@@ -348,7 +346,7 @@
if(hasTraceAddr(instAddr))
removeTrace(instAddr);
- while(isLimitSet && currSize+sz>limit){
+ while(currSize+sz>limit){
if(currSize == 0)
return false;
@@ -430,7 +428,7 @@
sz = sz + 8;
}
- while(isLimitSet && currSize+sz>limit){
+ while(currSize+sz>limit){
//assert(0 && "Can't allocate more mem!");
More information about the llvm-commits
mailing list