yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ShowPass Struct Reference
+ Inheritance diagram for ShowPass:
+ Collaboration diagram for ShowPass:

Public Member Functions

 ShowPass ()
 
virtual void help ()
 
virtual void execute (std::vector< std::string > args, RTLIL::Design *design)
 
pre_post_exec_state_t pre_execute ()
 
void post_execute (pre_post_exec_state_t state)
 
void cmd_log_args (const std::vector< std::string > &args)
 
void cmd_error (const std::vector< std::string > &args, size_t argidx, std::string msg)
 
void extra_args (std::vector< std::string > args, size_t argidx, RTLIL::Design *design, bool select=true)
 
virtual void run_register ()
 

Static Public Member Functions

static void call (RTLIL::Design *design, std::string command)
 
static void call (RTLIL::Design *design, std::vector< std::string > args)
 
static void call_on_selection (RTLIL::Design *design, const RTLIL::Selection &selection, std::string command)
 
static void call_on_selection (RTLIL::Design *design, const RTLIL::Selection &selection, std::vector< std::string > args)
 
static void call_on_module (RTLIL::Design *design, RTLIL::Module *module, std::string command)
 
static void call_on_module (RTLIL::Design *design, RTLIL::Module *module, std::vector< std::string > args)
 
static void init_register ()
 
static void done_register ()
 

Data Fields

std::string pass_name
 
std::string short_help
 
int call_counter
 
int64_t runtime_ns
 
Passnext_queued_pass
 

Detailed Description

Definition at line 548 of file show.cc.

Constructor & Destructor Documentation

ShowPass::ShowPass ( )
inline

Definition at line 549 of file show.cc.

549 : Pass("show", "generate schematics using graphviz") { }
Pass(std::string name, std::string short_help="** document me **")
Definition: register.cc:40

Member Function Documentation

void Pass::call ( RTLIL::Design design,
std::string  command 
)
staticinherited

Definition at line 146 of file register.cc.

147 {
148  std::vector<std::string> args;
149 
150  std::string cmd_buf = command;
151  std::string tok = next_token(cmd_buf, " \t\r\n");
152 
153  if (tok.empty() || tok[0] == '#')
154  return;
155 
156  if (tok[0] == '!') {
157  cmd_buf = command.substr(command.find('!') + 1);
158  while (!cmd_buf.empty() && (cmd_buf.back() == ' ' || cmd_buf.back() == '\t' ||
159  cmd_buf.back() == '\r' || cmd_buf.back() == '\n'))
160  cmd_buf.resize(cmd_buf.size()-1);
161  log_header("Shell command: %s\n", cmd_buf.c_str());
162  int retCode = run_command(cmd_buf);
163  if (retCode != 0)
164  log_cmd_error("Shell command returned error code %d.\n", retCode);
165  return;
166  }
167 
168  while (!tok.empty()) {
169  if (tok == "#")
170  break;
171  if (tok.back() == ';') {
172  int num_semikolon = 0;
173  while (!tok.empty() && tok.back() == ';')
174  tok.resize(tok.size()-1), num_semikolon++;
175  if (!tok.empty())
176  args.push_back(tok);
177  call(design, args);
178  args.clear();
179  if (num_semikolon == 2)
180  call(design, "clean");
181  if (num_semikolon == 3)
182  call(design, "clean -purge");
183  } else
184  args.push_back(tok);
185  tok = next_token(cmd_buf, " \t\r\n");
186  }
187 
188  call(design, args);
189 }
static std::string next_token(bool pass_newline=false)
Definition: preproc.cc:96
void log_header(const char *format,...)
Definition: log.cc:188
int run_command(const std::string &command, std::function< void(const std::string &)> process_line)
Definition: yosys.cc:195
void log_cmd_error(const char *format,...)
Definition: log.cc:211
static void call(RTLIL::Design *design, std::string command)
Definition: register.cc:146

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Pass::call ( RTLIL::Design design,
std::vector< std::string >  args 
)
staticinherited

Definition at line 191 of file register.cc.

