Revert r107205 and r107207.
[oota-llvm.git] / include / llvm / CodeGen / MachineFunction.h
index ec25bc13199ba474344d48afaa3dd9b4b2dcc2db..409d13ee3fc5c19edf225c54bab7b2774d84d2e0 100644 (file)
@@ -117,9 +117,10 @@ class MachineFunction {
   /// Alignment - The alignment of the function.
   unsigned Alignment;
 
-  /// HasReturnsTwiceCall - Returns true if there's a call with a
-  /// "returns_twice" attribute, like setjmp.
-  bool HasReturnsTwiceCall;
+  /// CallsSetJmp - True if the function calls setjmp or sigsetjmp. This is used
+  /// to limit optimizations which cannot reason about the control flow of
+  /// setjmp.
+  bool CallsSetJmp;
 
   MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT
   void operator=(const MachineFunction&);   // DO NOT IMPLEMENT
@@ -186,13 +187,15 @@ public:
     if (Alignment < A) Alignment = A;
   }
 
-  /// hasReturnsTwiceCall - Returns true if there's a call with a
-  /// "returns_twice" attribute, like setjmp.
-  bool hasReturnsTwiceCall() const {
-    return HasReturnsTwiceCall;
+  /// callsSetJmp - Returns true if the function calls setjmp or sigsetjmp.
+  bool callsSetJmp() const {
+    return CallsSetJmp;
   }
-  void setReturnsTwiceCall(bool B) {
-    HasReturnsTwiceCall = B;
+
+  /// setCallsSetJmp - Set a flag that indicates if there's a call to setjmp or
+  /// sigsetjmp.
+  void setCallsSetJmp(bool B) {
+    CallsSetJmp = B;
   }
   
   /// getInfo - Keep track of various per-function pieces of information for