projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move "A | ~(A & ?) -> -1" from InstCombine to InstructionSimplify.
[oota-llvm.git]
/
lib
/
Analysis
/
ProfileInfo.cpp
diff --git
a/lib/Analysis/ProfileInfo.cpp
b/lib/Analysis/ProfileInfo.cpp
index fc7f28662c017b1670d5a42895730da815832389..36f211e858d2325c0c9b1b28d3eb90cd911097ec 100644
(file)
--- a/
lib/Analysis/ProfileInfo.cpp
+++ b/
lib/Analysis/ProfileInfo.cpp
@@
-24,8
+24,12
@@
#include <limits>
using namespace llvm;
#include <limits>
using namespace llvm;
+namespace llvm {
+ template<> char ProfileInfoT<Function,BasicBlock>::ID = 0;
+}
+
// Register the ProfileInfo interface, providing a nice name to refer to.
// Register the ProfileInfo interface, providing a nice name to refer to.
-static RegisterAnalysisGroup<ProfileInfo> Z("Profile Information");
+INITIALIZE_ANALYSIS_GROUP(ProfileInfo, "Profile Information", NoProfileInfo)
namespace llvm {
namespace llvm {
@@
-43,9
+47,6
@@
ProfileInfoT<Function, BasicBlock>::~ProfileInfoT() {
if (MachineProfile) delete MachineProfile;
}
if (MachineProfile) delete MachineProfile;
}
-template<>
-char ProfileInfoT<Function,BasicBlock>::ID = 0;
-
template<>
char ProfileInfoT<MachineFunction, MachineBasicBlock>::ID = 0;
template<>
char ProfileInfoT<MachineFunction, MachineBasicBlock>::ID = 0;
@@
-888,7
+889,7
@@
void ProfileInfoT<Function,BasicBlock>::repair(const Function *F) {
FI = Unvisited.begin(), FE = Unvisited.end();
while(FI != FE && !FoundPath) {
const BasicBlock *BB = *FI; ++FI;
FI = Unvisited.begin(), FE = Unvisited.end();
while(FI != FE && !FoundPath) {
const BasicBlock *BB = *FI; ++FI;
- const BasicBlock *Dest;
+ const BasicBlock *Dest
= 0
;
Path P;
bool BackEdgeFound = false;
for (const_pred_iterator NBB = pred_begin(BB), End = pred_end(BB);
Path P;
bool BackEdgeFound = false;
for (const_pred_iterator NBB = pred_begin(BB), End = pred_end(BB);
@@
-1076,7
+1077,9
@@
raw_ostream& operator<<(raw_ostream &O, std::pair<const MachineBasicBlock *, con
namespace {
struct NoProfileInfo : public ImmutablePass, public ProfileInfo {
static char ID; // Class identification, replacement for typeinfo
namespace {
struct NoProfileInfo : public ImmutablePass, public ProfileInfo {
static char ID; // Class identification, replacement for typeinfo
- NoProfileInfo() : ImmutablePass(ID) {}
+ NoProfileInfo() : ImmutablePass(ID) {
+ initializeNoProfileInfoPass(*PassRegistry::getPassRegistry());
+ }
/// getAdjustedAnalysisPointer - This method is used when a pass implements
/// an analysis interface through multiple inheritance. If needed, it
/// getAdjustedAnalysisPointer - This method is used when a pass implements
/// an analysis interface through multiple inheritance. If needed, it
@@
-1097,6
+1100,6
@@
namespace {
char NoProfileInfo::ID = 0;
// Register this pass...
INITIALIZE_AG_PASS(NoProfileInfo, ProfileInfo, "no-profile",
char NoProfileInfo::ID = 0;
// Register this pass...
INITIALIZE_AG_PASS(NoProfileInfo, ProfileInfo, "no-profile",
- "No Profile Information", false, true, true)
;
+ "No Profile Information", false, true, true)
ImmutablePass *llvm::createNoProfileInfoPass() { return new NoProfileInfo(); }
ImmutablePass *llvm::createNoProfileInfoPass() { return new NoProfileInfo(); }