LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HexagonTargetMachine.h
Go to the documentation of this file.
1 //=-- HexagonTargetMachine.h - Define TargetMachine for Hexagon ---*- 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 Hexagon specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef HexagonTARGETMACHINE_H
15 #define HexagonTARGETMACHINE_H
16 
17 #include "HexagonFrameLowering.h"
18 #include "HexagonISelLowering.h"
19 #include "HexagonInstrInfo.h"
21 #include "HexagonSubtarget.h"
22 #include "llvm/IR/DataLayout.h"
24 
25 namespace llvm {
26 
27 class Module;
28 
30  const DataLayout DL; // Calculates type size & alignment.
31  HexagonSubtarget Subtarget;
32  HexagonInstrInfo InstrInfo;
33  HexagonTargetLowering TLInfo;
35  HexagonFrameLowering FrameLowering;
36  const InstrItineraryData* InstrItins;
37 
38 public:
43 
44  virtual const HexagonInstrInfo *getInstrInfo() const {
45  return &InstrInfo;
46  }
47  virtual const HexagonSubtarget *getSubtargetImpl() const {
48  return &Subtarget;
49  }
50  virtual const HexagonRegisterInfo *getRegisterInfo() const {
51  return &InstrInfo.getRegisterInfo();
52  }
53 
54  virtual const InstrItineraryData* getInstrItineraryData() const {
55  return InstrItins;
56  }
57 
58 
59  virtual const HexagonTargetLowering* getTargetLowering() const {
60  return &TLInfo;
61  }
62 
63  virtual const HexagonFrameLowering* getFrameLowering() const {
64  return &FrameLowering;
65  }
66 
68  return &TSInfo;
69  }
70 
71  virtual const DataLayout *getDataLayout() const { return &DL; }
72  static unsigned getModuleMatchQuality(const Module &M);
73 
74  // Pass Pipeline Configuration.
75  virtual bool addPassesForOptimizations(PassManagerBase &PM);
76  virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);
77 };
78 
79 extern bool flag_aligned_memcpy;
80 
81 } // end namespace llvm
82 
83 #endif
The main container class for the LLVM Intermediate Representation.
Definition: Module.h:112
static unsigned getModuleMatchQuality(const Module &M)
HexagonTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
virtual const DataLayout * getDataLayout() const
virtual const InstrItineraryData * getInstrItineraryData() const
virtual const HexagonTargetLowering * getTargetLowering() const
virtual const HexagonSelectionDAGInfo * getSelectionDAGInfo() const
virtual bool addPassesForOptimizations(PassManagerBase &PM)
virtual const HexagonRegisterInfo * getRegisterInfo() const
virtual const HexagonInstrInfo * getInstrInfo() const
virtual const HexagonSubtarget * getSubtargetImpl() const
virtual const HexagonRegisterInfo & getRegisterInfo() const
virtual const HexagonFrameLowering * getFrameLowering() const
virtual TargetPassConfig * createPassConfig(PassManagerBase &PM)