projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the missing header file <cstdint> needed by uint64_t
[oota-llvm.git]
/
lib
/
Analysis
/
BlockFrequencyInfo.cpp
diff --git
a/lib/Analysis/BlockFrequencyInfo.cpp
b/lib/Analysis/BlockFrequencyInfo.cpp
index edd5ad9d5b74a7d6095c363ea92015e679cb08db..90b7a339a0fe2d13b37ed0420c74565fe72ac63c 100644
(file)
--- a/
lib/Analysis/BlockFrequencyInfo.cpp
+++ b/
lib/Analysis/BlockFrequencyInfo.cpp
@@
-55,7
+55,7
@@
struct GraphTraits<BlockFrequencyInfo *> {
typedef Function::const_iterator nodes_iterator;
static inline const NodeType *getEntryNode(const BlockFrequencyInfo *G) {
typedef Function::const_iterator nodes_iterator;
static inline const NodeType *getEntryNode(const BlockFrequencyInfo *G) {
- return
G->getFunction()->begin
();
+ return
&G->getFunction()->front
();
}
static ChildIteratorType child_begin(const NodeType *N) {
return succ_begin(N);
}
static ChildIteratorType child_begin(const NodeType *N) {
return succ_begin(N);
@@
-129,6
+129,12
@@
BlockFrequency BlockFrequencyInfo::getBlockFreq(const BasicBlock *BB) const {
return BFI ? BFI->getBlockFreq(BB) : 0;
}
return BFI ? BFI->getBlockFreq(BB) : 0;
}
+void BlockFrequencyInfo::setBlockFreq(const BasicBlock *BB,
+ uint64_t Freq) {
+ assert(BFI && "Expected analysis to be available");
+ BFI->setBlockFreq(BB, Freq);
+}
+
/// Pop up a ghostview window with the current block frequency propagation
/// rendered using dot.
void BlockFrequencyInfo::view() const {
/// Pop up a ghostview window with the current block frequency propagation
/// rendered using dot.
void BlockFrequencyInfo::view() const {