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

Duraid Madina duraid at octopus.com.au
Sun Sep 3 23:21:55 PDT 2006



Changes in directory llvm/include/llvm/Target:

TargetLowering.h updated: 1.77 -> 1.78
---
Log message:

add setJumpBufSize() and setJumpBufAlignment() to target-lowering.
Call these from your backend to enjoy setjmp/longjmp goodness, see
lib/Target/IA64/IA64ISelLowering.cpp for an example




---
Diffs of the changes:  (+31 -0)

 TargetLowering.h |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+)


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.77 llvm/include/llvm/Target/TargetLowering.h:1.78
--- llvm/include/llvm/Target/TargetLowering.h:1.77	Mon Jun 12 11:06:08 2006
+++ llvm/include/llvm/Target/TargetLowering.h	Mon Sep  4 01:21:35 2006
@@ -327,6 +327,18 @@
     return StackPointerRegisterToSaveRestore;
   }
 
+  /// getJumpBufSize - returns the target's jmp_buf size in bytes (if never
+  /// set, the default is 200)
+  unsigned getJumpBufSize() const {
+    return JumpBufSize;
+  }
+
+  /// getJumpBufAlignment - returns the target's jmp_buf alignment in bytes
+  /// (if never set, the default is 0)
+  unsigned getJumpBufAlignment() const {
+    return JumpBufAlignment;
+  }
+  
   //===--------------------------------------------------------------------===//
   // TargetLowering Optimization Methods
   //
@@ -537,6 +549,18 @@
     TargetDAGCombineArray[NT >> 3] |= 1 << (NT&7);
   }
   
+  /// setJumpBufSize - Set the target's required jmp_buf buffer size (in
+  /// bytes); default is 200
+  void setJumpBufSize(unsigned Size) {
+    JumpBufSize = Size;
+  }
+
+  /// setJumpBufAlignment - Set the target's required jmp_buf buffer
+  /// alignment (in bytes); default is 0
+  void setJumpBufAlignment(unsigned Align) {
+    JumpBufAlignment = Align;
+  }
+  
 public:
 
   //===--------------------------------------------------------------------===//
@@ -718,6 +742,13 @@
   /// _longjmp to implement llvm.setjmp/llvm.longjmp.  Defaults to false.
   bool UseUnderscoreSetJmpLongJmp;
   
+  /// JumpBufSize - The size, in bytes, of the target's jmp_buf buffers
+  unsigned JumpBufSize;
+  
+  /// JumpBufAlignment - The alignment, in bytes, of the target's jmp_buf
+  /// buffers
+  unsigned JumpBufAlignment;
+  
   /// StackPointerRegisterToSaveRestore - If set to a physical register, this
   /// specifies the register that llvm.savestack/llvm.restorestack should save
   /// and restore.






More information about the llvm-commits mailing list