LLVM API Documentation
00001 //===-- XCoreTargetMachine.h - Define TargetMachine for XCore ---*- 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 XCore specific subclass of TargetMachine. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H 00015 #define LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H 00016 00017 #include "XCoreSubtarget.h" 00018 #include "llvm/Target/TargetMachine.h" 00019 00020 namespace llvm { 00021 00022 class XCoreTargetMachine : public LLVMTargetMachine { 00023 XCoreSubtarget Subtarget; 00024 public: 00025 XCoreTargetMachine(const Target &T, StringRef TT, 00026 StringRef CPU, StringRef FS, const TargetOptions &Options, 00027 Reloc::Model RM, CodeModel::Model CM, 00028 CodeGenOpt::Level OL); 00029 00030 const XCoreSubtarget *getSubtargetImpl() const override { return &Subtarget; } 00031 00032 // Pass Pipeline Configuration 00033 TargetPassConfig *createPassConfig(PassManagerBase &PM) override; 00034 00035 void addAnalysisPasses(PassManagerBase &PM) override; 00036 }; 00037 00038 } // end namespace llvm 00039 00040 #endif