Add two new "virtual static" methods to the TargetMachine class
authorChris Lattner <sabre@nondot.org>
Sun, 11 Jul 2004 02:43:07 +0000 (02:43 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 11 Jul 2004 02:43:07 +0000 (02:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14741 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetMachine.h

index e252b6aec6a11dce3277b847379923d5991265f0..e958a23e1f1052c372eef5103817a964ddba1e7f 100644 (file)
@@ -62,6 +62,20 @@ protected: // Can only create subclasses...
 public:
   virtual ~TargetMachine();
 
+  /// getModuleMatchQuality - This static method should be implemented by
+  /// targets to indicate how closely they match the specified module.  This is
+  /// used by the LLC tool to determine which target to use when an explicit
+  /// -march option is not specified.  If a target returns zero, it will never
+  /// be chosen without an explicit -march option.
+  static unsigned getModuleMatchQuality(const Module &M) { return 0; }
+
+  /// getJITMatchQuality - This static method should be implemented by targets
+  /// that provide JIT capabilities to indicate how suitable they are for
+  /// execution on the current host.  If a value of 0 is returned, the target
+  /// will not be used unless an explicit -march option is used.
+  static unsigned getJITMatchQuality() { return 0; }
+
+
   const std::string &getName() const { return Name; }
 
   /// getIntrinsicLowering - This method returns a reference to an