@@ -82,6 +82,7 @@ def parse_args():
82
82
Simple regex based transform of SIL and LLVM-IR into graphviz form.
83
83
""" )
84
84
parser .add_argument ("output_suffix" , nargs = '?' )
85
+ parser .add_argument ("--disable_inst_dump" , action = 'store_true' )
85
86
parser .add_argument ("--input_file" , type = argparse .FileType ('r' ),
86
87
default = sys .stdin )
87
88
parser .add_argument ("--renderer" , choices = ["Graphviz" , "dot" ],
@@ -159,15 +160,15 @@ def main():
159
160
node [fontname = "{font}"];
160
161
edge [fontname = "{font}"];""" .format (font = fontname ))
161
162
for block in block_list :
162
- if block .content is not None :
163
+ if block .content is None or args . disable_inst_dump :
163
164
out_file .write (
164
165
"\t Node" + str (block .index ) +
165
- " [shape=record,label=\" {" + block .content + "}\" ];\n " )
166
+ " [shape=record,color=gray,fontcolor=gray,label=\" {" +
167
+ block .name + "}\" ];\n " )
166
168
else :
167
169
out_file .write (
168
170
"\t Node" + str (block .index ) +
169
- " [shape=record,color=gray,fontcolor=gray,label=\" {" +
170
- block .name + "}\" ];\n " )
171
+ " [shape=record,label=\" {" + block .content + "}\" ];\n " )
171
172
172
173
for succ_name in block .get_succs ():
173
174
succ_block = block_map [succ_name ]
0 commit comments