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

Chris Lattner lattner at cs.uiuc.edu
Tue Sep 27 15:13:47 PDT 2005



Changes in directory llvm/include/llvm/Target:

TargetLowering.h updated: 1.23 -> 1.24
---
Log message:

Add a new flag for targets where setjmp/longjmp saves/restores the signal mask,
and _setjmp/_longjmp should be used instead (for llvm.setjmp/llvm.longjmp).


---
Diffs of the changes:  (+18 -1)

 TargetLowering.h |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Target/TargetLowering.h
diff -u llvm/include/llvm/Target/TargetLowering.h:1.23 llvm/include/llvm/Target/TargetLowering.h:1.24
--- llvm/include/llvm/Target/TargetLowering.h:1.23	Sat Aug 27 14:09:02 2005
+++ llvm/include/llvm/Target/TargetLowering.h	Tue Sep 27 17:13:36 2005
@@ -100,7 +100,7 @@
     assert(RC && "This value type is not natively supported!");
     return RC;
   }
-
+  
   /// isTypeLegal - Return true if the target has native support for the
   /// specified value type.  This means that it has a register that directly
   /// holds it without promotions or expansions.
@@ -218,6 +218,12 @@
   /// @brief Determine if the target supports unaligned memory accesses.
   bool allowsUnalignedMemoryAccesses() const 
     { return allowUnalignedMemoryAccesses; }
+  
+  /// usesUnderscoreSetJmpLongJmp - Determine if we should use _setjmp or setjmp
+  /// to implement llvm.setjmp.
+  bool usesUnderscoreSetJmpLongJmp() const {
+    return UseUnderscoreSetJmpLongJmp;
+  }
 
   //===--------------------------------------------------------------------===//
   // TargetLowering Configuration Methods - These methods should be invoked by
@@ -244,6 +250,13 @@
     ShiftAmtHandling = OORSA;
   }
 
+  /// setUseUnderscoreSetJmpLongJmp - Indicate whether this target prefers to
+  /// use _setjmp and _longjmp to or implement llvm.setjmp/llvm.longjmp or
+  /// the non _ versions.  Defaults to false.
+  void setUseUnderscoreSetJmpLongJmp(bool Val) {
+    UseUnderscoreSetJmpLongJmp = Val;
+  }
+  
   /// setSetCCIxExpensive - This is a short term hack for targets that codegen
   /// setcc as a conditional branch.  This encourages the code generator to fold
   /// setcc operations into other operations if possible.
@@ -379,6 +392,10 @@
   /// SetCCResultContents - Information about the contents of the high-bits in
   /// the result of a setcc comparison operation.
   SetCCResultValue SetCCResultContents;
+  
+  /// UseUnderscoreSetJmpLongJmp - This target prefers to use _setjmp and
+  /// _longjmp to implement llvm.setjmp/llvm.longjmp.  Defaults to false.
+  bool UseUnderscoreSetJmpLongJmp;
 
   /// RegClassForVT - This indicates the default register class to use for
   /// each ValueType the target supports natively.






More information about the llvm-commits mailing list