[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32JITInfo.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Nov 26 12:25:32 PST 2004



Changes in directory llvm/lib/Target/PowerPC:

PPC32JITInfo.cpp updated: 1.11 -> 1.12
---
Log message:

There is no reason to store <x,x>, just store <x>.


---
Diffs of the changes:  (+3 -5)

Index: llvm/lib/Target/PowerPC/PPC32JITInfo.cpp
diff -u llvm/lib/Target/PowerPC/PPC32JITInfo.cpp:1.11 llvm/lib/Target/PowerPC/PPC32JITInfo.cpp:1.12
--- llvm/lib/Target/PowerPC/PPC32JITInfo.cpp:1.11	Thu Nov 25 00:14:45 2004
+++ llvm/lib/Target/PowerPC/PPC32JITInfo.cpp	Fri Nov 26 14:25:17 2004
@@ -16,7 +16,7 @@
 #include "PPC32Relocations.h"
 #include "llvm/CodeGen/MachineCodeEmitter.h"
 #include "llvm/Config/alloca.h"
-#include <map>
+#include <set>
 using namespace llvm;
 
 static TargetJITInfo::JITCompilerFn JITCompilerFunction;
@@ -210,10 +210,8 @@
       // the pointer is relocated into instructions instead of the pointer
       // itself.  Because we have to keep the mapping anyway, we just return
       // pointers to the values in the map as our new location.
-      static std::map<void*,void*> Pointers;
-      void *&Ptr = Pointers[(void*)ResultPtr];
-      Ptr = (void*)ResultPtr;
-      ResultPtr = (intptr_t)&Ptr;
+      static std::set<void*> Pointers;
+      ResultPtr = (intptr_t)&*Pointers.insert((void*)ResultPtr).first;
     }
       // FALL THROUGH
     case PPC::reloc_absolute_high:     // high bits of ref -> low 16 of instr






More information about the llvm-commits mailing list