Add a thread-model knob for lowering atomics on baremetal & single threaded systems
[oota-llvm.git] / include / llvm / Target / TargetOptions.h
index 922fae54bb80896dccd366306cb53f5f9df4a303..338291465b6ef7eda7eead113a0092c292cc9c73 100644 (file)
@@ -50,6 +50,13 @@ namespace llvm {
     };
   }
 
     };
   }
 
+  namespace ThreadModel {
+    enum Model {
+      POSIX,  // POSIX Threads
+      Single  // Single Threaded Environment
+    };
+  }
+
   class TargetOptions {
   public:
     TargetOptions()
   class TargetOptions {
   public:
     TargetOptions()
@@ -220,6 +227,10 @@ namespace llvm {
     /// create for functions that have the jumptable attribute.
     JumpTable::JumpTableType JTType;
 
     /// create for functions that have the jumptable attribute.
     JumpTable::JumpTableType JTType;
 
+    /// ThreadModel - This flag specifies the type of threading model to assume
+    /// for things like atomics
+    ThreadModel::Model ThreadModel;
+
     /// Machine level options.
     MCTargetOptions MCOptions;
   };
     /// Machine level options.
     MCTargetOptions MCOptions;
   };