Warnings patrol.
[oota-llvm.git] / include / llvm / Target / TargetMachine.h
index a89288d1a8f23fbef8117794fb06311b957c472a..2857efb53b926f9680345f3649351fd395dffaf9 100644 (file)
@@ -72,6 +72,7 @@ namespace CodeGenOpt {
 
 namespace Sched {
   enum Preference {
+    None,             // No preference
     Latency,          // Scheduling for shortest total latency.
     RegPressure,      // Scheduling for lowest register pressure.
     Hybrid            // Scheduling for both latency and register pressure.
@@ -100,7 +101,9 @@ protected: // Can only create subclasses.
   /// AsmInfo - Contains target specific asm information.
   ///
   const MCAsmInfo *AsmInfo;
-  
+
+  unsigned MCRelaxAll : 1;
+
 public:
   virtual ~TargetMachine();
 
@@ -157,6 +160,14 @@ public:
   /// 
   virtual const TargetELFWriterInfo *getELFWriterInfo() const { return 0; }
 
+  /// hasMCRelaxAll - Check whether all machine code instructions should be
+  /// relaxed.
+  bool hasMCRelaxAll() const { return MCRelaxAll; }
+
+  /// setMCRelaxAll - Set whether all machine code instructions should be
+  /// relaxed.
+  void setMCRelaxAll(bool Value) { MCRelaxAll = Value; }
+
   /// getRelocationModel - Returns the code generation relocation model. The
   /// choices are static, PIC, and dynamic-no-pic, and target default.
   static Reloc::Model getRelocationModel();
@@ -233,6 +244,18 @@ public:
                                           bool = true) {
     return true;
   }
+
+  /// addPassesToEmitMC - Add passes to the specified pass manager to get
+  /// machine code emitted with the MCJIT. This method returns true if machine
+  /// code is not supported. It fills the MCContext Ctx pointer which can be
+  /// used to build custom MCStreamer.
+  ///
+  virtual bool addPassesToEmitMC(PassManagerBase &,
+                                 MCContext *&,
+                                 CodeGenOpt::Level,
+                                 bool = true) {
+    return true;
+  }
 };
 
 /// LLVMTargetMachine - This class describes a target machine that is
@@ -276,6 +299,16 @@ public:
                                           JITCodeEmitter &MCE,
                                           CodeGenOpt::Level,
                                           bool DisableVerify = true);
+
+  /// addPassesToEmitMC - Add passes to the specified pass manager to get
+  /// machine code emitted with the MCJIT. This method returns true if machine
+  /// code is not supported. It fills the MCContext Ctx pointer which can be
+  /// used to build custom MCStreamer.
+  ///
+  virtual bool addPassesToEmitMC(PassManagerBase &PM,
+                                 MCContext *&Ctx,
+                                 CodeGenOpt::Level OptLevel,
+                                 bool DisableVerify = true);
   
   /// Target-Independent Code Generator Pass Configuration Options.