mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
Inline typedef, eliminate unused method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4382 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
67eaf73c89
commit
88da77c739
@ -205,24 +205,19 @@ void LiveRangeInfo::constructLiveRanges() {
|
|||||||
// 1) suggest colors for call and return args.
|
// 1) suggest colors for call and return args.
|
||||||
// 2) create new LRs for implicit defs in machine instructions
|
// 2) create new LRs for implicit defs in machine instructions
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void LiveRangeInfo::suggestRegs4CallRets()
|
void LiveRangeInfo::suggestRegs4CallRets() {
|
||||||
{
|
std::vector<MachineInstr*>::iterator It = CallRetInstrList.begin();
|
||||||
CallRetInstrListType::iterator It = CallRetInstrList.begin();
|
for( ; It != CallRetInstrList.end(); ++It) {
|
||||||
for( ; It != CallRetInstrList.end(); ++It ) {
|
|
||||||
|
|
||||||
MachineInstr *MInst = *It;
|
MachineInstr *MInst = *It;
|
||||||
MachineOpCode OpCode = MInst->getOpCode();
|
MachineOpCode OpCode = MInst->getOpCode();
|
||||||
|
|
||||||
if( (TM.getInstrInfo()).isReturn(OpCode) )
|
if ((TM.getInstrInfo()).isReturn(OpCode))
|
||||||
MRI.suggestReg4RetValue( MInst, *this);
|
MRI.suggestReg4RetValue(MInst, *this);
|
||||||
|
else if ((TM.getInstrInfo()).isCall(OpCode))
|
||||||
else if( (TM.getInstrInfo()).isCall( OpCode ) )
|
MRI.suggestRegs4CallArgs(MInst, *this);
|
||||||
MRI.suggestRegs4CallArgs( MInst, *this);
|
|
||||||
|
|
||||||
else
|
else
|
||||||
assert( 0 && "Non call/ret instr in CallRetInstrList" );
|
assert( 0 && "Non call/ret instr in CallRetInstrList" );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ class Function;
|
|||||||
class Instruction;
|
class Instruction;
|
||||||
|
|
||||||
typedef hash_map<const Value*, LiveRange*> LiveRangeMapType;
|
typedef hash_map<const Value*, LiveRange*> LiveRangeMapType;
|
||||||
typedef std::vector<MachineInstr*> CallRetInstrListType;
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Class LiveRangeInfo
|
// Class LiveRangeInfo
|
||||||
@ -53,7 +52,7 @@ class LiveRangeInfo {
|
|||||||
|
|
||||||
const MachineRegInfo& MRI; // machine reg info
|
const MachineRegInfo& MRI; // machine reg info
|
||||||
|
|
||||||
CallRetInstrListType CallRetInstrList; // a list of all call/ret instrs
|
std::vector<MachineInstr*> CallRetInstrList; // a list of all call/ret instrs
|
||||||
|
|
||||||
|
|
||||||
//------------ Private methods (see LiveRangeInfo.cpp for description)-------
|
//------------ Private methods (see LiveRangeInfo.cpp for description)-------
|
||||||
@ -90,20 +89,14 @@ public:
|
|||||||
|
|
||||||
// return the common live range map for this method
|
// return the common live range map for this method
|
||||||
//
|
//
|
||||||
inline const LiveRangeMapType *const getLiveRangeMap() const
|
inline const LiveRangeMapType *getLiveRangeMap() const
|
||||||
{ return &LiveRangeMap; }
|
{ return &LiveRangeMap; }
|
||||||
|
|
||||||
// Method sed to get the corresponding live range of a Value
|
// Method sed to get the corresponding live range of a Value
|
||||||
//
|
//
|
||||||
inline LiveRange *getLiveRangeForValue( const Value *const Val)
|
inline LiveRange *getLiveRangeForValue( const Value *Val)
|
||||||
{ return LiveRangeMap[Val]; }
|
{ return LiveRangeMap[Val]; }
|
||||||
|
|
||||||
// Method used to get the Call and Return instruction list
|
|
||||||
//
|
|
||||||
inline CallRetInstrListType &getCallRetInstrList() {
|
|
||||||
return CallRetInstrList;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Method for coalescing live ranges. Called only after interference info
|
// Method for coalescing live ranges. Called only after interference info
|
||||||
// is calculated.
|
// is calculated.
|
||||||
//
|
//
|
||||||
|
@ -205,24 +205,19 @@ void LiveRangeInfo::constructLiveRanges() {
|
|||||||
// 1) suggest colors for call and return args.
|
// 1) suggest colors for call and return args.
|
||||||
// 2) create new LRs for implicit defs in machine instructions
|
// 2) create new LRs for implicit defs in machine instructions
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void LiveRangeInfo::suggestRegs4CallRets()
|
void LiveRangeInfo::suggestRegs4CallRets() {
|
||||||
{
|
std::vector<MachineInstr*>::iterator It = CallRetInstrList.begin();
|
||||||
CallRetInstrListType::iterator It = CallRetInstrList.begin();
|
for( ; It != CallRetInstrList.end(); ++It) {
|
||||||
for( ; It != CallRetInstrList.end(); ++It ) {
|
|
||||||
|
|
||||||
MachineInstr *MInst = *It;
|
MachineInstr *MInst = *It;
|
||||||
MachineOpCode OpCode = MInst->getOpCode();
|
MachineOpCode OpCode = MInst->getOpCode();
|
||||||
|
|
||||||
if( (TM.getInstrInfo()).isReturn(OpCode) )
|
if ((TM.getInstrInfo()).isReturn(OpCode))
|
||||||
MRI.suggestReg4RetValue( MInst, *this);
|
MRI.suggestReg4RetValue(MInst, *this);
|
||||||
|
else if ((TM.getInstrInfo()).isCall(OpCode))
|
||||||
else if( (TM.getInstrInfo()).isCall( OpCode ) )
|
MRI.suggestRegs4CallArgs(MInst, *this);
|
||||||
MRI.suggestRegs4CallArgs( MInst, *this);
|
|
||||||
|
|
||||||
else
|
else
|
||||||
assert( 0 && "Non call/ret instr in CallRetInstrList" );
|
assert( 0 && "Non call/ret instr in CallRetInstrList" );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ class Function;
|
|||||||
class Instruction;
|
class Instruction;
|
||||||
|
|
||||||
typedef hash_map<const Value*, LiveRange*> LiveRangeMapType;
|
typedef hash_map<const Value*, LiveRange*> LiveRangeMapType;
|
||||||
typedef std::vector<MachineInstr*> CallRetInstrListType;
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Class LiveRangeInfo
|
// Class LiveRangeInfo
|
||||||
@ -53,7 +52,7 @@ class LiveRangeInfo {
|
|||||||
|
|
||||||
const MachineRegInfo& MRI; // machine reg info
|
const MachineRegInfo& MRI; // machine reg info
|
||||||
|
|
||||||
CallRetInstrListType CallRetInstrList; // a list of all call/ret instrs
|
std::vector<MachineInstr*> CallRetInstrList; // a list of all call/ret instrs
|
||||||
|
|
||||||
|
|
||||||
//------------ Private methods (see LiveRangeInfo.cpp for description)-------
|
//------------ Private methods (see LiveRangeInfo.cpp for description)-------
|
||||||
@ -90,20 +89,14 @@ public:
|
|||||||
|
|
||||||
// return the common live range map for this method
|
// return the common live range map for this method
|
||||||
//
|
//
|
||||||
inline const LiveRangeMapType *const getLiveRangeMap() const
|
inline const LiveRangeMapType *getLiveRangeMap() const
|
||||||
{ return &LiveRangeMap; }
|
{ return &LiveRangeMap; }
|
||||||
|
|
||||||
// Method sed to get the corresponding live range of a Value
|
// Method sed to get the corresponding live range of a Value
|
||||||
//
|
//
|
||||||
inline LiveRange *getLiveRangeForValue( const Value *const Val)
|
inline LiveRange *getLiveRangeForValue( const Value *Val)
|
||||||
{ return LiveRangeMap[Val]; }
|
{ return LiveRangeMap[Val]; }
|
||||||
|
|
||||||
// Method used to get the Call and Return instruction list
|
|
||||||
//
|
|
||||||
inline CallRetInstrListType &getCallRetInstrList() {
|
|
||||||
return CallRetInstrList;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Method for coalescing live ranges. Called only after interference info
|
// Method for coalescing live ranges. Called only after interference info
|
||||||
// is calculated.
|
// is calculated.
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user