//
//===----------------------------------------------------------------------===//
-#ifndef HexagonTARGETMACHINE_H
-#define HexagonTARGETMACHINE_H
+#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETMACHINE_H
+#define LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETMACHINE_H
#include "HexagonInstrInfo.h"
#include "HexagonSubtarget.h"
-#include "HexagonISelLowering.h"
-#include "HexagonSelectionDAGInfo.h"
-#include "HexagonFrameLowering.h"
#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetData.h"
namespace llvm {
class Module;
class HexagonTargetMachine : public LLVMTargetMachine {
- const TargetData DataLayout; // Calculates type size & alignment.
HexagonSubtarget Subtarget;
- HexagonInstrInfo InstrInfo;
- HexagonTargetLowering TLInfo;
- HexagonSelectionDAGInfo TSInfo;
- HexagonFrameLowering FrameLowering;
- const InstrItineraryData* InstrItins;
public:
HexagonTargetMachine(const Target &T, StringRef TT,StringRef CPU,
Reloc::Model RM, CodeModel::Model CM,
CodeGenOpt::Level OL);
- virtual const HexagonInstrInfo *getInstrInfo() const {
- return &InstrInfo;
- }
- virtual const HexagonSubtarget *getSubtargetImpl() const {
+ const HexagonSubtarget *getSubtargetImpl() const override {
return &Subtarget;
}
- virtual const HexagonRegisterInfo *getRegisterInfo() const {
- return &InstrInfo.getRegisterInfo();
- }
-
- virtual const InstrItineraryData* getInstrItineraryData() const {
- return InstrItins;
- }
-
-
- virtual const HexagonTargetLowering* getTargetLowering() const {
- return &TLInfo;
- }
-
- virtual const HexagonFrameLowering* getFrameLowering() const {
- return &FrameLowering;
- }
-
- virtual const HexagonSelectionDAGInfo* getSelectionDAGInfo() const {
- return &TSInfo;
- }
-
- virtual const TargetData *getTargetData() const { return &DataLayout; }
static unsigned getModuleMatchQuality(const Module &M);
- // Pass Pipeline Configuration.
- virtual bool addPassesForOptimizations(PassManagerBase &PM);
- virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);
+ TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
};
extern bool flag_aligned_memcpy;