LLVM API Documentation
00001 //===-- X86TargetMachine.h - Define TargetMachine for the X86 ---*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file declares the X86 specific subclass of TargetMachine. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_LIB_TARGET_X86_X86TARGETMACHINE_H 00015 #define LLVM_LIB_TARGET_X86_X86TARGETMACHINE_H 00016 #include "X86InstrInfo.h" 00017 #include "X86Subtarget.h" 00018 #include "llvm/IR/DataLayout.h" 00019 #include "llvm/Target/TargetMachine.h" 00020 00021 namespace llvm { 00022 00023 class StringRef; 00024 00025 class X86TargetMachine final : public LLVMTargetMachine { 00026 virtual void anchor(); 00027 X86Subtarget Subtarget; 00028 00029 public: 00030 X86TargetMachine(const Target &T, StringRef TT, 00031 StringRef CPU, StringRef FS, const TargetOptions &Options, 00032 Reloc::Model RM, CodeModel::Model CM, 00033 CodeGenOpt::Level OL); 00034 const X86Subtarget *getSubtargetImpl() const override { return &Subtarget; } 00035 00036 /// \brief Register X86 analysis passes with a pass manager. 00037 void addAnalysisPasses(PassManagerBase &PM) override; 00038 00039 // Set up the pass pipeline. 00040 TargetPassConfig *createPassConfig(PassManagerBase &PM) override; 00041 }; 00042 00043 } // End llvm namespace 00044 00045 #endif