From b681918dddd205fc47e30c67c5350dd2fda2aa1a Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Wed, 29 Jan 2014 23:18:47 +0000 Subject: 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. llvm-svn: 200428 --- llvm/test/CodeGen/Thumb2/v8_IT_5.ll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/test/CodeGen/Thumb2') diff --git a/llvm/test/CodeGen/Thumb2/v8_IT_5.ll b/llvm/test/CodeGen/Thumb2/v8_IT_5.ll index 30250c8d02f..2f352d6d5f1 100644 --- a/llvm/test/CodeGen/Thumb2/v8_IT_5.ll +++ b/llvm/test/CodeGen/Thumb2/v8_IT_5.ll @@ -2,7 +2,7 @@ ; RUN: llc < %s -mtriple=thumbv7 -arm-restrict-it | FileCheck %s ; CHECK: it ne ; CHECK-NEXT: cmpne -; CHECK-NEXT: beq +; CHECK-NEXT: bne [[JUMPTARGET:.LBB[0-9]+_[0-9]+]] ; CHECK: cmp ; CHECK-NEXT: beq ; CHECK-NEXT: %if.else163 @@ -10,6 +10,7 @@ ; CHECK-NEXT: b ; CHECK-NEXT: %if.else145 ; CHECK-NEXT: mov.w +; CHECK: [[JUMPTARGET]]:{{.*}}%if.else173 %struct.hc = type { i32, i32, i32, i32 } -- cgit v1.2.3