Profile: set branch weight metadata with data generated from profiling.
authorManman Ren <mren@apple.com>
Tue, 28 Aug 2012 22:21:25 +0000 (22:21 +0000)
committerManman Ren <mren@apple.com>
Tue, 28 Aug 2012 22:21:25 +0000 (22:21 +0000)
commitd26200423ee818e54d4088bd0c499caf840d866d
treeebcd7b539baa265749b4e8bd01de29b8b3c2ecbe
parent714313b4828cec98b086b54b356407540aa775c4
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162799 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/Analysis/Passes.h
include/llvm/Analysis/ProfileDataLoader.h [new file with mode: 0644]
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
lib/Analysis/Analysis.cpp
lib/Analysis/CMakeLists.txt
lib/Analysis/ProfileDataLoader.cpp [new file with mode: 0644]
lib/Analysis/ProfileDataLoaderPass.cpp [new file with mode: 0644]
lib/Analysis/ProfileInfo.cpp
test/Analysis/Profiling/load-branch-weights-ifs.ll [new file with mode: 0644]
test/Analysis/Profiling/load-branch-weights-loops.ll [new file with mode: 0644]
test/Analysis/Profiling/load-branch-weights-switches.ll [new file with mode: 0644]