mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-01 18:12:49 +00:00
We are using std::vector, so remove extraneous namespace prefixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3275 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
919c4f8a44
commit
b91b31c12d
@ -56,7 +56,7 @@ namespace {
|
|||||||
TargetMachine &Target;
|
TargetMachine &Target;
|
||||||
void InsertCodeForPhis(Function &F);
|
void InsertCodeForPhis(Function &F);
|
||||||
void InsertPhiElimInstructions(BasicBlock *BB,
|
void InsertPhiElimInstructions(BasicBlock *BB,
|
||||||
const std::vector<MachineInstr*>& CpVec);
|
const vector<MachineInstr*>& CpVec);
|
||||||
void SelectInstructionsForTree(InstrTreeNode* treeRoot, int goalnt);
|
void SelectInstructionsForTree(InstrTreeNode* treeRoot, int goalnt);
|
||||||
void PostprocessMachineCodeForTree(InstructionNode* instrNode,
|
void PostprocessMachineCodeForTree(InstructionNode* instrNode,
|
||||||
int ruleForNode, short* nts);
|
int ruleForNode, short* nts);
|
||||||
@ -186,7 +186,7 @@ InstructionSelection::InsertCodeForPhis(Function &F)
|
|||||||
|
|
||||||
void
|
void
|
||||||
InstructionSelection::InsertPhiElimInstructions(BasicBlock *BB,
|
InstructionSelection::InsertPhiElimInstructions(BasicBlock *BB,
|
||||||
const std::vector<MachineInstr*>& CpVec)
|
const vector<MachineInstr*>& CpVec)
|
||||||
{
|
{
|
||||||
Instruction *TermInst = (Instruction*)BB->getTerminator();
|
Instruction *TermInst = (Instruction*)BB->getTerminator();
|
||||||
MachineCodeForInstruction &MC4Term = MachineCodeForInstruction::get(TermInst);
|
MachineCodeForInstruction &MC4Term = MachineCodeForInstruction::get(TermInst);
|
||||||
@ -248,7 +248,7 @@ InstructionSelection::SelectInstructionsForTree(InstrTreeNode* treeRoot,
|
|||||||
//
|
//
|
||||||
if (treeRoot->opLabel != VRegListOp)
|
if (treeRoot->opLabel != VRegListOp)
|
||||||
{
|
{
|
||||||
std::vector<MachineInstr*> minstrVec;
|
vector<MachineInstr*> minstrVec;
|
||||||
|
|
||||||
InstructionNode* instrNode = (InstructionNode*)treeRoot;
|
InstructionNode* instrNode = (InstructionNode*)treeRoot;
|
||||||
assert(instrNode->getNodeType() == InstrTreeNode::NTInstructionNode);
|
assert(instrNode->getNodeType() == InstrTreeNode::NTInstructionNode);
|
||||||
@ -315,13 +315,12 @@ InstructionSelection::PostprocessMachineCodeForTree(InstructionNode* instrNode,
|
|||||||
//
|
//
|
||||||
Instruction* vmInstr = instrNode->getInstruction();
|
Instruction* vmInstr = instrNode->getInstruction();
|
||||||
MachineCodeForInstruction &mvec = MachineCodeForInstruction::get(vmInstr);
|
MachineCodeForInstruction &mvec = MachineCodeForInstruction::get(vmInstr);
|
||||||
for (int i = (int) mvec.size()-1; i >= 0; i--)
|
for (unsigned i = mvec.size(); i != 0; --i)
|
||||||
{
|
{
|
||||||
std::vector<MachineInstr*> loadConstVec =
|
vector<MachineInstr*> loadConstVec =
|
||||||
FixConstantOperandsForInstr(vmInstr, mvec[i], Target);
|
FixConstantOperandsForInstr(vmInstr, mvec[i-1], Target);
|
||||||
|
|
||||||
if (loadConstVec.size() > 0)
|
mvec.insert(mvec.begin()+i-1, loadConstVec.begin(), loadConstVec.end());
|
||||||
mvec.insert(mvec.begin()+i, loadConstVec.begin(), loadConstVec.end());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ namespace {
|
|||||||
TargetMachine &Target;
|
TargetMachine &Target;
|
||||||
void InsertCodeForPhis(Function &F);
|
void InsertCodeForPhis(Function &F);
|
||||||
void InsertPhiElimInstructions(BasicBlock *BB,
|
void InsertPhiElimInstructions(BasicBlock *BB,
|
||||||
const std::vector<MachineInstr*>& CpVec);
|
const vector<MachineInstr*>& CpVec);
|
||||||
void SelectInstructionsForTree(InstrTreeNode* treeRoot, int goalnt);
|
void SelectInstructionsForTree(InstrTreeNode* treeRoot, int goalnt);
|
||||||
void PostprocessMachineCodeForTree(InstructionNode* instrNode,
|
void PostprocessMachineCodeForTree(InstructionNode* instrNode,
|
||||||
int ruleForNode, short* nts);
|
int ruleForNode, short* nts);
|
||||||
@ -186,7 +186,7 @@ InstructionSelection::InsertCodeForPhis(Function &F)
|
|||||||
|
|
||||||
void
|
void
|
||||||
InstructionSelection::InsertPhiElimInstructions(BasicBlock *BB,
|
InstructionSelection::InsertPhiElimInstructions(BasicBlock *BB,
|
||||||
const std::vector<MachineInstr*>& CpVec)
|
const vector<MachineInstr*>& CpVec)
|
||||||
{
|
{
|
||||||
Instruction *TermInst = (Instruction*)BB->getTerminator();
|
Instruction *TermInst = (Instruction*)BB->getTerminator();
|
||||||
MachineCodeForInstruction &MC4Term = MachineCodeForInstruction::get(TermInst);
|
MachineCodeForInstruction &MC4Term = MachineCodeForInstruction::get(TermInst);
|
||||||
@ -248,7 +248,7 @@ InstructionSelection::SelectInstructionsForTree(InstrTreeNode* treeRoot,
|
|||||||
//
|
//
|
||||||
if (treeRoot->opLabel != VRegListOp)
|
if (treeRoot->opLabel != VRegListOp)
|
||||||
{
|
{
|
||||||
std::vector<MachineInstr*> minstrVec;
|
vector<MachineInstr*> minstrVec;
|
||||||
|
|
||||||
InstructionNode* instrNode = (InstructionNode*)treeRoot;
|
InstructionNode* instrNode = (InstructionNode*)treeRoot;
|
||||||
assert(instrNode->getNodeType() == InstrTreeNode::NTInstructionNode);
|
assert(instrNode->getNodeType() == InstrTreeNode::NTInstructionNode);
|
||||||
@ -315,13 +315,12 @@ InstructionSelection::PostprocessMachineCodeForTree(InstructionNode* instrNode,
|
|||||||
//
|
//
|
||||||
Instruction* vmInstr = instrNode->getInstruction();
|
Instruction* vmInstr = instrNode->getInstruction();
|
||||||
MachineCodeForInstruction &mvec = MachineCodeForInstruction::get(vmInstr);
|
MachineCodeForInstruction &mvec = MachineCodeForInstruction::get(vmInstr);
|
||||||
for (int i = (int) mvec.size()-1; i >= 0; i--)
|
for (unsigned i = mvec.size(); i != 0; --i)
|
||||||
{
|
{
|
||||||
std::vector<MachineInstr*> loadConstVec =
|
vector<MachineInstr*> loadConstVec =
|
||||||
FixConstantOperandsForInstr(vmInstr, mvec[i], Target);
|
FixConstantOperandsForInstr(vmInstr, mvec[i-1], Target);
|
||||||
|
|
||||||
if (loadConstVec.size() > 0)
|
mvec.insert(mvec.begin()+i-1, loadConstVec.begin(), loadConstVec.end());
|
||||||
mvec.insert(mvec.begin()+i, loadConstVec.begin(), loadConstVec.end());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user