summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-22 23:07:22 +0000
committerChris Lattner <sabre@nondot.org>2004-11-22 23:07:22 +0000
commit69e4cc55ef552988935e2643d71d0c5443a748ac (patch)
tree816436dbcb38af718108ac239c9e0a6d16ea584d /llvm/lib
parent40565d72d4b5723629fd3207dfbc1afc054928be (diff)
downloadbcm5719-llvm-69e4cc55ef552988935e2643d71d0c5443a748ac.tar.gz
bcm5719-llvm-69e4cc55ef552988935e2643d71d0c5443a748ac.zip
Remove some dead code
llvm-svn: 18136
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/PowerPC/PPC32CodeEmitter.cpp76
1 files changed, 0 insertions, 76 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC32CodeEmitter.cpp b/llvm/lib/Target/PowerPC/PPC32CodeEmitter.cpp
index 31a603d53b6..57f30c53bdc 100644
--- a/llvm/lib/Target/PowerPC/PPC32CodeEmitter.cpp
+++ b/llvm/lib/Target/PowerPC/PPC32CodeEmitter.cpp
@@ -24,82 +24,6 @@
using namespace llvm;
namespace {
- class JITResolver {
- MachineCodeEmitter &MCE;
-
- // LazyCodeGenMap - Keep track of call sites for functions that are to be
- // lazily resolved.
- std::map<unsigned, Function*> LazyCodeGenMap;
-
- // LazyResolverMap - Keep track of the lazy resolver created for a
- // particular function so that we can reuse them if necessary.
- std::map<Function*, unsigned> LazyResolverMap;
-
- public:
- JITResolver(MachineCodeEmitter &mce) : MCE(mce) {}
- unsigned getLazyResolver(Function *F);
- unsigned addFunctionReference(unsigned Address, Function *F);
-
- private:
- unsigned emitStubForFunction(Function *F);
- static void CompilationCallback();
- unsigned resolveFunctionReference(unsigned RetAddr);
- };
-
- static JITResolver &getResolver(MachineCodeEmitter &MCE) {
- static JITResolver *TheJITResolver = 0;
- if (TheJITResolver == 0)
- TheJITResolver = new JITResolver(MCE);
- return *TheJITResolver;
- }
-}
-
-unsigned JITResolver::getLazyResolver(Function *F) {
- std::map<Function*, unsigned>::iterator I = LazyResolverMap.lower_bound(F);
- if (I != LazyResolverMap.end() && I->first == F) return I->second;
-
- unsigned Stub = emitStubForFunction(F);
- LazyResolverMap.insert(I, std::make_pair(F, Stub));
- return Stub;
-}
-
-/// addFunctionReference - This method is called when we need to emit the
-/// address of a function that has not yet been emitted, so we don't know the
-/// address. Instead, we emit a call to the CompilationCallback method, and
-/// keep track of where we are.
-///
-unsigned JITResolver::addFunctionReference(unsigned Address, Function *F) {
- LazyCodeGenMap[Address] = F;
- return (intptr_t)&JITResolver::CompilationCallback;
-}
-
-unsigned JITResolver::resolveFunctionReference(unsigned RetAddr) {
- std::map<unsigned, Function*>::iterator I = LazyCodeGenMap.find(RetAddr);
- assert(I != LazyCodeGenMap.end() && "Not in map!");
- Function *F = I->second;
- LazyCodeGenMap.erase(I);
- // FIXME: this needs to be rewritten.
- return 0; //MCE.forceCompilationOf(F);
-}
-
-/// emitStubForFunction - This method is used by the JIT when it needs to emit
-/// the address of a function for a function whose code has not yet been
-/// generated. In order to do this, it generates a stub which jumps to the lazy
-/// function compiler, which will eventually get fixed to call the function
-/// directly.
-///
-unsigned JITResolver::emitStubForFunction(Function *F) {
- std::cerr << "PPC32CodeEmitter::emitStubForFunction() unimplemented!\n";
- abort();
- return 0;
-}
-
-void JITResolver::CompilationCallback() {
- std::cerr << "PPC32CodeEmitter: CompilationCallback() unimplemented!";
- abort();
-}
-
-namespace {
class PPC32CodeEmitter : public MachineFunctionPass {
TargetMachine &TM;
MachineCodeEmitter &MCE;
OpenPOWER on IntegriCloud