mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-10 22:55:57 +00:00
--- Reverse-merging r75799 into '.': U test/Analysis/PointerTracking U include/llvm/Target/TargetMachineRegistry.h U include/llvm/Target/TargetMachine.h U include/llvm/Target/TargetRegistry.h U include/llvm/Target/TargetSelect.h U tools/lto/LTOCodeGenerator.cpp U tools/lto/LTOModule.cpp U tools/llc/llc.cpp U lib/Target/PowerPC/PPCTargetMachine.h U lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp U lib/Target/PowerPC/PPCTargetMachine.cpp U lib/Target/PowerPC/PPC.h U lib/Target/ARM/ARMTargetMachine.cpp U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp U lib/Target/ARM/ARMTargetMachine.h U lib/Target/ARM/ARM.h U lib/Target/XCore/XCoreTargetMachine.cpp U lib/Target/XCore/XCoreTargetMachine.h U lib/Target/PIC16/PIC16TargetMachine.cpp U lib/Target/PIC16/PIC16TargetMachine.h U lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp U lib/Target/Alpha/AlphaTargetMachine.cpp U lib/Target/Alpha/AlphaTargetMachine.h U lib/Target/X86/X86TargetMachine.h U lib/Target/X86/X86.h U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h U lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h U lib/Target/X86/X86TargetMachine.cpp U lib/Target/MSP430/MSP430TargetMachine.cpp U lib/Target/MSP430/MSP430TargetMachine.h U lib/Target/CppBackend/CPPTargetMachine.h U lib/Target/CppBackend/CPPBackend.cpp U lib/Target/CBackend/CTargetMachine.h U lib/Target/CBackend/CBackend.cpp U lib/Target/TargetMachine.cpp U lib/Target/IA64/IA64TargetMachine.cpp U lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp U lib/Target/IA64/IA64TargetMachine.h U lib/Target/IA64/IA64.h U lib/Target/MSIL/MSILWriter.cpp U lib/Target/CellSPU/SPUTargetMachine.h U lib/Target/CellSPU/SPU.h U lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp U lib/Target/CellSPU/SPUTargetMachine.cpp U lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp U lib/Target/Mips/MipsTargetMachine.cpp U lib/Target/Mips/MipsTargetMachine.h U lib/Target/Mips/Mips.h U lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp U lib/Target/Sparc/SparcTargetMachine.cpp U lib/Target/Sparc/SparcTargetMachine.h U lib/ExecutionEngine/JIT/TargetSelect.cpp U lib/Support/TargetRegistry.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75820 91177308-0d34-0410-b5e6-96231b3b80d8
77 lines
2.5 KiB
C++
77 lines
2.5 KiB
C++
//===-- PIC16TargetMachine.h - Define TargetMachine for PIC16 ---*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file declares the PIC16 specific subclass of TargetMachine.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
#ifndef PIC16_TARGETMACHINE_H
|
|
#define PIC16_TARGETMACHINE_H
|
|
|
|
#include "PIC16InstrInfo.h"
|
|
#include "PIC16ISelLowering.h"
|
|
#include "PIC16RegisterInfo.h"
|
|
#include "PIC16Subtarget.h"
|
|
#include "llvm/Target/TargetData.h"
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
namespace llvm {
|
|
|
|
/// PIC16TargetMachine
|
|
///
|
|
class PIC16TargetMachine : public LLVMTargetMachine {
|
|
PIC16Subtarget Subtarget;
|
|
const TargetData DataLayout; // Calculates type size & alignment
|
|
PIC16InstrInfo InstrInfo;
|
|
PIC16TargetLowering TLInfo;
|
|
|
|
// PIC16 does not have any call stack frame, therefore not having
|
|
// any PIC16 specific FrameInfo class.
|
|
TargetFrameInfo FrameInfo;
|
|
|
|
protected:
|
|
virtual const TargetAsmInfo *createTargetAsmInfo() const;
|
|
|
|
public:
|
|
PIC16TargetMachine(const Target &T, const Module &M, const std::string &FS,
|
|
bool Cooper = false);
|
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
|
|
virtual const PIC16InstrInfo *getInstrInfo() const { return &InstrInfo; }
|
|
virtual const TargetData *getTargetData() const { return &DataLayout;}
|
|
virtual const PIC16Subtarget *getSubtargetImpl() const { return &Subtarget; }
|
|
|
|
virtual const PIC16RegisterInfo *getRegisterInfo() const {
|
|
return &(InstrInfo.getRegisterInfo());
|
|
}
|
|
|
|
virtual PIC16TargetLowering *getTargetLowering() const {
|
|
return const_cast<PIC16TargetLowering*>(&TLInfo);
|
|
}
|
|
|
|
virtual bool addInstSelector(PassManagerBase &PM,
|
|
CodeGenOpt::Level OptLevel);
|
|
virtual bool addAssemblyEmitter(PassManagerBase &PM,
|
|
CodeGenOpt::Level OptLevel,
|
|
bool Verbose, formatted_raw_ostream &Out);
|
|
virtual bool addPostRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
|
|
}; // PIC16TargetMachine.
|
|
|
|
/// CooperTargetMachine
|
|
class CooperTargetMachine : public PIC16TargetMachine {
|
|
public:
|
|
CooperTargetMachine(const Target &T, const Module &M, const std::string &FS);
|
|
}; // CooperTargetMachine.
|
|
|
|
} // end namespace llvm
|
|
|
|
#endif
|