@@ -82,6 +82,7 @@ def parse_args():
8282 Simple regex based transform of SIL and LLVM-IR into graphviz form.
8383 """ )
8484 parser .add_argument ("output_suffix" , nargs = '?' )
85+ parser .add_argument ("--disable_inst_dump" , action = 'store_true' )
8586 parser .add_argument ("--input_file" , type = argparse .FileType ('r' ),
8687 default = sys .stdin )
8788 parser .add_argument ("--renderer" , choices = ["Graphviz" , "dot" ],
@@ -159,15 +160,15 @@ def main():
159160 node [fontname = "{font}"];
160161 edge [fontname = "{font}"];""" .format (font = fontname ))
161162 for block in block_list :
162- if block .content is not None :
163+ if block .content is None or args . disable_inst_dump :
163164 out_file .write (
164165 "\t Node" + str (block .index ) +
165- " [shape=record,label=\" {" + block .content + "}\" ];\n " )
166+ " [shape=record,color=gray,fontcolor=gray,label=\" {" +
167+ block .name + "}\" ];\n " )
166168 else :
167169 out_file .write (
168170 "\t Node" + str (block .index ) +
169- " [shape=record,color=gray,fontcolor=gray,label=\" {" +
170- block .name + "}\" ];\n " )
171+ " [shape=record,label=\" {" + block .content + "}\" ];\n " )
171172
172173 for succ_name in block .get_succs ():
173174 succ_block = block_map [succ_name ]
0 commit comments