Example #1
0
ir_visitor_status
output_read_remover::visit_leave(ir_emit_vertex *ir)
{
   hash_table_call_foreach(replacements, emit_return_copy, ir);
   _mesa_hash_table_clear(replacements, NULL);
   return visit_continue;
}
ir_visitor_status
output_read_remover::visit_leave(ir_function_signature *sig)
{
   if (strcmp(sig->function_name(), "main") != 0)
      return visit_continue;

   hash_table_call_foreach(replacements, emit_main_copy, sig);
   return visit_continue;
}
Example #3
0
/**
 * Helper function to count the number of elements in a hash table.
 */
static unsigned
num_elements(hash_table *ht)
{
   unsigned int counter = 0;

   hash_table_call_foreach(ht, ht_count_callback, (void *) &counter);

   return counter;
}
Example #4
0
ir_visitor_status output_read_remover::visit_leave(ir_function_signature *sig)
{
   if (!sig->is_main)
   {
	   return visit_continue;
   }

   hash_table_call_foreach(replacements, emit_main_copy, sig);
   return visit_continue;
}
ir_visitor_status
output_read_remover::visit_leave(ir_return *ir)
{
   hash_table_call_foreach(replacements, emit_return_copy, ir);
   return visit_continue;
}