int64_t immedVal; // constant value for an explicit constant
};
- unsigned regNum; // register number for an explicit register
+ int regNum; // register number for an explicit register
// will be set for a value after reg allocation
bool isDef; // is this a defition for the value
}
inline unsigned int getMachineRegNum() const {
assert(opType == MO_MachineRegister);
- return regNum;
+ return (unsigned) regNum;
}
inline int64_t getImmedValue () const {
assert(opType >= MO_SignExtendedImmed || opType <= MO_PCRelativeDisp);
// used to get the reg number if when one is allocted (must be
// called only after reg alloc)
- inline unsigned getAllocatedRegNum() const {
+ inline int getAllocatedRegNum() const {
assert(opType == MO_VirtualRegister || opType == MO_CCRegister ||
opType == MO_MachineRegister);
return regNum;
MachineOperand::MachineOperand()
: opType(MO_VirtualRegister),
immedVal(0),
- regNum(0),
+ regNum(-1),
isDef(false)
{}
{
opType = MO_MachineRegister;
value = NULL;
- regNum = _regNum;
+ regNum = (int) _regNum;
}
typedef hash_map <const Value *, LiveRange *, hashFuncValue> LiveRangeMapType;
-typedef vector <const Instruction *> CallRetInstrListType;
+typedef vector <const MachineInstr *> CallRetInstrListType;
class LiveRangeInfo
{
void addInterference(const Instruction *const Inst,
const LiveVarSet *const LVSet);
+ void suggestRegs4CallRets();
public:
#include "llvm/CodeGen/LiveRangeInfo.h"
#include "llvm/Analysis/LiveVar/MethodLiveVarInfo.h"
+#include <deque>
class AddedInstrns
{
public:
- vector<MachineInstr *> InstrnsBefore;
- vector<MachineInstr *> InstrnsAfter;
+ deque<MachineInstr *> InstrnsBefore;
+ deque<MachineInstr *> InstrnsAfter;
AddedInstrns() : InstrnsBefore(), InstrnsAfter() { }
};
typedef hash_map <const Value *, LiveRange *, hashFuncValue> LiveRangeMapType;
-typedef vector <const Instruction *> CallRetInstrListType;
+typedef vector <const MachineInstr *> CallRetInstrListType;
class LiveRangeInfo
{
void addInterference(const Instruction *const Inst,
const LiveVarSet *const LVSet);
+ void suggestRegs4CallRets();
public:
#include "llvm/CodeGen/LiveRangeInfo.h"
#include "llvm/Analysis/LiveVar/MethodLiveVarInfo.h"
+#include <deque>
class AddedInstrns
{
public:
- vector<MachineInstr *> InstrnsBefore;
- vector<MachineInstr *> InstrnsAfter;
+ deque<MachineInstr *> InstrnsBefore;
+ deque<MachineInstr *> InstrnsAfter;
AddedInstrns() : InstrnsBefore(), InstrnsAfter() { }
};