[llvm-commits] CVS: llvm/include/llvm/Target/TargetMachine.h

Chris Lattner lattner at cs.uiuc.edu
Fri Dec 12 01:11:01 PST 2003


Changes in directory llvm/include/llvm/Target:

TargetMachine.h updated: 1.39 -> 1.40

---
Log message:

Add new getJITStubForFunction method, which may optionally be implemented by
targets for better performance.


---
Diffs of the changes:  (+11 -2)

Index: llvm/include/llvm/Target/TargetMachine.h
diff -u llvm/include/llvm/Target/TargetMachine.h:1.39 llvm/include/llvm/Target/TargetMachine.h:1.40
--- llvm/include/llvm/Target/TargetMachine.h:1.39	Tue Nov 11 16:41:31 2003
+++ llvm/include/llvm/Target/TargetMachine.h	Fri Dec 12 01:10:32 2003
@@ -111,11 +111,20 @@
 
   /// 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;
   }
 };
 





More information about the llvm-commits mailing list