aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetMachine.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Target/TargetMachine.h')
-rw-r--r--include/llvm/Target/TargetMachine.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h
index 5ac1d69..ce293d5 100644
--- a/include/llvm/Target/TargetMachine.h
+++ b/include/llvm/Target/TargetMachine.h
@@ -19,7 +19,6 @@
namespace llvm {
-class Target;
class TargetAsmInfo;
class TargetData;
class TargetSubtarget;
@@ -100,14 +99,11 @@ class TargetMachine {
TargetMachine(const TargetMachine &); // DO NOT IMPLEMENT
void operator=(const TargetMachine &); // DO NOT IMPLEMENT
protected: // Can only create subclasses.
- TargetMachine(const Target &);
+ TargetMachine();
/// getSubtargetImpl - virtual method implemented by subclasses that returns
/// a reference to that target's TargetSubtarget-derived member variable.
virtual const TargetSubtarget *getSubtargetImpl() const { return 0; }
-
- /// TheTarget - The Target that this machine was created for.
- const Target &TheTarget;
/// AsmInfo - Contains target specific asm information.
///
@@ -120,7 +116,18 @@ protected: // Can only create subclasses.
public:
virtual ~TargetMachine();
- const Target &getTarget() const { return TheTarget; }
+ /// 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 &) { 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; }
// Interfaces to the major aspects of target machine information:
// -- Instruction opcode and operand information
@@ -301,7 +308,7 @@ public:
///
class LLVMTargetMachine : public TargetMachine {
protected: // Can only create subclasses.
- LLVMTargetMachine(const Target &T) : TargetMachine(T) { }
+ LLVMTargetMachine() { }
/// addCommonCodeGenPasses - Add standard LLVM codegen passes used for
/// both emitting to assembly files or machine code output.