2006-02-05 05:50:24 +00:00
|
|
|
//===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-02-25 19:28:19 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-02-25 19:28:19 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2006-02-05 05:50:24 +00:00
|
|
|
// This file declares the Sparc specific subclass of TargetMachine.
|
2004-02-25 19:28:19 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
#ifndef SPARCTARGETMACHINE_H
|
|
|
|
#define SPARCTARGETMACHINE_H
|
2004-02-25 19:28:19 +00:00
|
|
|
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "SparcFrameLowering.h"
|
2012-12-04 07:12:27 +00:00
|
|
|
#include "SparcISelLowering.h"
|
|
|
|
#include "SparcInstrInfo.h"
|
2013-10-08 07:15:22 +00:00
|
|
|
#include "SparcJITInfo.h"
|
2010-05-11 17:31:57 +00:00
|
|
|
#include "SparcSelectionDAGInfo.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
#include "SparcSubtarget.h"
|
2013-01-02 11:36:10 +00:00
|
|
|
#include "llvm/IR/DataLayout.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2012-12-04 07:12:27 +00:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2004-02-25 19:28:19 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2006-09-04 04:14:57 +00:00
|
|
|
class SparcTargetMachine : public LLVMTargetMachine {
|
2006-02-05 05:50:24 +00:00
|
|
|
SparcSubtarget Subtarget;
|
2012-10-08 16:38:25 +00:00
|
|
|
const DataLayout DL; // Calculates type size & alignment
|
2012-05-04 02:16:39 +00:00
|
|
|
SparcInstrInfo InstrInfo;
|
2008-10-03 16:55:19 +00:00
|
|
|
SparcTargetLowering TLInfo;
|
2010-05-11 17:31:57 +00:00
|
|
|
SparcSelectionDAGInfo TSInfo;
|
2011-01-10 12:39:04 +00:00
|
|
|
SparcFrameLowering FrameLowering;
|
2013-10-08 07:15:22 +00:00
|
|
|
SparcJITInfo JITInfo;
|
2004-02-25 19:28:19 +00:00
|
|
|
public:
|
2011-07-19 06:37:02 +00:00
|
|
|
SparcTargetMachine(const Target &T, StringRef TT,
|
2011-12-02 22:16:29 +00:00
|
|
|
StringRef CPU, StringRef FS, const TargetOptions &Options,
|
2011-11-16 08:38:26 +00:00
|
|
|
Reloc::Model RM, CodeModel::Model CM,
|
2011-12-02 22:16:29 +00:00
|
|
|
CodeGenOpt::Level OL, bool is64bit);
|
2004-02-25 19:28:19 +00:00
|
|
|
|
2006-02-05 05:50:24 +00:00
|
|
|
virtual const SparcInstrInfo *getInstrInfo() const { return &InstrInfo; }
|
2011-01-10 12:39:04 +00:00
|
|
|
virtual const TargetFrameLowering *getFrameLowering() const {
|
|
|
|
return &FrameLowering;
|
|
|
|
}
|
2008-05-14 01:58:56 +00:00
|
|
|
virtual const SparcSubtarget *getSubtargetImpl() const{ return &Subtarget; }
|
|
|
|
virtual const SparcRegisterInfo *getRegisterInfo() const {
|
2004-02-25 19:28:19 +00:00
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
2010-04-17 15:26:15 +00:00
|
|
|
virtual const SparcTargetLowering* getTargetLowering() const {
|
|
|
|
return &TLInfo;
|
2008-10-03 16:55:19 +00:00
|
|
|
}
|
2010-05-11 17:31:57 +00:00
|
|
|
virtual const SparcSelectionDAGInfo* getSelectionDAGInfo() const {
|
|
|
|
return &TSInfo;
|
|
|
|
}
|
2013-10-08 07:15:22 +00:00
|
|
|
virtual SparcJITInfo *getJITInfo() {
|
|
|
|
return &JITInfo;
|
|
|
|
}
|
2012-10-08 16:38:25 +00:00
|
|
|
virtual const DataLayout *getDataLayout() const { return &DL; }
|
2005-04-21 23:30:14 +00:00
|
|
|
|
2006-09-04 04:14:57 +00:00
|
|
|
// Pass Pipeline Configuration
|
2012-02-04 02:56:59 +00:00
|
|
|
virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);
|
2013-10-08 07:15:22 +00:00
|
|
|
virtual bool addCodeEmitter(PassManagerBase &PM, JITCodeEmitter &JCE);
|
2004-02-25 19:28:19 +00:00
|
|
|
};
|
|
|
|
|
2010-02-04 06:34:01 +00:00
|
|
|
/// SparcV8TargetMachine - Sparc 32-bit target machine
|
|
|
|
///
|
|
|
|
class SparcV8TargetMachine : public SparcTargetMachine {
|
2011-12-20 02:50:00 +00:00
|
|
|
virtual void anchor();
|
2010-02-04 06:34:01 +00:00
|
|
|
public:
|
2011-07-19 06:37:02 +00:00
|
|
|
SparcV8TargetMachine(const Target &T, StringRef TT,
|
2011-07-20 07:51:56 +00:00
|
|
|
StringRef CPU, StringRef FS,
|
2011-12-02 22:16:29 +00:00
|
|
|
const TargetOptions &Options,
|
2011-11-16 08:38:26 +00:00
|
|
|
Reloc::Model RM, CodeModel::Model CM,
|
|
|
|
CodeGenOpt::Level OL);
|
2010-02-04 06:34:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/// SparcV9TargetMachine - Sparc 64-bit target machine
|
|
|
|
///
|
|
|
|
class SparcV9TargetMachine : public SparcTargetMachine {
|
2011-12-20 02:50:00 +00:00
|
|
|
virtual void anchor();
|
2010-02-04 06:34:01 +00:00
|
|
|
public:
|
2011-07-19 06:37:02 +00:00
|
|
|
SparcV9TargetMachine(const Target &T, StringRef TT,
|
2011-07-20 07:51:56 +00:00
|
|
|
StringRef CPU, StringRef FS,
|
2011-12-02 22:16:29 +00:00
|
|
|
const TargetOptions &Options,
|
2011-11-16 08:38:26 +00:00
|
|
|
Reloc::Model RM, CodeModel::Model CM,
|
|
|
|
CodeGenOpt::Level OL);
|
2010-02-04 06:34:01 +00:00
|
|
|
};
|
|
|
|
|
2004-02-25 19:28:19 +00:00
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|