From 055f58fcfc618cdad0a8cb66fbd4657cdc0d05e9 Mon Sep 17 00:00:00 2001 From: Kirill Naumov Date: Wed, 29 Apr 2020 18:34:48 +0000 Subject: [PATCH] [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 --- llvm/lib/Analysis/CFGPrinter.cpp | 2 +- llvm/test/Other/cfg_deopt_unreach.ll | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/llvm/lib/Analysis/CFGPrinter.cpp b/llvm/lib/Analysis/CFGPrinter.cpp index 8c8e4887ef77..cf4afc8cfd9c 100644 --- a/llvm/lib/Analysis/CFGPrinter.cpp +++ b/llvm/lib/Analysis/CFGPrinter.cpp @@ -42,7 +42,7 @@ static cl::opt HideUnreachablePaths("cfg-hide-unreachable-paths", static cl::opt HideDeoptimizePaths("cfg-hide-deoptimize-paths", cl::init(false)); -static cl::opt ShowHeatColors("cfg-heat-colors", cl::init(false), +static cl::opt ShowHeatColors("cfg-heat-colors", cl::init(true), cl::Hidden, cl::desc("Show heat colors in CFG")); diff --git a/llvm/test/Other/cfg_deopt_unreach.ll b/llvm/test/Other/cfg_deopt_unreach.ll index 72f23b58bc0d..5cfcf0d13724 100644 --- a/llvm/test/Other/cfg_deopt_unreach.ll +++ b/llvm/test/Other/cfg_deopt_unreach.ll @@ -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|{T|F}}"]; -; DEOPT: [shape=record,label="{%0:\l %c0 = load volatile i1, i1* %c\l br i1 %c0, label %lleft, label %lright\l|{T|F}}"]; -; UNREACH: [shape=record,label="{%0:\l %c0 = load volatile i1, i1* %c\l br i1 %c0, label %lleft, label %lright\l|{T|F}}"]; -; BOTH-FLAGS-NOT: [shape=record,label="{%0:\l %c0 = load volatile i1, i1* %c\l br i1 %c0, label %lleft, label %lright\l|{T|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 }