summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-07-23 14:59:40 +0000
committerChris Lattner <sabre@nondot.org>2003-07-23 14:59:40 +0000
commit9daa8a12d33412d3d7c78f7b5a00f0883e388b58 (patch)
tree3af1f399bd1acb536698642410c96f7cd6a62a47 /lib
parent1815383276d5068e4c1a336cefb0579953d05138 (diff)
downloadllvm-9daa8a12d33412d3d7c78f7b5a00f0883e388b58.tar.gz
llvm-9daa8a12d33412d3d7c78f7b5a00f0883e388b58.tar.bz2
llvm-9daa8a12d33412d3d7c78f7b5a00f0883e388b58.tar.xz
Random cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp44
-rw-r--r--lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp44
2 files changed, 36 insertions, 52 deletions
diff --git a/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp b/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp
index 29f4a4131e..49f4246c02 100644
--- a/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp
+++ b/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp
@@ -4,12 +4,8 @@
//
//===----------------------------------------------------------------------===//
-//#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
-//#include "llvm/CodeGen/MachineCodeForMethod.h"
-//#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h" // FIXME: Remove when modularized better
#include "llvm/BasicBlock.h"
#include "llvm/Constants.h"
-#include "llvm/Instruction.h"
#include "llvm/iTerminators.h"
#include "llvm/iPHINode.h"
#include "llvm/CodeGen/MachineInstr.h"
@@ -24,10 +20,6 @@
#include "ModuloScheduling.h"
#include <algorithm>
#include <fstream>
-#include <iostream>
-
-using std::endl;
-using std::cerr;
//************************************************************
// printing Debug information
@@ -455,9 +447,9 @@ ModuloScheduling::constructKernel(BasicBlock *prologue,
kernel_ist.erase(--kernel_ist.end());
// set the first successor to itself
- ((BranchInst *) cln)->setSuccessor(0, kernel);
+ cln->setSuccessor(0, kernel);
// set the second successor to eiplogue
- ((BranchInst *) cln)->setSuccessor(1, epilogue);
+ cln->setSuccessor(1, epilogue);
//*****change the condition*******
@@ -907,38 +899,38 @@ ModuloScheduling::dumpScheduling(){
void
ModuloScheduling::dumpFinalSchedule(){
- cerr << "dump schedule:" << endl;
+ std::cerr << "dump schedule:" << "\n";
const TargetSchedInfo & msi = target.getSchedInfo();
unsigned numIssueSlots = msi.maxNumIssueTotal;
for (unsigned i = 0; i < numIssueSlots; i++)
- cerr << "\t#";
- cerr << endl;
+ std::cerr << "\t#";
+ std::cerr << "\n";
for (unsigned i = 0; i < schedule.size(); i++) {
- cerr << "cycle" << i << ": ";
+ std::cerr << "cycle" << i << ": ";
for (unsigned j = 0; j < schedule[i].size(); j++)
if (schedule[i][j] != NULL)
- cerr << schedule[i][j]->getNodeId() << "\t";
+ std::cerr << schedule[i][j]->getNodeId() << "\t";
else
- cerr << "\t";
- cerr << endl;
+ std::cerr << "\t";
+ std::cerr << "\n";
}
- cerr << "dump coreSchedule:" << endl;
+ std::cerr << "dump coreSchedule:" << "\n";
for (unsigned i = 0; i < numIssueSlots; i++)
- cerr << "\t#";
- cerr << endl;
+ std::cerr << "\t#";
+ std::cerr << "\n";
for (unsigned i = 0; i < coreSchedule.size(); i++) {
- cerr << "cycle" << i << ": ";
+ std::cerr << "cycle" << i << ": ";
for (unsigned j = 0; j < coreSchedule[i].size(); j++)
if (coreSchedule[i][j] != NULL)
- cerr << coreSchedule[i][j]->getNodeId() << "\t";
+ std::cerr << coreSchedule[i][j]->getNodeId() << "\t";
else
- cerr << "\t";
- cerr << endl;
+ std::cerr << "\t";
+ std::cerr << "\n";
}
}
@@ -979,13 +971,13 @@ ModuloSchedulingPass::runOnFunction(Function &F){
ModuloSchedulingSet ModuloSchedulingSet(*graphSet);
- DEBUG_PRINT(cerr<<"runOnFunction in ModuloSchedulingPass returns\n"<<endl);
+ DEBUG_PRINT(std::cerr<<"runOnFunction in ModuloSchedulingPass returns\n"<<"\n");
return false;
}
Pass *
createModuloSchedulingPass(const TargetMachine & tgt){
- DEBUG_PRINT(cerr<<"creating modulo scheduling "<<endl);
+ DEBUG_PRINT(std::cerr<<"creating modulo scheduling\n");
return new ModuloSchedulingPass(tgt);
}
diff --git a/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp b/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp
index 29f4a4131e..49f4246c02 100644
--- a/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp
+++ b/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp
@@ -4,12 +4,8 @@
//
//===----------------------------------------------------------------------===//
-//#include "llvm/CodeGen/MachineCodeForBasicBlock.h"
-//#include "llvm/CodeGen/MachineCodeForMethod.h"
-//#include "llvm/Analysis/LiveVar/FunctionLiveVarInfo.h" // FIXME: Remove when modularized better
#include "llvm/BasicBlock.h"
#include "llvm/Constants.h"
-#include "llvm/Instruction.h"
#include "llvm/iTerminators.h"
#include "llvm/iPHINode.h"
#include "llvm/CodeGen/MachineInstr.h"
@@ -24,10 +20,6 @@
#include "ModuloScheduling.h"
#include <algorithm>
#include <fstream>
-#include <iostream>
-
-using std::endl;
-using std::cerr;
//************************************************************
// printing Debug information
@@ -455,9 +447,9 @@ ModuloScheduling::constructKernel(BasicBlock *prologue,
kernel_ist.erase(--kernel_ist.end());
// set the first successor to itself
- ((BranchInst *) cln)->setSuccessor(0, kernel);
+ cln->setSuccessor(0, kernel);
// set the second successor to eiplogue
- ((BranchInst *) cln)->setSuccessor(1, epilogue);
+ cln->setSuccessor(1, epilogue);
//*****change the condition*******
@@ -907,38 +899,38 @@ ModuloScheduling::dumpScheduling(){
void
ModuloScheduling::dumpFinalSchedule(){
- cerr << "dump schedule:" << endl;
+ std::cerr << "dump schedule:" << "\n";
const TargetSchedInfo & msi = target.getSchedInfo();
unsigned numIssueSlots = msi.maxNumIssueTotal;
for (unsigned i = 0; i < numIssueSlots; i++)
- cerr << "\t#";
- cerr << endl;
+ std::cerr << "\t#";
+ std::cerr << "\n";
for (unsigned i = 0; i < schedule.size(); i++) {
- cerr << "cycle" << i << ": ";
+ std::cerr << "cycle" << i << ": ";
for (unsigned j = 0; j < schedule[i].size(); j++)
if (schedule[i][j] != NULL)
- cerr << schedule[i][j]->getNodeId() << "\t";
+ std::cerr << schedule[i][j]->getNodeId() << "\t";
else
- cerr << "\t";
- cerr << endl;
+ std::cerr << "\t";
+ std::cerr << "\n";
}
- cerr << "dump coreSchedule:" << endl;
+ std::cerr << "dump coreSchedule:" << "\n";
for (unsigned i = 0; i < numIssueSlots; i++)
- cerr << "\t#";
- cerr << endl;
+ std::cerr << "\t#";
+ std::cerr << "\n";
for (unsigned i = 0; i < coreSchedule.size(); i++) {
- cerr << "cycle" << i << ": ";
+ std::cerr << "cycle" << i << ": ";
for (unsigned j = 0; j < coreSchedule[i].size(); j++)
if (coreSchedule[i][j] != NULL)
- cerr << coreSchedule[i][j]->getNodeId() << "\t";
+ std::cerr << coreSchedule[i][j]->getNodeId() << "\t";
else
- cerr << "\t";
- cerr << endl;
+ std::cerr << "\t";
+ std::cerr << "\n";
}
}
@@ -979,13 +971,13 @@ ModuloSchedulingPass::runOnFunction(Function &F){
ModuloSchedulingSet ModuloSchedulingSet(*graphSet);
- DEBUG_PRINT(cerr<<"runOnFunction in ModuloSchedulingPass returns\n"<<endl);
+ DEBUG_PRINT(std::cerr<<"runOnFunction in ModuloSchedulingPass returns\n"<<"\n");
return false;
}
Pass *
createModuloSchedulingPass(const TargetMachine & tgt){
- DEBUG_PRINT(cerr<<"creating modulo scheduling "<<endl);
+ DEBUG_PRINT(std::cerr<<"creating modulo scheduling\n");
return new ModuloSchedulingPass(tgt);
}