blob: 8783bab5d950d749045ed37fd60489af07f6f74a [file] [log] [blame]
Chris Lattner02a3d832002-10-29 22:37:54 +00001//===-- X86TargetMachine.h - Define TargetMachine for the X86 ---*- C++ -*-===//
Misha Brukmanc88330a2005-04-21 23:38:14 +00002//
John Criswell29265fe2003-10-21 15:17:13 +00003// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Misha Brukmanc88330a2005-04-21 23:38:14 +00007//
John Criswell29265fe2003-10-21 15:17:13 +00008//===----------------------------------------------------------------------===//
Misha Brukmanc88330a2005-04-21 23:38:14 +00009//
Chris Lattner02a3d832002-10-29 22:37:54 +000010// This file declares the X86 specific subclass of TargetMachine.
11//
12//===----------------------------------------------------------------------===//
13
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000014#ifndef LLVM_LIB_TARGET_X86_X86TARGETMACHINE_H
15#define LLVM_LIB_TARGET_X86_X86TARGETMACHINE_H
Chandler Carruth802d7552012-12-04 07:12:27 +000016#include "X86InstrInfo.h"
Anton Korobeynikovf7183ed2010-11-15 00:06:54 +000017#include "X86Subtarget.h"
Chandler Carruth9fb823b2013-01-02 11:36:10 +000018#include "llvm/IR/DataLayout.h"
Chandler Carruth802d7552012-12-04 07:12:27 +000019#include "llvm/Target/TargetMachine.h"
Chris Lattner02a3d832002-10-29 22:37:54 +000020
Brian Gaeke960707c2003-11-11 22:41:34 +000021namespace llvm {
Andrew Trick808a7a62012-02-03 05:12:30 +000022
Evan Cheng2129f592011-07-19 06:37:02 +000023class StringRef;
Brian Gaeke960707c2003-11-11 22:41:34 +000024
Craig Topperec828472014-03-31 06:53:13 +000025class X86TargetMachine final : public LLVMTargetMachine {
David Woodhouse1c3996a2014-01-08 00:08:50 +000026 virtual void anchor();
Andrew Trick8523b162012-02-01 23:20:51 +000027 X86Subtarget Subtarget;
Jim Laskeyae92ce82006-09-07 23:39:26 +000028
Chris Lattner02a3d832002-10-29 22:37:54 +000029public:
Andrew Trick808a7a62012-02-03 05:12:30 +000030 X86TargetMachine(const Target &T, StringRef TT,
Nick Lewycky50f02cb2011-12-02 22:16:29 +000031 StringRef CPU, StringRef FS, const TargetOptions &Options,
Evan Chengefd9b422011-07-20 07:51:56 +000032 Reloc::Model RM, CodeModel::Model CM,
David Woodhouse1c3996a2014-01-08 00:08:50 +000033 CodeGenOpt::Level OL);
Craig Topper2d9361e2014-03-09 07:44:38 +000034 const X86Subtarget *getSubtargetImpl() const override { return &Subtarget; }
Rafael Espindolab8141d52014-08-05 22:10:21 +000035
Chandler Carruth664e3542013-01-07 01:37:14 +000036 /// \brief Register X86 analysis passes with a pass manager.
Craig Topper2d9361e2014-03-09 07:44:38 +000037 void addAnalysisPasses(PassManagerBase &PM) override;
Chandler Carruth664e3542013-01-07 01:37:14 +000038
Chris Lattner12e97302006-09-04 04:14:57 +000039 // Set up the pass pipeline.
Craig Topper2d9361e2014-03-09 07:44:38 +000040 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
Chris Lattner02a3d832002-10-29 22:37:54 +000041};
Evan Cheng11b0a5d2006-09-08 06:48:29 +000042
Brian Gaeke960707c2003-11-11 22:41:34 +000043} // End llvm namespace
44
Chris Lattner02a3d832002-10-29 22:37:54 +000045#endif