예제 #1
0
파일: passes.c 프로젝트: Persper/PTMC
static int 
register_dump_files_1 (struct tree_opt_pass *pass, bool ipa, int properties)
{
  do
    {
      int new_properties = (properties | pass->properties_provided)
			   & ~pass->properties_destroyed;

      if (pass->name)
        register_one_dump_file (pass, ipa, new_properties);

      if (pass->sub)
        new_properties = register_dump_files_1 (pass->sub, false,
						new_properties);

      /* If we have a gate, combine the properties that we could have with
         and without the pass being examined.  */
      if (pass->gate)
        properties &= new_properties;
      else
        properties = new_properties;

      pass = pass->next;
    }
  while (pass);

  return properties;
}
예제 #2
0
static int 
register_dump_files (struct tree_opt_pass *pass, bool ipa, int properties)
{
  static int n = 0;
  do
    {
      int new_properties;
      int pass_number;

      pass->properties_required = properties;
      new_properties =
        (properties | pass->properties_provided) & ~pass->properties_destroyed;

      /* Reset the counter when we reach RTL-based passes.  */
      if ((new_properties ^ pass->properties_required) & PROP_rtl)
        n = 0;

      pass_number = n;
      if (pass->name)
        n++;

      if (pass->sub)
        new_properties = register_dump_files (pass->sub, false, new_properties);

      /* If we have a gate, combine the properties that we could have with
         and without the pass being examined.  */
      if (pass->gate)
        properties &= new_properties;
      else
        properties = new_properties;

      pass->properties_provided = properties;
      if (pass->name)
        register_one_dump_file (pass, ipa, pass_number);

      pass = pass->next;
    }
  while (pass);

  return properties;
}