[llvm-commits] CVS: llvm/lib/Reoptimizer/TraceCache/MemoryManager2.cpp

Anand Shukla ashukla at cs.uiuc.edu
Wed Feb 19 13:20:01 PST 2003


Changes in directory llvm/lib/Reoptimizer/TraceCache:

MemoryManager2.cpp updated: 1.1 -> 1.2

---
Log message:

corrected for compilation warnings

---
Diffs of the changes:

Index: llvm/lib/Reoptimizer/TraceCache/MemoryManager2.cpp
diff -u llvm/lib/Reoptimizer/TraceCache/MemoryManager2.cpp:1.1 llvm/lib/Reoptimizer/TraceCache/MemoryManager2.cpp:1.2
--- llvm/lib/Reoptimizer/TraceCache/MemoryManager2.cpp:1.1	Mon Feb 17 13:51:00 2003
+++ llvm/lib/Reoptimizer/TraceCache/MemoryManager2.cpp	Wed Feb 19 13:19:17 2003
@@ -32,8 +32,8 @@
 int dummyFunction2(int i); //the function that provides memory!
 
 MemoryManager2::MemoryManager2(){
-  memStart = (uint64_t)&dummyFunction2;
-  memEnd = (uint64_t)&dummyFunction2+globalMemSize2*4;
+  memStart = (uint64_t)(intptr_t)&dummyFunction2;
+  memEnd = (uint64_t)(intptr_t)&dummyFunction2+globalMemSize2*4;
   //std::cerr<<"Dummy address :"<<(void *)memStart<<"\n";
   freeMemList.push_back(std::make_pair(memStart, memEnd));
 }
@@ -49,11 +49,11 @@
   for(std::list<std::pair<uint64_t, uint64_t> >::iterator LI =
         freeMemList.begin(), LE = freeMemList.end(); LI!=LE; ++LI){
 
-    if(LI->second - LI->first >= sz-1){
+    if(LI->second - LI->first >= (uint64_t)(sz-1)){
       uint64_t temp = LI->first;
 
       //reassign the pair
-      if(LI->second - LI->first == sz-1)
+      if(LI->second - LI->first == (uint64_t)(sz-1))
         freeMemList.erase(LI);
       else
         LI->first += sz;





More information about the llvm-commits mailing list