192 {
193  if (args.size() == 0 || args[0][0] == '#')
194  return;
195 
196  if (echo_mode) {
197  log("%s", create_prompt(design, 0));
198  for (size_t i = 0; i < args.size(); i++)
199  log("%s%s", i ? " " : "", args[i].c_str());
200  log("\n");
201  }
202 
203  if (pass_register.count(args[0]) == 0)
204  log_cmd_error("No such command: %s (type 'help' for a command overview)\n", args[0].c_str());
205 
206  size_t orig_sel_stack_pos = design->selection_stack.size();
207  auto state = pass_register[args[0]]->pre_execute();
208  pass_register[args[0]]->execute(args, design);
209  pass_register[args[0]]->post_execute(state);
210  while (design->selection_stack.size() > orig_sel_stack_pos)
211  design->selection_stack.pop_back();
212 
213  design->check();
214 }
bool echo_mode
Definition: register.cc:30
std::vector< RTLIL::Selection > selection_stack
Definition: rtlil.h:509
const char * create_prompt(RTLIL::Design *design, int recursion_counter)
Definition: yosys.cc:400
void check()
Definition: rtlil.cc:357
void log_cmd_error(const char *format,...)
Definition: log.cc:211
void log(const char *format,...)
Definition: log.cc:180
std::map< std::string, Pass * > pass_register
Definition: register.cc:35

+ Here is the call graph for this function:

void Pass::call_on_module ( RTLIL::Design design,
RTLIL::Module module,
std::string  command 
)
staticinherited

Definition at line 240 of file register.cc.

241 {
242  std::string backup_selected_active_module = design->selected_active_module;
243  design->selected_active_module = module->name.str();
244  design->selection_stack.push_back(RTLIL::Selection(false));
245  design->selection_stack.back().select(module);
246 
247  Pass::call(design, command);
248 
249  design->selection_stack.pop_back();
250  design->selected_active_module = backup_selected_active_module;
251 }
std::string str() const
Definition: rtlil.h:182
std::vector< RTLIL::Selection > selection_stack
Definition: rtlil.h:509
RTLIL::IdString name
Definition: rtlil.h:599
std::string selected_active_module
Definition: rtlil.h:511
static void call(RTLIL::Design *design, std::string command)
Definition: register.cc:146

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Pass::call_on_module ( RTLIL::Design design,
RTLIL::Module module,
std::vector< std::string >  args 
)
staticinherited

Definition at line 253 of file register.cc.

254 {
255  std::string backup_selected_active_module = design->selected_active_module;
256  design->selected_active_module = module->name.str();
257  design->selection_stack.push_back(RTLIL::Selection(false));
258  design->selection_stack.back().select(module);
259 
260  Pass::call(design, args);
261 
262  design->selection_stack.pop_back();
263  design->selected_active_module = backup_selected_active_module;
264 }
std::string str() const
Definition: rtlil.h:182
std::vector< RTLIL::Selection > selection_stack
Definition: rtlil.h:509
RTLIL::IdString name
Definition: rtlil.h:599
std::string selected_active_module
Definition: rtlil.h:511
static void call(RTLIL::Design *design, std::string command)
Definition: register.cc:146

+ Here is the call graph for this function:

void Pass::call_on_selection ( RTLIL::Design design,
const RTLIL::Selection selection,
std::string  command 
)
staticinherited

Definition at line 216 of file register.cc.

217 {
218  std::string backup_selected_active_module = design->selected_active_module;
219  design->selected_active_module.clear();
220  design->selection_stack.push_back(selection);
221 
222  Pass::call(design, command);
223 
224  design->selection_stack.pop_back();
225  design->selected_active_module = backup_selected_active_module;
226 }
std::vector< RTLIL::Selection > selection_stack
Definition: rtlil.h:509
std::string selected_active_module
Definition: rtlil.h:511
static void call(RTLIL::Design *design, std::string command)
Definition: register.cc:146

+ Here is the call graph for this function:

void Pass::call_on_selection ( RTLIL::Design design,
const RTLIL::Selection selection,
std::vector< std::string >  args 
)
staticinherited

Definition at line 228 of file register.cc.

229 {
230  std::string backup_selected_active_module = design->selected_active_module;
231  design->selected_active_module.clear();
232  design->selection_stack.push_back(selection);
233 
234  Pass::call(design, args);
235 
236  design->selection_stack.pop_back();
237  design->selected_active_module = backup_selected_active_module;
238 }
std::vector< RTLIL::Selection > selection_stack
Definition: rtlil.h:509
std::string selected_active_module
Definition: rtlil.h:511
static void call(RTLIL::Design *design, std::string command)
Definition: register.cc:146

