2006-05-14 22:18:28 +00:00
|
|
|
//===- ARMRegisterInfo.h - ARM Register Information Impl --------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
2006-05-14 22:18:28 +00:00
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2008-02-10 18:45:23 +00:00
|
|
|
// This file contains the ARM implementation of the TargetRegisterInfo class.
|
2006-05-14 22:18:28 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef ARMREGISTERINFO_H
|
|
|
|
#define ARMREGISTERINFO_H
|
|
|
|
|
2009-06-27 12:16:40 +00:00
|
|
|
#include "ARM.h"
|
2008-02-10 18:45:23 +00:00
|
|
|
#include "llvm/Target/TargetRegisterInfo.h"
|
2009-07-08 17:28:55 +00:00
|
|
|
#include "ARMBaseRegisterInfo.h"
|
2006-05-14 22:18:28 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2007-01-19 07:51:42 +00:00
|
|
|
class ARMSubtarget;
|
2007-02-27 21:12:35 +00:00
|
|
|
class TargetInstrInfo;
|
2007-01-19 07:51:42 +00:00
|
|
|
class Type;
|
2006-05-14 22:18:28 +00:00
|
|
|
|
2009-06-27 12:16:40 +00:00
|
|
|
struct ARMRegisterInfo : public ARMBaseRegisterInfo {
|
|
|
|
public:
|
|
|
|
ARMRegisterInfo(const TargetInstrInfo &tii, const ARMSubtarget &STI);
|
|
|
|
|
|
|
|
/// emitLoadConstPool - Emits a load from constpool to materialize the
|
|
|
|
/// specified immediate.
|
|
|
|
void emitLoadConstPool(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator &MBBI,
|
2009-06-27 12:59:03 +00:00
|
|
|
const TargetInstrInfo *TII, DebugLoc dl,
|
2009-06-27 12:16:40 +00:00
|
|
|
unsigned DestReg, int Val,
|
2009-06-27 12:59:03 +00:00
|
|
|
ARMCC::CondCodes Pred = ARMCC::AL,
|
|
|
|
unsigned PredReg = 0) const;
|
2009-06-27 12:16:40 +00:00
|
|
|
|
|
|
|
/// Code Generation virtual methods...
|
|
|
|
bool isReservedReg(const MachineFunction &MF, unsigned Reg) const;
|
|
|
|
|
|
|
|
bool requiresRegisterScavenging(const MachineFunction &MF) const;
|
|
|
|
|
|
|
|
bool hasReservedCallFrame(MachineFunction &MF) const;
|
|
|
|
|
|
|
|
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
|
|
|
MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator I) const;
|
|
|
|
|
|
|
|
void eliminateFrameIndex(MachineBasicBlock::iterator II,
|
|
|
|
int SPAdj, RegScavenger *RS = NULL) const;
|
|
|
|
|
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2006-05-14 22:18:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|