1 //===-- X86TargetMachine.h - Define TargetMachine for the X86 ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the X86 specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_X86_X86TARGETMACHINE_H
15 #define LLVM_LIB_TARGET_X86_X86TARGETMACHINE_H
16 #include "X86InstrInfo.h"
17 #include "X86Subtarget.h"
18 #include "llvm/IR/DataLayout.h"
19 #include "llvm/Target/TargetMachine.h"
25 class X86TargetMachine final : public LLVMTargetMachine {
26 std::unique_ptr<TargetLoweringObjectFile> TLOF;
27 X86Subtarget Subtarget;
29 mutable StringMap<std::unique_ptr<X86Subtarget>> SubtargetMap;
32 X86TargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
33 const TargetOptions &Options, Reloc::Model RM,
34 CodeModel::Model CM, CodeGenOpt::Level OL);
35 ~X86TargetMachine() override;
36 const X86Subtarget *getSubtargetImpl(const Function &F) const override;
38 TargetIRAnalysis getTargetIRAnalysis() override;
40 // Set up the pass pipeline.
41 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
42 TargetLoweringObjectFile *getObjFileLowering() const override {
47 } // End llvm namespace