From 5d5292a01015948f6fbbfbe9d9670f50c9720a83 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 7 Apr 2010 12:23:34 -0700 Subject: [PATCH] compiler: remove dead code --- orc/orccompiler.c | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/orc/orccompiler.c b/orc/orccompiler.c index 0907b7f..5f46b56 100644 --- a/orc/orccompiler.c +++ b/orc/orccompiler.c @@ -32,7 +32,6 @@ void orc_compiler_assign_rules (OrcCompiler *compiler); void orc_compiler_global_reg_alloc (OrcCompiler *compiler); void orc_compiler_rewrite_vars (OrcCompiler *compiler); void orc_compiler_rewrite_vars2 (OrcCompiler *compiler); -void orc_compiler_do_regs (OrcCompiler *compiler); int orc_compiler_dup_temporary (OrcCompiler *compiler, int var, int j); void orc_compiler_check_sizes (OrcCompiler *compiler); @@ -204,19 +203,13 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target, orc_compiler_rewrite_vars (compiler); if (compiler->error) goto error; - //if (compiler->target != ORC_TARGET_C) { - orc_compiler_global_reg_alloc (compiler); - - orc_compiler_do_regs (compiler); - //} + orc_compiler_global_reg_alloc (compiler); orc_compiler_rewrite_vars2 (compiler); if (compiler->error) goto error; ORC_INFO("allocating code memory"); - //if (compiler->target != ORC_TARGET_C) { - orc_compiler_allocate_codemem (compiler); - //} + orc_compiler_allocate_codemem (compiler); ORC_INFO("compiling for target"); compiler->target->compile (compiler); @@ -460,34 +453,6 @@ orc_compiler_global_reg_alloc (OrcCompiler *compiler) } void -orc_compiler_do_regs (OrcCompiler *compiler) -{ - int i; - int k; - int var; - OrcInstruction *insn; - OrcStaticOpcode *opcode; - - for(i=0;in_insns;i++){ - insn = compiler->insns + i; - opcode = insn->opcode; - - for(k=0;ksrc_size[k] == 0) continue; - - var = insn->src_args[k]; - - } - - for(k=0;kdest_size[k] == 0) continue; - - var = insn->dest_args[k]; - } - } -} - -void orc_compiler_rewrite_vars2 (OrcCompiler *compiler) { int i; -- 2.7.4