1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Other/cfg-printer-branch-weights.ll
Kirill Naumov 6d3e9c36e0 [CFGPrinter] Adding heat coloring to CFGPrinter
This patch introduces the heat coloring of the Control Flow Graph which is based
on the relative "hotness" of each BB. The patch is a part of sequence of three
patches, related to graphs Heat Coloring.

Reviewers: rcorcs, apilipenko, davidxl, sfertile, fedor.sergeev, eraman, bollu

Differential Revision: https://reviews.llvm.org/D77161
2020-04-08 19:59:51 +00:00

20 lines
494 B
LLVM

;RUN: opt < %s -analyze -dot-cfg -cfg-weights -cfg-raw-weights -cfg-dot-filename-prefix=%t 2>/dev/null
;RUN: FileCheck %s -input-file=%t.f.dot
define void @f(i32) {
entry:
%check = icmp sgt i32 %0, 0
br i1 %check, label %if, label %exit, !prof !0
; CHECK: label="W:7"
; CHECK-NOT: ["];
if: ; preds = %entry
br label %exit
; CHECK: label="W:1600"
; CHECK-NOT: ["];
exit: ; preds = %entry, %if
ret void
}
!0 = !{!"branch_weights", i32 1, i32 200}