summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-09 20:05:34 +0000
committerChris Lattner <sabre@nondot.org>2002-08-09 20:05:34 +0000
commit3c3457ccea90899c3956f7e53d78ca0d1847fa8b (patch)
tree84e9a4917ab3ad675c5204f5945ac49ae3ea6238 /llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
parent107914c2ac6d1aee8ee645f4bd6205cf4f7fde7d (diff)
downloadbcm5719-llvm-3c3457ccea90899c3956f7e53d78ca0d1847fa8b.tar.gz
bcm5719-llvm-3c3457ccea90899c3956f7e53d78ca0d1847fa8b.zip
We are using std::vector, so remove extraneous namespace prefixes
llvm-svn: 3275
Diffstat (limited to 'llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp')
-rw-r--r--llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
index e6e42b8e39c..d8f89813622 100644
--- a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
+++ b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
@@ -56,7 +56,7 @@ namespace {
TargetMachine &Target;
void InsertCodeForPhis(Function &F);
void InsertPhiElimInstructions(BasicBlock *BB,
- const std::vector<MachineInstr*>& CpVec);
+ const vector<MachineInstr*>& CpVec);
void SelectInstructionsForTree(InstrTreeNode* treeRoot, int goalnt);
void PostprocessMachineCodeForTree(InstructionNode* instrNode,
int ruleForNode, short* nts);
@@ -186,7 +186,7 @@ InstructionSelection::InsertCodeForPhis(Function &F)
void
InstructionSelection::InsertPhiElimInstructions(BasicBlock *BB,
- const std::vector<MachineInstr*>& CpVec)
+ const vector<MachineInstr*>& CpVec)
{
Instruction *TermInst = (Instruction*)BB->getTerminator();
MachineCodeForInstruction &MC4Term = MachineCodeForInstruction::get(TermInst);
@@ -248,7 +248,7 @@ InstructionSelection::SelectInstructionsForTree(InstrTreeNode* treeRoot,
//
if (treeRoot->opLabel != VRegListOp)
{
- std::vector<MachineInstr*> minstrVec;
+ vector<MachineInstr*> minstrVec;
InstructionNode* instrNode = (InstructionNode*)treeRoot;
assert(instrNode->getNodeType() == InstrTreeNode::NTInstructionNode);
@@ -315,13 +315,12 @@ InstructionSelection::PostprocessMachineCodeForTree(InstructionNode* instrNode,
//
Instruction* vmInstr = instrNode->getInstruction();
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 =
- FixConstantOperandsForInstr(vmInstr, mvec[i], Target);
+ vector<MachineInstr*> loadConstVec =
+ FixConstantOperandsForInstr(vmInstr, mvec[i-1], Target);
- if (loadConstVec.size() > 0)
- mvec.insert(mvec.begin()+i, loadConstVec.begin(), loadConstVec.end());
+ mvec.insert(mvec.begin()+i-1, loadConstVec.begin(), loadConstVec.end());
}
}
OpenPOWER on IntegriCloud