+ Here is the call graph for this function:

void Pass::cmd_error ( const std::vector< std::string > &  args,
size_t  argidx,
std::string  msg 
)
inherited

Definition at line 110 of file register.cc.

111 {
112  std::string command_text;
113  int error_pos = 0;
114 
115  for (size_t i = 0; i < args.size(); i++) {
116  if (i < argidx)
117  error_pos += args[i].size() + 1;
118  command_text = command_text + (command_text.empty() ? "" : " ") + args[i];
119  }
120 
121  log("\nSyntax error in command `%s':\n", command_text.c_str());
122  help();
123 
124  log_cmd_error("Command syntax error: %s\n> %s\n> %*s^\n",
125  msg.c_str(), command_text.c_str(), error_pos, "");
126 }
virtual void help()
Definition: register.cc:93
void log_cmd_error(const char *format,...)
Definition: log.cc:211
void log(const char *format,...)
Definition: log.cc:180

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Pass::cmd_log_args ( const std::vector< std::string > &  args)
inherited

Definition at line 100 of file register.cc.

101 {
102  if (args.size() <= 1)
103  return;
104  log("Full command line:");
105  for (size_t i = 0; i < args.size(); i++)
106  log(" %s", args[i].c_str());
107  log("\n");
108 }
void log(const char *format,...)
Definition: log.cc:180

+ Here is the call graph for this function:

void Pass::done_register ( )
staticinherited

Definition at line 62 of file register.cc.

63 {
64  frontend_register.clear();
65  pass_register.clear();
66  backend_register.clear();
68 }
std::map< std::string, Frontend * > frontend_register
Definition: register.cc:34
Pass * first_queued_pass
Definition: register.cc:31
#define log_assert(_assert_expr_)
Definition: log.h:85
#define NULL
std::map< std::string, Pass * > pass_register
Definition: register.cc:35
std::map< std::string, Backend * > backend_register
Definition: register.cc:36

+ Here is the caller graph for this function:

virtual void ShowPass::execute ( std::vector< std::string >  args,
RTLIL::Design design 
)
inlinevirtual

Implements Pass.

Definition at line 619 of file show.cc.

