summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetMachine.h
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-07-12 01:41:54 +0000
committerNate Begeman <natebegeman@mac.com>2005-07-12 01:41:54 +0000
commitfb5792f416089d8d8d0c6ee62c1f41a55d2cf75d (patch)
treee2b2a65b1d1e7f426d6f3035bca964ce25c0d79d /lib/Target/X86/X86TargetMachine.h
parent73213f6c07afc1479f8d7bf53ea99adf7fd60b78 (diff)
downloadllvm-fb5792f416089d8d8d0c6ee62c1f41a55d2cf75d.tar.gz
llvm-fb5792f416089d8d8d0c6ee62c1f41a55d2cf75d.tar.bz2
llvm-fb5792f416089d8d8d0c6ee62c1f41a55d2cf75d.tar.xz
Implement Subtarget support
Implement the X86 Subtarget. This consolidates the checks for target triple, and setting options based on target triple into one place. This allows us to convert the asm printer and isel over from being littered with "forDarwin", "forCygwin", etc. into just having the appropriate flags for each subtarget feature controlling the code for that feature. This patch also implements indirect external and weak references in the X86 pattern isel, for darwin. Next up is to convert over the asm printers to use this new interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22389 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.h')
-rw-r--r--lib/Target/X86/X86TargetMachine.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/X86/X86TargetMachine.h b/lib/Target/X86/X86TargetMachine.h
index 70b111c38b..955f855602 100644
--- a/lib/Target/X86/X86TargetMachine.h
+++ b/lib/Target/X86/X86TargetMachine.h
@@ -19,12 +19,14 @@
#include "llvm/PassManager.h"
#include "X86InstrInfo.h"
#include "X86JITInfo.h"
+#include "X86Subtarget.h"
namespace llvm {
class IntrinsicLowering;
class X86TargetMachine : public TargetMachine {
X86InstrInfo InstrInfo;
+ X86Subtarget Subtarget;
TargetFrameInfo FrameInfo;
X86JITInfo JITInfo;
public:
@@ -33,6 +35,7 @@ public:
virtual const X86InstrInfo *getInstrInfo() const { return &InstrInfo; }
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
virtual TargetJITInfo *getJITInfo() { return &JITInfo; }
+ virtual const TargetSubtarget *getSubtargetImpl() const{ return &Subtarget; }
virtual const MRegisterInfo *getRegisterInfo() const {
return &InstrInfo.getRegisterInfo();
}