aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCJITInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-26 20:25:17 +0000
committerChris Lattner <sabre@nondot.org>2004-11-26 20:25:17 +0000
commit15ee8adb00535834ad7962939868b4a9583577ca (patch)
tree96c32ee0b70bec47fa6bf43d67ca5b70b7c5fea4 /lib/Target/PowerPC/PPCJITInfo.cpp
parent4e61676b568e6a30759d08073d174a0694dfea00 (diff)
downloadexternal_llvm-15ee8adb00535834ad7962939868b4a9583577ca.zip
external_llvm-15ee8adb00535834ad7962939868b4a9583577ca.tar.gz
external_llvm-15ee8adb00535834ad7962939868b4a9583577ca.tar.bz2
There is no reason to store <x,x>, just store <x>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCJITInfo.cpp')
-rw-r--r--lib/Target/PowerPC/PPCJITInfo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Target/PowerPC/PPCJITInfo.cpp b/lib/Target/PowerPC/PPCJITInfo.cpp
index a41385b..7c150bf 100644
--- a/lib/Target/PowerPC/PPCJITInfo.cpp
+++ b/lib/Target/PowerPC/PPCJITInfo.cpp
@@ -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 @@ void PPC32JITInfo::relocate(void *Function, MachineRelocation *MR,
// 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