620  {
621  log_header("Generating Graphviz representation of design.\n");
622  log_push();
623 
624  std::vector<std::pair<std::string, RTLIL::Selection>> color_selections;
625  std::vector<std::pair<std::string, RTLIL::Selection>> label_selections;
626 
627  std::string format;
628  std::string viewer_exe;
629  std::string prefix = stringf("%s/.yosys_show", getenv("HOME") ? getenv("HOME") : ".");
630  std::vector<std::string> libfiles;
631  std::vector<RTLIL::Design*> libs;
632  uint32_t colorSeed = 0;
633  bool flag_width = false;
634  bool flag_signed = false;
635  bool flag_stretch = false;
636  bool flag_pause = false;
637  bool flag_enum = false;
638  bool flag_abbeviate = true;
639  bool flag_notitle = false;
640 
641  size_t argidx;
642  for (argidx = 1; argidx < args.size(); argidx++)
643  {
644  std::string arg = args[argidx];
645  if (arg == "-viewer" && argidx+1 < args.size()) {
646  viewer_exe = args[++argidx];
647  continue;
648  }
649  if (arg == "-lib" && argidx+1 < args.size()) {
650  libfiles.push_back(args[++argidx]);
651  continue;
652  }
653  if (arg == "-prefix" && argidx+1 < args.size()) {
654  prefix = args[++argidx];
655  continue;
656  }
657  if (arg == "-color" && argidx+2 < args.size()) {
658  std::pair<std::string, RTLIL::Selection> data;
659  data.first = args[++argidx], argidx++;
660  handle_extra_select_args(this, args, argidx, argidx+1, design);
661  data.second = design->selection_stack.back();
662  design->selection_stack.pop_back();
663  color_selections.push_back(data);
664  continue;
665  }
666  if (arg == "-label" && argidx+2 < args.size()) {
667  std::pair<std::string, RTLIL::Selection> data;
668  data.first = args[++argidx], argidx++;
669  handle_extra_select_args(this, args, argidx, argidx+1, design);
670  data.second = design->selection_stack.back();
671  design->selection_stack.pop_back();
672  label_selections.push_back(data);
673  continue;
674  }
675  if (arg == "-colors" && argidx+1 < args.size()) {
676  colorSeed = atoi(args[++argidx].c_str());
677  for (int i = 0; i < 100; i++)
678  colorSeed = ShowWorker::xorshift32(colorSeed);
679  continue;
680  }
681  if (arg == "-format" && argidx+1 < args.size()) {
682  format = args[++argidx];
683  continue;
684  }
685  if (arg == "-width") {
686  flag_width= true;
687  continue;
688  }
689  if (arg == "-signed") {
690  flag_signed= true;
691  continue;
692  }
693  if (arg == "-stretch") {
694  flag_stretch= true;
695  continue;
696  }
697  if (arg == "-pause") {
698  flag_pause= true;
699  continue;
700  }
701  if (arg == "-enum") {
702  flag_enum = true;
703  flag_abbeviate = false;
704  continue;
705  }
706  if (arg == "-long") {
707  flag_enum = false;
708  flag_abbeviate = false;
709  continue;
710  }
711  if (arg == "-notitle") {
712  flag_notitle = true;
713  continue;
714  }
715  break;
716  }
717  extra_args(args, argidx, design);
718 
719  if (format != "ps") {
720  int modcount = 0;
721  for (auto &mod_it : design->modules_) {
722  if (mod_it.second->get_bool_attribute("\\blackbox"))
723  continue;
724  if (mod_it.second->cells_.empty() && mod_it.second->connections().empty())
725  continue;
726  if (design->selected_module(mod_it.first))
727  modcount++;
728  }
729  if (modcount > 1)
730  log_cmd_error("For formats different than 'ps' only one module must be selected.\n");
731  }
732 
733  for (auto filename : libfiles) {
734  std::ifstream f;
735  f.open(filename.c_str());
736  if (f.fail())
737  log_error("Can't open lib file `%s'.\n", filename.c_str());
738  RTLIL::Design *lib = new RTLIL::Design;
739  Frontend::frontend_call(lib, &f, filename, (filename.size() > 3 && filename.substr(filename.size()-3) == ".il") ? "ilang" : "verilog");
740  libs.push_back(lib);
741  }
742 
743  if (libs.size() > 0)
744  log_header("Continuing show pass.\n");
745 
746  std::string dot_file = stringf("%s.dot", prefix.c_str());
747  std::string out_file = stringf("%s.%s", prefix.c_str(), format.empty() ? "svg" : format.c_str());
748 
749  log("Writing dot description to `%s'.\n", dot_file.c_str());
750  FILE *f = fopen(dot_file.c_str(), "w");
751  if (f == NULL) {
752  for (auto lib : libs)
753  delete lib;
754  log_cmd_error("Can't open dot file `%s' for writing.\n", dot_file.c_str());
755  }
756  ShowWorker worker(f, design, libs, colorSeed, flag_width, flag_signed, flag_stretch, flag_enum, flag_abbeviate, flag_notitle, color_selections, label_selections);
757  fclose(f);
758 
759  for (auto lib : libs)
760  delete lib;
761 
762  if (worker.page_counter == 0)
763  log_cmd_error("Nothing there to show.\n");
764 
765  if (format != "dot" && !format.empty()) {
766  std::string cmd = stringf("dot -T%s -o '%s' '%s'", format.c_str(), out_file.c_str(), dot_file.c_str());
767  log("Exec: %s\n", cmd.c_str());
768  if (run_command(cmd) != 0)
769  log_cmd_error("Shell command failed!\n");
770  }
771 
772  if (!viewer_exe.empty()) {
773  std::string cmd = stringf("%s '%s' &", viewer_exe.c_str(), out_file.c_str());
774  log("Exec: %s\n", cmd.c_str());
775  if (run_command(cmd) != 0)
776  log_cmd_error("Shell command failed!\n");
777  } else
778  if (format.empty()) {
779  std::string cmd = stringf("fuser -s '%s' || xdot '%s' < '%s' &", dot_file.c_str(), dot_file.c_str(), dot_file.c_str());
780  log("Exec: %s\n", cmd.c_str());
781  if (run_command(cmd) != 0)
782  log_cmd_error("Shell command failed!\n");
783  }
784 
785  if (flag_pause) {
786  #ifdef YOSYS_ENABLE_READLINE
787  char *input = NULL;
788  while ((input = readline("Press ENTER to continue (or type 'shell' to open a shell)> ")) != NULL) {
789  if (input[strspn(input, " \t\r\n")] == 0)
790  break;
791  char *p = input + strspn(input, " \t\r\n");
792  if (!strcmp(p, "shell")) {
793  Pass::call(design, "shell");
794  break;
795  }
796  }
797  #else
798  log_cmd_error("This version of yosys is built without readline support => 'show -pause' is not available.\n");
799  #endif
800  }
801 
802  log_pop();
803  }
std::vector< RTLIL::Selection > selection_stack
Definition: rtlil.h:509
std::string stringf(const char *fmt,...)
Definition: yosys.cc:58
void handle_extra_select_args(Pass *pass, std::vector< std::string > args, size_t argidx, size_t args_size, RTLIL::Design *design)
Definition: select.cc:803
bool selected_module(RTLIL::IdString mod_name) const
Definition: rtlil.cc:379
void log_header(const char *format,...)
Definition: log.cc:188
static void frontend_call(RTLIL::Design *design, std::istream *f, std::string filename, std::string command)
Definition: register.cc:375
void log_error(const char *format,...)
Definition: log.cc:204
void log_pop()
Definition: log.cc:237
int run_command(const std::string &command, std::function< void(const std::string &)> process_line)
Definition: yosys.cc:195
void log_cmd_error(const char *format,...)
Definition: log.cc:211
static uint32_t xorshift32(uint32_t x)
Definition: show.cc:67
std::map< RTLIL::IdString, RTLIL::Module * > modules_
Definition: rtlil.h:507
#define NULL
void log(const char *format,...)
Definition: log.cc:180
static int input(void)
void log_push()
Definition: log.cc:232
void extra_args(std::vector< std::string > args, size_t argidx, RTLIL::Design *design, bool select=true)
Definition: register.cc:128
static void call(RTLIL::Design *design, std::string command)
Definition: register.cc:146

