mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-11 21:57:55 +00:00
Change interface so that we can add to the end of a basic block
without getting an assertion from ilist that we are dereferencing ilist<T>::end(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11345 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0eda78a372
commit
024126ee23
@ -17,11 +17,11 @@
|
||||
#define LLVM_TARGET_MREGISTERINFO_H
|
||||
|
||||
#include <cassert>
|
||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class Type;
|
||||
class MachineBasicBlock;
|
||||
class MachineFunction;
|
||||
class MachineInstr;
|
||||
|
||||
@ -227,17 +227,17 @@ public:
|
||||
//
|
||||
|
||||
virtual int storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
MachineInstr* MI,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned SrcReg, int FrameIndex,
|
||||
const TargetRegisterClass *RC) const = 0;
|
||||
|
||||
virtual int loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
MachineInstr* MI,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned DestReg, int FrameIndex,
|
||||
const TargetRegisterClass *RC) const = 0;
|
||||
|
||||
virtual int copyRegToReg(MachineBasicBlock &MBB,
|
||||
MachineInstr* MI,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
const TargetRegisterClass *RC) const = 0;
|
||||
|
||||
@ -262,7 +262,7 @@ public:
|
||||
///
|
||||
virtual int eliminateCallFramePseudoInstr(MachineFunction &MF,
|
||||
MachineBasicBlock &MBB,
|
||||
MachineInstr* MI) const {
|
||||
MachineBasicBlock::iterator MI) const {
|
||||
assert(getCallFrameSetupOpcode()== -1 && getCallFrameDestroyOpcode()== -1 &&
|
||||
"eliminateCallFramePseudoInstr must be implemented if using"
|
||||
" call frame setup/destroy pseudo instructions!");
|
||||
@ -290,7 +290,7 @@ public:
|
||||
/// added to (negative if removed from) the basic block.
|
||||
///
|
||||
virtual int eliminateFrameIndex(MachineFunction &MF,
|
||||
MachineInstr* MI) const = 0;
|
||||
MachineBasicBlock::iterator MI) const = 0;
|
||||
|
||||
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
||||
/// the function. The return value is the number of instructions
|
||||
|
@ -47,7 +47,7 @@ static unsigned getIdx(const TargetRegisterClass *RC) {
|
||||
}
|
||||
|
||||
int X86RegisterInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
MachineInstr* MI,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned SrcReg, int FrameIdx,
|
||||
const TargetRegisterClass *RC) const {
|
||||
static const unsigned Opcode[] =
|
||||
@ -59,7 +59,7 @@ int X86RegisterInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
}
|
||||
|
||||
int X86RegisterInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
MachineInstr* MI,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned DestReg, int FrameIdx,
|
||||
const TargetRegisterClass *RC) const{
|
||||
static const unsigned Opcode[] =
|
||||
@ -70,7 +70,7 @@ int X86RegisterInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
}
|
||||
|
||||
int X86RegisterInfo::copyRegToReg(MachineBasicBlock &MBB,
|
||||
MachineInstr* MI,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
const TargetRegisterClass *RC) const {
|
||||
static const unsigned Opcode[] =
|
||||
@ -93,7 +93,7 @@ static bool hasFP(MachineFunction &MF) {
|
||||
|
||||
int X86RegisterInfo::eliminateCallFramePseudoInstr(MachineFunction &MF,
|
||||
MachineBasicBlock &MBB,
|
||||
MachineInstr* I) const {
|
||||
MachineBasicBlock::iterator I) const {
|
||||
MachineInstr *New = 0, *Old = I;
|
||||
if (hasFP(MF)) {
|
||||
// If we have a frame pointer, turn the adjcallstackup instruction into a
|
||||
@ -127,7 +127,7 @@ int X86RegisterInfo::eliminateCallFramePseudoInstr(MachineFunction &MF,
|
||||
}
|
||||
|
||||
int X86RegisterInfo::eliminateFrameIndex(MachineFunction &MF,
|
||||
MachineInstr* II) const {
|
||||
MachineBasicBlock::iterator II) const {
|
||||
unsigned i = 0;
|
||||
MachineInstr &MI = *II;
|
||||
while (!MI.getOperand(i).isFrameIndex()) {
|
||||
|
@ -28,26 +28,26 @@ struct X86RegisterInfo : public X86GenRegisterInfo {
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
int storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
MachineInstr* MI,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned SrcReg, int FrameIndex,
|
||||
const TargetRegisterClass *RC) const;
|
||||
|
||||
int loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
MachineInstr* MI,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned DestReg, int FrameIndex,
|
||||
const TargetRegisterClass *RC) const;
|
||||
|
||||
int copyRegToReg(MachineBasicBlock &MBB,
|
||||
MachineInstr* MI,
|
||||
MachineBasicBlock::iterator MI,
|
||||
unsigned DestReg, unsigned SrcReg,
|
||||
const TargetRegisterClass *RC) const;
|
||||
|
||||
int eliminateCallFramePseudoInstr(MachineFunction &MF,
|
||||
MachineBasicBlock &MBB,
|
||||
MachineInstr* MI) const;
|
||||
MachineBasicBlock::iterator MI) const;
|
||||
|
||||
int eliminateFrameIndex(MachineFunction &MF,
|
||||
MachineInstr* MI) const;
|
||||
MachineBasicBlock::iterator MI) const;
|
||||
|
||||
int processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user