summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2014-01-29 23:18:47 +0000
committerManman Ren <manman.ren@gmail.com>2014-01-29 23:18:47 +0000
commitea120b6bb52cd796d3879353aeec214599bd9b96 (patch)
tree29f1635a128d1d316e168c692c40d4cc3660b38f /include
parent65a12969f9c8610e304efc096f94c955fc94abf2 (diff)
downloadllvm-ea120b6bb52cd796d3879353aeec214599bd9b96.tar.gz
llvm-ea120b6bb52cd796d3879353aeec214599bd9b96.tar.bz2
llvm-ea120b6bb52cd796d3879353aeec214599bd9b96.tar.xz
PGO branch weight: update edge weights in IfConverter.
This commit only handles IfConvertTriangle. To update edge weights of a successor, one interface is added to MachineBasicBlock: /// Set successor weight of a given iterator. setSuccWeight(succ_iterator I, uint32_t weight) An existing testing case test/CodeGen/Thumb2/v8_IT_5.ll is updated, since we now correctly update the edge weights, the cold block is placed at the end of the function and we jump to the cold block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200428 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index e196419e90..b2dac195fd 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -363,6 +363,9 @@ public:
///
void addSuccessor(MachineBasicBlock *succ, uint32_t weight = 0);
+ /// Set successor weight of a given iterator.
+ void setSuccWeight(succ_iterator I, uint32_t weight);
+
/// removeSuccessor - Remove successor from the successors list of this
/// MachineBasicBlock. The Predecessors list of succ is automatically updated.
///