diff options
author | Manman Ren <mren@apple.com> | 2012-08-28 22:21:25 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2012-08-28 22:21:25 +0000 |
commit | abbb01abea2b804a89fa60ffb98d7d7677a930b3 (patch) | |
tree | adfeba36c6103e990819292c88b784be05baeff5 /llvm/lib/Analysis/ProfileInfo.cpp | |
parent | 9ed8c4e941ac2f1f129b39db51baf1974b05e650 (diff) | |
download | bcm5719-llvm-abbb01abea2b804a89fa60ffb98d7d7677a930b3.tar.gz bcm5719-llvm-abbb01abea2b804a89fa60ffb98d7d7677a930b3.zip |
Profile: set branch weight metadata with data generated from profiling.
This patch implements ProfileDataLoader which loads profile data generated by
-insert-edge-profiling and updates branch weight metadata accordingly.
Patch by Alastair Murray.
llvm-svn: 162799
Diffstat (limited to 'llvm/lib/Analysis/ProfileInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/ProfileInfo.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/Analysis/ProfileInfo.cpp b/llvm/lib/Analysis/ProfileInfo.cpp index 173de2c0279..b5b7ac1e501 100644 --- a/llvm/lib/Analysis/ProfileInfo.cpp +++ b/llvm/lib/Analysis/ProfileInfo.cpp @@ -1016,40 +1016,14 @@ void ProfileInfoT<Function,BasicBlock>::repair(const Function *F) { } } -raw_ostream& operator<<(raw_ostream &O, const Function *F) { - return O << F->getName(); -} - raw_ostream& operator<<(raw_ostream &O, const MachineFunction *MF) { return O << MF->getFunction()->getName() << "(MF)"; } -raw_ostream& operator<<(raw_ostream &O, const BasicBlock *BB) { - return O << BB->getName(); -} - raw_ostream& operator<<(raw_ostream &O, const MachineBasicBlock *MBB) { return O << MBB->getBasicBlock()->getName() << "(MB)"; } -raw_ostream& operator<<(raw_ostream &O, std::pair<const BasicBlock *, const BasicBlock *> E) { - O << "("; - - if (E.first) - O << E.first; - else - O << "0"; - - O << ","; - - if (E.second) - O << E.second; - else - O << "0"; - - return O << ")"; -} - raw_ostream& operator<<(raw_ostream &O, std::pair<const MachineBasicBlock *, const MachineBasicBlock *> E) { O << "("; |