[CFG] Turning on Heat Colors for CFG by default

This option seems to be very useful, so let's turn it on by default

Reviewed-By: davidxl
Diff: https://reviews.llvm.org/D79110
This commit is contained in:
Kirill Naumov 2020-04-29 18:34:48 +00:00
parent 1dfdb7e739
commit 6ff0f0a484
2 changed files with 9 additions and 13 deletions

View File

@ -42,7 +42,7 @@ static cl::opt<bool> HideUnreachablePaths("cfg-hide-unreachable-paths",
static cl::opt<bool> HideDeoptimizePaths("cfg-hide-deoptimize-paths",
cl::init(false));
static cl::opt<bool> ShowHeatColors("cfg-heat-colors", cl::init(false),
static cl::opt<bool> ShowHeatColors("cfg-heat-colors", cl::init(true),
cl::Hidden,
cl::desc("Show heat colors in CFG"));

View File

@ -12,24 +12,20 @@
declare i8 @llvm.experimental.deoptimize.i8(...)
define i8 @callee(i1* %c) alwaysinline {
; NO-FLAGS: [shape=record,label="{%0:\l %c0 = load volatile i1, i1* %c\l br i1 %c0, label %lleft, label %lright\l|{<s0>T|<s1>F}}"];
; DEOPT: [shape=record,label="{%0:\l %c0 = load volatile i1, i1* %c\l br i1 %c0, label %lleft, label %lright\l|{<s0>T|<s1>F}}"];
; UNREACH: [shape=record,label="{%0:\l %c0 = load volatile i1, i1* %c\l br i1 %c0, label %lleft, label %lright\l|{<s0>T|<s1>F}}"];
; BOTH-FLAGS-NOT: [shape=record,label="{%0:\l %c0 = load volatile i1, i1* %c\l br i1 %c0, label %lleft, label %lright\l|{<s0>T|<s1>F}}"];
%c0 = load volatile i1, i1* %c
br i1 %c0, label %lleft, label %lright
; NO-FLAGS: [shape=record,label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"];
; DEOPT-NOT: [shape=record,label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"];
; UNREACH: [shape=record,label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"];
; BOTH-FLAGS-NOT: [shape=record,label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"];
; NO-FLAGS: label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"
; DEOPT-NOT: label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"
; UNREACH: label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"
; BOTH-FLAGS-NOT: label="{lleft: \l %v0 = call i8 (...) @llvm.experimental.deoptimize.i8(i32 1) [ \"deopt\"(i32 1)\l... ]\l ret i8 %v0\l}"
lleft:
%v0 = call i8(...) @llvm.experimental.deoptimize.i8(i32 1) [ "deopt"(i32 1) ]
ret i8 %v0
; NO-FLAGS: [shape=record,label="{lright: \l unreachable\l}"];
; DEOPT: [shape=record,label="{lright: \l unreachable\l}"];
; UNREACH-NOT: [shape=record,label="{lright: \l unreachable\l}"];
; BOTH-FLAGS-NOT: [shape=record,label="{lright: \l unreachable\l}"];
; NO-FLAGS: label="{lright: \l unreachable\l}"
; DEOPT: label="{lright: \l unreachable\l}"
; UNREACH-NOT: label="{lright: \l unreachable\l}"
; BOTH-FLAGS-NOT: label="{lright: \l unreachable\l}"
lright:
unreachable
}