LLVM  4.0.0
X86TargetMachine.h
Go to the documentation of this file.
1 //===-- X86TargetMachine.h - Define TargetMachine for the X86 ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the X86 specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13 
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"
20 
21 namespace llvm {
22 
23 class StringRef;
24 
25 class X86TargetMachine final : public LLVMTargetMachine {
26  std::unique_ptr<TargetLoweringObjectFile> TLOF;
27  mutable StringMap<std::unique_ptr<X86Subtarget>> SubtargetMap;
28 
29 public:
30  X86TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
31  StringRef FS, const TargetOptions &Options,
34  ~X86TargetMachine() override;
35  const X86Subtarget *getSubtargetImpl(const Function &F) const override;
36 
38 
39  // Set up the pass pipeline.
40  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
42  return TLOF.get();
43  }
44 };
45 
46 } // End llvm namespace
47 
48 #endif
TargetIRAnalysis getTargetIRAnalysis() override
Get a TargetIRAnalysis implementation for the target.
Analysis pass providing the TargetTransformInfo.
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
X86TargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL)
Create an X86 target.
Target-Independent Code Generator Pass Configuration Options.
#define F(x, y, z)
Definition: MD5.cpp:51
TargetLoweringObjectFile * getObjFileLowering() const override
This class describes a target machine that is implemented with the LLVM target-independent code gener...
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
Definition: StringMap.h:223
Target - Wrapper for Target specific information.
const X86Subtarget * getSubtargetImpl(const Function &F) const override
Virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInf...
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47