diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-12 07:10:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-12 07:10:32 +0000 |
commit | 459ccab0021c9688c9a9be384758d0ce9cb5d79f (patch) | |
tree | 4402b010b003b096ce66538d1d7c9a8825eda9e1 | |
parent | 895be4bae2c4f9a2fd2234f0329f618274e67eab (diff) |
Add new getJITStubForFunction method, which may optionally be implemented by
targets for better performance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10429 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetMachine.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index c0771a1746..758feb2088 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -111,12 +111,21 @@ public: /// replaceMachineCodeForFunction - Make it so that calling the /// function whose machine code is at OLD turns into a call to NEW, - /// perhaps by overwriting OLD with a branch to NEW. FIXME: this is - /// JIT-specific. + /// perhaps by overwriting OLD with a branch to NEW. + /// + /// FIXME: this is JIT-specific. /// virtual void replaceMachineCodeForFunction (void *Old, void *New) { assert (0 && "Current target cannot replace machine code for functions"); } + + /// getJITStubForFunction - Create or return a stub for the specified + /// function. This stub acts just like the specified function, except that it + /// allows the "address" of the function to be taken without having to + /// generate code for it. + virtual void *getJITStubForFunction(Function *F, MachineCodeEmitter &MCE) { + return 0; + } }; } // End llvm namespace |