summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-16 22:18:28 +0000
committerChris Lattner <sabre@nondot.org>2003-06-16 22:18:28 +0000
commit0bf94767018f15be77b7295215b7ffbffb7ebc7f (patch)
treefa74b8540f85ab00251a03359bab31f4ae34069b
parent93cc0a4423b88f2278619a6dab7eb61d045fd1f8 (diff)
downloadllvm-0bf94767018f15be77b7295215b7ffbffb7ebc7f.tar.gz
llvm-0bf94767018f15be77b7295215b7ffbffb7ebc7f.tar.bz2
llvm-0bf94767018f15be77b7295215b7ffbffb7ebc7f.tar.xz
Remove two using decls
Remove usage of alloca git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6725 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/InstrSelection/InstrForest.cpp32
-rw-r--r--lib/Target/SparcV9/InstrSelection/InstrForest.cpp32
2 files changed, 28 insertions, 36 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp
index 5afa1daccd..9ff681805b 100644
--- a/lib/CodeGen/InstrSelection/InstrForest.cpp
+++ b/lib/CodeGen/InstrSelection/InstrForest.cpp
@@ -21,9 +21,6 @@
#include "llvm/Type.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "Support/STLExtras.h"
-#include "Support/Alloca.h"
-using std::cerr;
-using std::vector;
//------------------------------------------------------------------------
// class InstrTreeNode
@@ -117,9 +114,9 @@ void
InstructionNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
- cerr << getInstruction()->getOpcodeName()
- << " [label " << getOpLabel() << "]" << "\n";
+ std::cerr << " ";
+ std::cerr << getInstruction()->getOpcodeName()
+ << " [label " << getOpLabel() << "]" << "\n";
}
@@ -127,9 +124,9 @@ void
VRegListNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
+ std::cerr << " ";
- cerr << "List" << "\n";
+ std::cerr << "List" << "\n";
}
@@ -137,29 +134,29 @@ void
VRegNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
+ std::cerr << " ";
- cerr << "VReg " << getValue() << "\t(type "
- << (int) getValue()->getValueType() << ")" << "\n";
+ std::cerr << "VReg " << getValue() << "\t(type "
+ << (int) getValue()->getValueType() << ")" << "\n";
}
void
ConstantNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
+ std::cerr << " ";
- cerr << "Constant " << getValue() << "\t(type "
- << (int) getValue()->getValueType() << ")" << "\n";
+ std::cerr << "Constant " << getValue() << "\t(type "
+ << (int) getValue()->getValueType() << ")" << "\n";
}
void
LabelNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
+ std::cerr << " ";
- cerr << "Label " << getValue() << "\n";
+ std::cerr << "Label " << getValue() << "\n";
}
//------------------------------------------------------------------------
@@ -258,8 +255,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
// if a fixed array is too small.
//
int numChildren = 0;
- InstrTreeNode **childArray =
- (InstrTreeNode **)alloca(instr->getNumOperands()*sizeof(InstrTreeNode *));
+ std::vector<InstrTreeNode*> childArray(instr->getNumOperands());
//
// Walk the operands of the instruction
diff --git a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp
index 5afa1daccd..9ff681805b 100644
--- a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp
+++ b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp
@@ -21,9 +21,6 @@
#include "llvm/Type.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "Support/STLExtras.h"
-#include "Support/Alloca.h"
-using std::cerr;
-using std::vector;
//------------------------------------------------------------------------
// class InstrTreeNode
@@ -117,9 +114,9 @@ void
InstructionNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
- cerr << getInstruction()->getOpcodeName()
- << " [label " << getOpLabel() << "]" << "\n";
+ std::cerr << " ";
+ std::cerr << getInstruction()->getOpcodeName()
+ << " [label " << getOpLabel() << "]" << "\n";
}
@@ -127,9 +124,9 @@ void
VRegListNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
+ std::cerr << " ";
- cerr << "List" << "\n";
+ std::cerr << "List" << "\n";
}
@@ -137,29 +134,29 @@ void
VRegNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
+ std::cerr << " ";
- cerr << "VReg " << getValue() << "\t(type "
- << (int) getValue()->getValueType() << ")" << "\n";
+ std::cerr << "VReg " << getValue() << "\t(type "
+ << (int) getValue()->getValueType() << ")" << "\n";
}
void
ConstantNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
+ std::cerr << " ";
- cerr << "Constant " << getValue() << "\t(type "
- << (int) getValue()->getValueType() << ")" << "\n";
+ std::cerr << "Constant " << getValue() << "\t(type "
+ << (int) getValue()->getValueType() << ")" << "\n";
}
void
LabelNode::dumpNode(int indent) const
{
for (int i=0; i < indent; i++)
- cerr << " ";
+ std::cerr << " ";
- cerr << "Label " << getValue() << "\n";
+ std::cerr << "Label " << getValue() << "\n";
}
//------------------------------------------------------------------------
@@ -258,8 +255,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
// if a fixed array is too small.
//
int numChildren = 0;
- InstrTreeNode **childArray =
- (InstrTreeNode **)alloca(instr->getNumOperands()*sizeof(InstrTreeNode *));
+ std::vector<InstrTreeNode*> childArray(instr->getNumOperands());
//
// Walk the operands of the instruction