From 1ecf3db1a4039fc3b97d7ced39ba9adbdf15f949 Mon Sep 17 00:00:00 2001 From: Andreas Zwinkau Date: Tue, 1 Apr 2008 12:04:51 +0000 Subject: [PATCH] inserted pbqp transformation step [r19037] --- ir/be/ia32/bearch_ia32.c | 15 ++++++++++++- ir/be/ia32/ia32_pbqp_transform.c | 38 ++++++++++++++++++++++++++++++++ ir/be/ia32/ia32_pbqp_transform.h | 37 +++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 ir/be/ia32/ia32_pbqp_transform.c create mode 100644 ir/be/ia32/ia32_pbqp_transform.h diff --git a/ir/be/ia32/bearch_ia32.c b/ir/be/ia32/bearch_ia32.c index 6c65bf501..d20c867d0 100644 --- a/ir/be/ia32/bearch_ia32.c +++ b/ir/be/ia32/bearch_ia32.c @@ -43,6 +43,7 @@ #include "irgopt.h" #include "irbitset.h" #include "irgopt.h" +#include "irdump_grgen.h" #include "pdeq.h" #include "pset.h" #include "debug.h" @@ -75,6 +76,7 @@ #include "gen_ia32_regalloc_if.h" #include "gen_ia32_machine.h" #include "ia32_transform.h" +#include "ia32_pbqp_transform.h" #include "ia32_emitter.h" #include "ia32_map_regs.h" #include "ia32_optimize.h" @@ -955,7 +957,18 @@ static void ia32_prepare_graph(void *self) { if(cg->dump) be_dump(cg->irg, "-pre_transform", dump_ir_block_graph_sched); - /* transform nodes into assembler instructions */ + /* used for examination purposes only + * if(cg->dump) + dump_irg_grgen(cg->irg, "-pre_transform"); + */ + + /* transform nodes into assembler instructions by PBQP magic */ + ia32_transform_graph_by_pbqp(cg); + + if(cg->dump) + be_dump(cg->irg, "-after_pbqp_transform", dump_ir_block_graph_sched); + + /* transform remaining nodes into assembler instructions */ ia32_transform_graph(cg); /* do local optimisations (mainly CSE) */ diff --git a/ir/be/ia32/ia32_pbqp_transform.c b/ir/be/ia32/ia32_pbqp_transform.c new file mode 100644 index 000000000..7a0937427 --- /dev/null +++ b/ir/be/ia32/ia32_pbqp_transform.c @@ -0,0 +1,38 @@ +/* + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + +/** + * @file + * @brief This file implements the IR transformation from firm into + * ia32-Firm by PBQP magic + * @author Sebastian Buchwald, Andreas Zwinkau + * @version $Id$ + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include "bearch_ia32_t.h" + +void ia32_transform_graph_by_pbqp(ia32_code_gen_t *cg) +{ + return; +} diff --git a/ir/be/ia32/ia32_pbqp_transform.h b/ir/be/ia32/ia32_pbqp_transform.h new file mode 100644 index 000000000..c84f313a9 --- /dev/null +++ b/ir/be/ia32/ia32_pbqp_transform.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. + */ + +/** + * @file + * @brief This file implements the IR transformation from firm into ia32-Firm with PBQP magic + * @author Sebastian Buchwald, Andreas Zwinkau + * @version $Id$ + */ +#ifndef FIRM_BE_IA32_IA32_PBQP_TRANSFORM_H +#define FIRM_BE_IA32_IA32_PBQP_TRANSFORM_H + +#include "firm_config.h" +#include "bearch_ia32_t.h" + +/** + * Transform firm nodes to x86 assembler nodes + */ +void ia32_transform_graph_by_pbqp(ia32_code_gen_t *cg); + +#endif /* FIRM_BE_IA32_IA32_PBQP_TRANSFORM_H */ -- 2.20.1