projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix comments.
[oota-llvm.git]
/
lib
/
VMCore
/
PassManager.cpp
diff --git
a/lib/VMCore/PassManager.cpp
b/lib/VMCore/PassManager.cpp
index 8846ac590863ea2c902948bd451d50dbbb5415fb..ecedb1db66b0678346073a66c49d5210fa423f85 100644
(file)
--- a/
lib/VMCore/PassManager.cpp
+++ b/
lib/VMCore/PassManager.cpp
@@
-28,7
+28,6
@@
#include "llvm/Support/Mutex.h"
#include "llvm/ADT/StringMap.h"
#include <algorithm>
#include "llvm/Support/Mutex.h"
#include "llvm/ADT/StringMap.h"
#include <algorithm>
-#include <cstdio>
#include <map>
using namespace llvm;
#include <map>
using namespace llvm;
@@
-193,7
+192,7
@@
public:
// Print passes managed by this manager
void dumpPassStructure(unsigned Offset) {
// Print passes managed by this manager
void dumpPassStructure(unsigned Offset) {
- llvm::dbgs()
<< std::string(Offset*2, ' '
) << "BasicBlockPass Manager\n";
+ llvm::dbgs()
.indent(Offset*2
) << "BasicBlockPass Manager\n";
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
BasicBlockPass *BP = getContainedPass(Index);
BP->dumpPassStructure(Offset + 1);
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
BasicBlockPass *BP = getContainedPass(Index);
BP->dumpPassStructure(Offset + 1);
@@
-349,7
+348,7
@@
public:
// Print passes managed by this manager
void dumpPassStructure(unsigned Offset) {
// Print passes managed by this manager
void dumpPassStructure(unsigned Offset) {
- llvm::dbgs()
<< std::string(Offset*2, ' '
) << "ModulePass Manager\n";
+ llvm::dbgs()
.indent(Offset*2
) << "ModulePass Manager\n";
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
ModulePass *MP = getContainedPass(Index);
MP->dumpPassStructure(Offset + 1);
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
ModulePass *MP = getContainedPass(Index);
MP->dumpPassStructure(Offset + 1);
@@
-1635,9
+1634,11
@@
void MPPassManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) {
FPP->add(RequiredPass);
// Register P as the last user of RequiredPass.
FPP->add(RequiredPass);
// Register P as the last user of RequiredPass.
- SmallVector<Pass *, 1> LU;
- LU.push_back(RequiredPass);
- FPP->setLastUser(LU, P);
+ if (RequiredPass) {
+ SmallVector<Pass *, 1> LU;
+ LU.push_back(RequiredPass);
+ FPP->setLastUser(LU, P);
+ }
}
/// Return function pass corresponding to PassInfo PI, that is
}
/// Return function pass corresponding to PassInfo PI, that is
@@
-1774,8
+1775,8
@@
void PMStack::push(PMDataManager *PM) {
PM->setDepth(this->top()->getDepth()+1);
}
else {
PM->setDepth(this->top()->getDepth()+1);
}
else {
- assert(PM->getPassManagerType() == PMT_ModulePassManager
- || PM->getPassManagerType() == PMT_FunctionPassManager
+ assert(
(
PM->getPassManagerType() == PMT_ModulePassManager
+ || PM->getPassManagerType() == PMT_FunctionPassManager
)
&& "pushing bad pass manager to PMStack");
PM->setDepth(1);
}
&& "pushing bad pass manager to PMStack");
PM->setDepth(1);
}
@@
-1787,10
+1788,10
@@
void PMStack::push(PMDataManager *PM) {
void PMStack::dump() const {
for (std::vector<PMDataManager *>::const_iterator I = S.begin(),
E = S.end(); I != E; ++I)
void PMStack::dump() const {
for (std::vector<PMDataManager *>::const_iterator I = S.begin(),
E = S.end(); I != E; ++I)
-
printf("%s ", (*I)->getAsPass()->getPassName())
;
+
dbgs() << (*I)->getAsPass()->getPassName() << ' '
;
if (!S.empty())
if (!S.empty())
-
printf("\n")
;
+
dbgs() << '\n'
;
}
/// Find appropriate Module Pass Manager in the PM Stack and
}
/// Find appropriate Module Pass Manager in the PM Stack and