+ Here is the call graph for this function:

void Pass::extra_args ( std::vector< std::string >  args,
size_t  argidx,
RTLIL::Design design,
bool  select = true 
)
inherited

Definition at line 128 of file register.cc.

129 {
130  for (; argidx < args.size(); argidx++)
131  {
132  std::string arg = args[argidx];
133 
134  if (arg.substr(0, 1) == "-")
135  cmd_error(args, argidx, "Unknown option or option in arguments.");
136 
137  if (!select)
138  cmd_error(args, argidx, "Extra argument.");
139 
140  handle_extra_select_args(this, args, argidx, args.size(), design);
141  break;
142  }
143  // cmd_log_args(args);
144 }
void cmd_error(const std::vector< std::string > &args, size_t argidx, std::string msg)
Definition: register.cc:110
void handle_extra_select_args(Pass *pass, std::vector< std::string > args, size_t argidx, size_t args_size, RTLIL::Design *design)
Definition: select.cc:803

+ Here is the call graph for this function:

virtual void ShowPass::help ( )
inlinevirtual

Reimplemented from Pass.

Definition at line 550 of file show.cc.

551  {
552  // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
553  log("\n");
554  log(" show [options] [selection]\n");
555  log("\n");
556  log("Create a graphviz DOT file for the selected part of the design and compile it\n");
557  log("to a graphics file (usually SVG or PostScript).\n");
558  log("\n");
559  log(" -viewer <viewer>\n");
560  log(" Run the specified command with the graphics file as parameter.\n");
561  log("\n");
562  log(" -format <format>\n");
563  log(" Generate a graphics file in the specified format.\n");
564  log(" Usually <format> is 'svg' or 'ps'.\n");
565  log("\n");
566  log(" -lib <verilog_or_ilang_file>\n");
567  log(" Use the specified library file for determining whether cell ports are\n");
568  log(" inputs or outputs. This option can be used multiple times to specify\n");
569  log(" more than one library.\n");
570  log("\n");
571  log(" -prefix <prefix>\n");
572  log(" generate <prefix>.* instead of ~/.yosys_show.*\n");
573  log("\n");
574  log(" -color <color> <object>\n");
575  log(" assign the specified color to the specified object. The object can be\n");
576  log(" a single selection wildcard expressions or a saved set of objects in\n");
577  log(" the @<name> syntax (see \"help select\" for details).\n");
578  log("\n");
579  log(" -label <text> <object>\n");
580  log(" assign the specified label text to the specified object. The object can\n");
581  log(" be a single selection wildcard expressions or a saved set of objects in\n");
582  log(" the @<name> syntax (see \"help select\" for details).\n");
583  log("\n");
584  log(" -colors <seed>\n");
585  log(" Randomly assign colors to the wires. The integer argument is the seed\n");
586  log(" for the random number generator. Change the seed value if the colored\n");
587  log(" graph still is ambigous. A seed of zero deactivates the coloring.\n");
588  log("\n");
589  log(" -width\n");
590  log(" annotate busses with a label indicating the width of the bus.\n");
591  log("\n");
592  log(" -signed\n");
593  log(" mark ports (A, B) that are declarted as signed (using the [AB]_SIGNED\n");
594  log(" cell parameter) with an asterisk next to the port name.\n");
595  log("\n");
596  log(" -stretch\n");
597  log(" stretch the graph so all inputs are on the left side and all outputs\n");
598  log(" (including inout ports) are on the right side.\n");
599  log("\n");
600  log(" -pause\n");
601  log(" wait for the use to press enter to before returning\n");
602  log("\n");
603  log(" -enum\n");
604  log(" enumerate objects with internal ($-prefixed) names\n");
605  log("\n");
606  log(" -long\n");
607  log(" do not abbeviate objects with internal ($-prefixed) names\n");
608  log("\n");
609  log(" -notitle\n");
610  log(" do not add the module name as graph title to the dot file\n");
611  log("\n");
612  log("When no <format> is specified, 'dot' is used. When no <format> and <viewer> is\n");
613  log("specified, 'xdot' is used to display the schematic.\n");
614  log("\n");
615  log("The generated output files are '~/.yosys_show.dot' and '~/.yosys_show.<format>',\n");
616  log("unless another prefix is specified using -prefix <prefix>.\n");
617  log("\n");
618  }
void log(const char *format,...)
Definition: log.cc:180

