Exemplo n.º 1
0
DttSP_EXP void
process_samples_thread (unsigned int proc_thread)
{
	while (top[proc_thread].running)
	{
		sem_wait (&top[proc_thread].sync.buf.sem);
		do {
			gethold(proc_thread);
			sem_wait (&top[proc_thread].sync.upd.sem);
			switch (top[proc_thread].state)
			{
				case RUN_MUTE:
					run_mute (proc_thread);
					break;
				case RUN_PASS:
					run_pass (proc_thread);
					break;
				case RUN_PLAY:
					run_play (proc_thread);
					break;
				case RUN_SWCH:
					run_swch (proc_thread);
					break;
			}
			sem_post (&top[proc_thread].sync.upd.sem);
		} while (canhold (proc_thread));
    }
}
Exemplo n.º 2
0
void compile() {
    /* Frontend @ statement_t *statement_root_module[MAX_NUM_OF_MODULES]; */
    //standard passes
    define_blocks();
    analyse_blocks();

    if (enable_opt_loop_simplify)
        optimize_loops(OPT_LOOP_SIMPLIFY);  //unsafe

    if (enable_opt_loop_unroll_classic)
        optimize_loops(OPT_UNROLL_CLASSIC);

    if (enable_opt_loop_unroll_symbolic)
        optimize_loops(OPT_UNROLL_SYMBOLIC);

    /* high level optimizations go here */



    /* EOF (end of frontend) :) */
    generate_all_modules();
    /* IR @ ir_node_t *ir_root_tree[MAX_NUM_OF_MODULES]; */



    /* IR optimizations go here */



    /* End of IR */
    parse_all_modules();
    /* Backend @ instr_t *final_tree[MAX_NUM_OF_MODULES]; */

    run_pass(&reuse_and_rename);
    run_pass(&remove_move_chains);
    run_pass(&combine_immediates);

    /* low level optimizations go here */



    /* End of Backend, Emit final code */
    print_assembly();
}