22 lines · plain
1; RUN: opt %s -passes=dot-cfg -cfg-heat-colors -cfg-dot-filename-prefix=%t -disable-output2; RUN: FileCheck %s -input-file=%t.f.dot --check-prefixes=CHECK-CFG,CHECK-BOTH3; RUN: opt %s -passes=dot-callgraph -callgraph-heat-colors -callgraph-dot-filename-prefix=%t -disable-output4; RUN: FileCheck %s -input-file=%t.callgraph.dot --check-prefix=CHECK-BOTH5 6; CHECK-BOTH: color="#[[#%x,]]", style={{[a-z]+}}, fillcolor="#[[#%x,]]"7; CHECK-CFG: color="#[[#%x,]]", style={{[a-z]+}}, fillcolor="#[[#%x,]]"8; CHECK-CFG: color="#[[#%x,]]", style={{[a-z]+}}, fillcolor="#[[#%x,]]"9 10define void @f(i32) {11entry:12 %check = icmp sgt i32 %0, 013 br i1 %check, label %if, label %exit, !prof !014 15if: ; preds = %entry16 br label %exit17exit: ; preds = %entry, %if18 ret void19}20 21!0 = !{!"branch_weights", i32 1, i32 200}22