+ Here is the call graph for this function:

void Pass::init_register ( )
staticinherited

Definition at line 54 of file register.cc.

55 {
56  while (first_queued_pass) {
59  }
60 }
Pass * first_queued_pass
Definition: register.cc:31
Pass * next_queued_pass
Definition: register.h:60
virtual void run_register()
Definition: register.cc:48

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Pass::post_execute ( Pass::pre_post_exec_state_t  state)
inherited

Definition at line 84 of file register.cc.

85 {
86  int64_t time_ns = PerformanceTimer::query() - state.begin_ns;
87  runtime_ns += time_ns;
88  current_pass = state.parent_pass;
89  if (current_pass)
90  current_pass->runtime_ns -= time_ns;
91 }
static int64_t query()
Definition: log.h:151
int64_t runtime_ns
Definition: register.h:37
Pass * current_pass
Definition: register.cc:32
Pass * parent_pass
Definition: register.h:40
int64_t begin_ns
Definition: register.h:41

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Pass::pre_post_exec_state_t Pass::pre_execute ( )
inherited

Definition at line 74 of file register.cc.

75 {
76  pre_post_exec_state_t state;
77  call_counter++;
78  state.begin_ns = PerformanceTimer::query();
79  state.parent_pass = current_pass;
80  current_pass = this;
81  return state;
82 }
static int64_t query()
Definition: log.h:151
Pass * current_pass
Definition: register.cc:32
int call_counter
Definition: register.h:36

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Pass::run_register ( )
virtualinherited

Reimplemented in Backend, and Frontend.

Definition at line 48 of file register.cc.

49 {
50  log_assert(pass_register.count(pass_name) == 0);
51  pass_register[pass_name] = this;
52 }
std::string pass_name
Definition: register.h:29
#define log_assert(_assert_expr_)
Definition: log.h:85
std::map< std::string, Pass * > pass_register
Definition: register.cc:35

+ Here is the caller graph for this function:

Field Documentation

int Pass::call_counter
inherited

Definition at line 36 of file register.h.

Pass* Pass::next_queued_pass
inherited

Definition at line 60 of file register.h.

std::string Pass::pass_name
inherited

Definition at line 29 of file register.h.

int64_t Pass::runtime_ns
inherited

Definition at line 37 of file register.h.

std::string Pass::short_help
inherited

Definition at line 29 of file register.h.


The documentation for this struct was generated from the following file: