projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix warning
[oota-llvm.git]
/
lib
/
Transforms
/
Scalar
/
ADCE.cpp
diff --git
a/lib/Transforms/Scalar/ADCE.cpp
b/lib/Transforms/Scalar/ADCE.cpp
index 15b71fdf55ff7310aab707c3d195ab8339f302bd..e2e9e86216cde540bbc4536f86660ad47cb47857 100644
(file)
--- a/
lib/Transforms/Scalar/ADCE.cpp
+++ b/
lib/Transforms/Scalar/ADCE.cpp
@@
-17,16
+17,14
@@
#include "llvm/Support/CFG.h"
#include "Support/STLExtras.h"
#include "Support/DepthFirstIterator.h"
#include "llvm/Support/CFG.h"
#include "Support/STLExtras.h"
#include "Support/DepthFirstIterator.h"
-#include "Support/Statistic
Reporter
.h"
+#include "Support/Statistic.h"
#include <algorithm>
#include <algorithm>
-#include <iostream>
using std::cerr;
using std::vector;
using std::cerr;
using std::vector;
-static Statistic<> NumBlockRemoved("adce\t\t- Number of basic blocks removed");
-static Statistic<> NumInstRemoved ("adce\t\t- Number of instructions removed");
-
namespace {
namespace {
+ Statistic<> NumBlockRemoved("adce", "Number of basic blocks removed");
+ Statistic<> NumInstRemoved ("adce", "Number of instructions removed");
//===----------------------------------------------------------------------===//
// ADCE Class
//===----------------------------------------------------------------------===//
// ADCE Class
@@
-353,9
+351,8
@@
bool ADCE::doADCE() {
// Delete the old terminator instruction...
BB->getInstList().pop_back();
const Type *RetTy = Func->getReturnType();
// Delete the old terminator instruction...
BB->getInstList().pop_back();
const Type *RetTy = Func->getReturnType();
- Instruction *New = new ReturnInst(RetTy != Type::VoidTy ?
- Constant::getNullValue(RetTy) : 0);
- BB->getInstList().push_back(New);
+ BB->getInstList().push_back(new ReturnInst(RetTy != Type::VoidTy ?
+ Constant::getNullValue(RetTy) : 0));
}
BB->dropAllReferences();
}
BB->dropAllReferences();