2012-02-18 12:03:15 +00:00
|
|
|
//===-- MSP430RegisterInfo.h - MSP430 Register Information Impl -*- C++ -*-===//
|
2009-05-03 12:57:15 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the MSP430 implementation of the MRegisterInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_TARGET_MSP430REGISTERINFO_H
|
|
|
|
#define LLVM_TARGET_MSP430REGISTERINFO_H
|
|
|
|
|
|
|
|
#include "llvm/Target/TargetRegisterInfo.h"
|
2011-06-27 18:32:37 +00:00
|
|
|
|
|
|
|
#define GET_REGINFO_HEADER
|
|
|
|
#include "MSP430GenRegisterInfo.inc"
|
2009-05-03 12:57:15 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class TargetInstrInfo;
|
2009-05-03 13:07:54 +00:00
|
|
|
class MSP430TargetMachine;
|
2009-05-03 12:57:15 +00:00
|
|
|
|
|
|
|
struct MSP430RegisterInfo : public MSP430GenRegisterInfo {
|
|
|
|
private:
|
2009-05-03 13:07:54 +00:00
|
|
|
MSP430TargetMachine &TM;
|
2009-05-03 12:57:15 +00:00
|
|
|
const TargetInstrInfo &TII;
|
2009-05-03 13:07:54 +00:00
|
|
|
|
|
|
|
/// StackAlign - Default stack alignment.
|
|
|
|
///
|
|
|
|
unsigned StackAlign;
|
2009-05-03 12:57:15 +00:00
|
|
|
public:
|
2009-05-03 13:07:54 +00:00
|
|
|
MSP430RegisterInfo(MSP430TargetMachine &tm, const TargetInstrInfo &tii);
|
2009-05-03 12:57:15 +00:00
|
|
|
|
|
|
|
/// Code Generation virtual methods...
|
|
|
|
const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
|
|
|
|
|
|
|
BitVector getReservedRegs(const MachineFunction &MF) const;
|
2009-07-29 20:31:52 +00:00
|
|
|
const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const;
|
2009-05-03 12:57:15 +00:00
|
|
|
|
2009-05-03 13:07:54 +00:00
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I) const;
|
2009-05-03 12:57:15 +00:00
|
|
|
|
2010-08-26 23:32:16 +00:00
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator II,
|
|
|
|
int SPAdj, RegScavenger *RS = NULL) const;
|
2009-05-03 12:57:15 +00:00
|
|
|
|
2009-05-03 13:11:20 +00:00
|
|
|
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
|
|
|
|
|
2009-05-03 12:57:15 +00:00
|
|
|
// Debug information queries.
|
2009-11-12 21:00:03 +00:00
|
|
|
unsigned getFrameRegister(const MachineFunction &MF) const;
|
2009-05-03 12:57:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif // LLVM_TARGET_MSP430REGISTERINFO_H
|