LLVM API Documentation

PPCJITInfo.h

Go to the documentation of this file.
00001 //===- PPCJITInfo.h - PowerPC impl. of the JIT interface --------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the LLVM research group and is distributed under
00006 // the University of Illinois Open Source License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file contains the PowerPC implementation of the TargetJITInfo class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef POWERPC_JITINFO_H
00015 #define POWERPC_JITINFO_H
00016 
00017 #include "llvm/Target/TargetJITInfo.h"
00018 
00019 namespace llvm {
00020   class PPCTargetMachine;
00021 
00022   class PPCJITInfo : public TargetJITInfo {
00023   protected:
00024     PPCTargetMachine &TM;
00025   public:
00026     PPCJITInfo(PPCTargetMachine &tm) : TM(tm) {useGOT = 0;}
00027 
00028     /// addPassesToJITCompile - Add passes to the specified pass manager to
00029     /// implement a fast dynamic compiler for this target.  Return true if this
00030     /// is not supported for this target.
00031     ///
00032     virtual void addPassesToJITCompile(FunctionPassManager &PM);
00033 
00034     virtual void *emitFunctionStub(void *Fn, MachineCodeEmitter &MCE);
00035     virtual LazyResolverFn getLazyResolverFunction(JITCompilerFn);
00036     virtual void relocate(void *Function, MachineRelocation *MR,
00037                           unsigned NumRelocs, unsigned char* GOTBase);
00038     
00039     /// replaceMachineCodeForFunction - Make it so that calling the function
00040     /// whose machine code is at OLD turns into a call to NEW, perhaps by
00041     /// overwriting OLD with a branch to NEW.  This is used for self-modifying
00042     /// code.
00043     ///
00044     virtual void replaceMachineCodeForFunction(void *Old, void *New);
00045   };
00046 }
00047 
00048 #endif