From: Chris Lattner Date: Sun, 28 Dec 2003 09:48:17 +0000 (+0000) Subject: We may now pass IntrinsicLowering implementations into these methods X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cd824d7678785379a4a11fd7e3099cc44b37db41;p=oota-llvm.git We may now pass IntrinsicLowering implementations into these methods git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10630 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index c376ef71b7e..cf010084b70 100644 --- a/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -30,6 +30,7 @@ class Module; class ModuleProvider; class TargetData; class Type; +class IntrinsicLowering; class ExecutionEngine { Module &CurMod; @@ -54,8 +55,10 @@ public: const TargetData &getTargetData() const { return *TD; } /// create - This is the factory method for creating an execution engine which - /// is appropriate for the current machine. - static ExecutionEngine *create(ModuleProvider *MP, bool ForceInterpreter); + /// is appropriate for the current machine. If specified, the + /// IntrinsicLowering implementation should be allocated on the heap. + static ExecutionEngine *create(ModuleProvider *MP, bool ForceInterpreter, + IntrinsicLowering *IL = 0); /// runFunction - Execute the specified function with the specified arguments, /// and return the result. diff --git a/include/llvm/Target/TargetMachineImpls.h b/include/llvm/Target/TargetMachineImpls.h index 3ca20c74e99..6ed4152767e 100644 --- a/include/llvm/Target/TargetMachineImpls.h +++ b/include/llvm/Target/TargetMachineImpls.h @@ -17,21 +17,25 @@ namespace llvm { -class TargetMachine; -class Module; - -// allocateSparcTargetMachine - Allocate and return a subclass of TargetMachine -// that implements the Sparc backend. -// -TargetMachine *allocateSparcTargetMachine(const Module &M); - -// allocateX86TargetMachine - Allocate and return a subclass of TargetMachine -// that implements the X86 backend. The X86 target machine can run in -// "emulation" mode, where it is capable of emulating machines of larger pointer -// size and different endianness if desired. -// -TargetMachine *allocateX86TargetMachine(const Module &M); - + class TargetMachine; + class Module; + class IntrinsicLowering; + + // allocateSparcTargetMachine - Allocate and return a subclass of + // TargetMachine that implements the Sparc backend. This takes ownership of + // the IntrinsicLowering pointer, deleting it when the target machine is + // destroyed. + // + TargetMachine *allocateSparcTargetMachine(const Module &M, + IntrinsicLowering *IL = 0); + + // allocateX86TargetMachine - Allocate and return a subclass of TargetMachine + // that implements the X86 backend. This takes ownership of the + // IntrinsicLowering pointer, deleting it when the target machine is + // destroyed. + // + TargetMachine *allocateX86TargetMachine(const Module &M, + IntrinsicLowering *IL = 0); } // End llvm namespace #endif