Commit b38b52e7 authored by yb9976's avatar yb9976
Browse files

Moved common code of ia32_pbqp_transform and ia32_transform into separate file.

[r21068]
parent de2d9512
......@@ -76,6 +76,7 @@
#include "ia32_new_nodes.h"
#include "gen_ia32_regalloc_if.h"
#include "gen_ia32_machine.h"
#include "ia32_common_transform.h"
#include "ia32_transform.h"
#include "ia32_emitter.h"
#include "ia32_map_regs.h"
......@@ -947,7 +948,7 @@ static void ia32_prepare_graph(void *self) {
if (cg->dump)
be_dump(cg->irg, "-pre_transform", dump_ir_block_graph_sched);
#ifdef FIRM_GRGEN_BE
#ifndef FIRM_GRGEN_BE
// disable CSE, because of two-step node-construction
set_opt_cse(0);
......
This diff is collapsed.
/*
* 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 common parts of IR transformation from
* firm into ia32-Firm.
* @author Sebastian Buchwald
* @version $Id: ia32_common_transform.h 20999 2008-08-05 16:48:29Z beck $
*/
#ifndef FIRM_BE_IA32_IA32_COMMON_TRANSFORM_H
#define FIRM_BE_IA32_IA32_COMMON_TRANSFORM_H
#include "bearch_ia32_t.h"
/**
* An assembler constraint.
*/
typedef struct constraint_t constraint_t;
struct constraint_t {
const arch_register_class_t *cls;
unsigned allowed_registers;
char all_registers_allowed;
char memory_possible;
char immediate_type;
int same_as;
};
extern ia32_code_gen_t *env_cg;
/**
* Get an atomic entity that is initialized with a tarval forming
* a given constant.
*
* @param cnst the node representing the constant
*/
ir_entity *create_float_const_entity(ir_node *cnst);
/**
* Creates an immediate.
*
* @param symconst if set, create a SymConst immediate
* @param symconst_sign sign for the symconst
* @param val integer value for the immediate
*/
ir_node *create_Immediate(ir_entity *symconst, int symconst_sign, long val);
/**
* returns register by name (used for determining clobber specifications in
* asm instructions)
*/
const arch_register_t *ia32_get_clobber_register(const char *clobber);
#ifndef NDEBUG
/**
* Prints the old node name on cg obst and returns a pointer to it.
*/
const char *ia32_get_old_node_name(ia32_code_gen_t *cg, ir_node *irn);
#endif /* NDEBUG */
/**
* Return true if a mode can be stored in the GP register set.
*/
int ia32_mode_needs_gp_reg(ir_mode *mode);
/**
* generates code for a ASM node
*/
ir_node *gen_ASM(ir_node *node);
/**
* This function just sets the register for the Unknown node
* as this is not done during register allocation because Unknown
* is an "ignore" node.
*/
ir_node *gen_Unknown(ir_node *node);
const arch_register_req_t *make_register_req(const constraint_t *constraint,
int n_outs, const arch_register_req_t **out_reqs, int pos);
const arch_register_req_t *parse_clobber(const char *clobber);
ir_node *try_create_Immediate(ir_node *node, char immediate_constraint_type);
#endif /* FIRM_BE_IA32_IA32_COMMON_TRANSFORM_H */
......@@ -44,6 +44,7 @@
#include "ia32_finish.h"
#include "ia32_new_nodes.h"
#include "ia32_map_regs.h"
#include "ia32_common_transform.h"
#include "ia32_transform.h"
#include "ia32_dbg_stat.h"
#include "ia32_optimize.h"
......
......@@ -51,6 +51,7 @@
#include "ia32_optimize.h"
#include "bearch_ia32_t.h"
#include "gen_ia32_regalloc_if.h"
#include "ia32_common_transform.h"
#include "ia32_transform.h"
#include "ia32_dbg_stat.h"
#include "ia32_util.h"
......
This diff is collapsed.
......@@ -34,13 +34,6 @@
*/
void ia32_transform_graph(ia32_code_gen_t *cg);
#ifndef NDEBUG
/**
* Prints the old node name on cg obst and returns a pointer to it.
*/
const char *ia32_get_old_node_name(ia32_code_gen_t *cg, ir_node *irn);
#endif /* NDEBUG */
/**
* Some constants needed for code generation.
* Generated on demand.
......@@ -54,27 +47,6 @@ typedef enum {
ia32_known_const_max /**< last constant */
} ia32_known_const_t;
static const arch_register_req_t no_register_req = {
arch_register_req_type_none,
NULL, /* regclass */
NULL, /* limit bitset */
0, /* same pos */
0 /* different pos */
};
/**
* An assembler constraint.
*/
typedef struct constraint_t constraint_t;
struct constraint_t {
const arch_register_class_t *cls;
unsigned allowed_registers;
char all_registers_allowed;
char memory_possible;
char immediate_type;
int same_as;
};
/**
* Generate a known floating point constant
*/
......@@ -87,24 +59,4 @@ void ia32_add_missing_keeps(ia32_code_gen_t *cg);
*/
ir_node *ia32_skip_downconv(ir_node *node);
/**
* Get a primitive type for a mode.
*/
ir_type *ia32_get_prim_type(pmap *types, ir_mode *mode);
/**
* Return true if a mode can be stored in the GP register set
*/
int ia32_mode_needs_gp_reg(ir_mode *mode);
void ia32_parse_asm_constraints(constraint_t *constraint, const char *c);
void ia32_parse_clobber(ir_node *node, int pos, constraint_t *constraint,
const char *clobber);
/**
* returns register by name (used for determining clobber specifications in
* asm instructions)
*/
const arch_register_t *ia32_get_clobber_register(const char *clobber);
#endif /* FIRM_BE_IA32_IA32_TRANSFORM_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment