summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-12 07:10:32 +0000
committerChris Lattner <sabre@nondot.org>2003-12-12 07:10:32 +0000
commit538dffd9fa4bf625d2dadf698e18e4c1b2771bc0 (patch)
treec0ef8d00f7f8617f15112f9324dcbdbb8144bd50
parentfa41ea33970920611860ad289613018f8af3ca7a (diff)
downloadllvm-538dffd9fa4bf625d2dadf698e18e4c1b2771bc0.tar.gz
Add new getJITStubForFunction method, which may optionally be implemented by
targets for better performance. llvm-svn: 10429
-rw-r--r--llvm/include/llvm/Target/TargetMachine.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h
index c0771a17468f..758feb2088e1 100644
--- a/llvm/include/llvm/Target/TargetMachine.h
+++ b/llvm/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