Commit dfd861b2 authored by Matthias Braun's avatar Matthias Braun
Browse files

ia32: merge common_transform stuff back to transform

The common_transform stuff was meant to be reused by the PBQP code
selection which is not maintained anymore.
parent a008ea3f
......@@ -58,7 +58,6 @@
#include "gen_ia32_regalloc_if.h"
#include "ia32_architecture.h"
#include "ia32_common_transform.h"
#include "ia32_emitter.h"
#include "ia32_finish.h"
#include "ia32_fpu.h"
......
This diff is collapsed.
/*
* This file is part of libFirm.
* Copyright (C) 2012 University of Karlsruhe.
*/
/**
* @file
* @brief This file implements the common parts of IR transformation from
* firm into ia32-Firm.
* @author Matthias Braun, Sebastian Buchwald
*/
#ifndef FIRM_BE_IA32_IA32_COMMON_TRANSFORM_H
#define FIRM_BE_IA32_IA32_COMMON_TRANSFORM_H
#include "firm_types.h"
#include "bearch_ia32_t.h"
extern ir_heights_t *ia32_heights;
extern bool ia32_no_pic_adjust;
ir_type *ia32_get_prim_type(const ir_mode *mode);
/**
* Get an atomic entity that is initialized with a tarval forming
* a given constant.
*/
ir_entity *ia32_create_float_const_entity(ia32_isa_t *isa, ir_tarval *tv,
ident *name);
/**
* Create an immediate.
*
* @param irg The IR graph the node belongs to.
* @param entity if set, entity for the immediate
* @param val integer value for the immediate
*/
ir_node *ia32_create_Immediate_full(ir_graph *irg, ir_entity *entity, bool no_pic_adjust, int32_t val);
/**
* Create an immediate.
*
* @param irg The IR graph the node belongs to.
* @param val integer value for the immediate
*/
static inline ir_node *ia32_create_Immediate(ir_graph *const irg, int32_t const val)
{
return ia32_create_Immediate_full(irg, NULL, false, val);
}
/**
* returns register by name (used for determining clobber specifications in
* asm instructions)
*/
const arch_register_t *ia32_get_clobber_register(const char *clobber);
/**
* Return true if a mode can be stored in the GP register set.
*/
bool ia32_mode_needs_gp_reg(ir_mode *mode);
/**
* generates code for a ASM node
*/
ir_node *ia32_gen_ASM(ir_node *node);
/**
* Transforms a CopyB node.
*
* @return The transformed node.
*/
ir_node *ia32_gen_CopyB(ir_node *node);
/**
* Transform the Thread Local Storage Proj.
*/
ir_node *ia32_gen_Proj_tls(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 *ia32_gen_Unknown(ir_node *node);
/**
* Checks whether other node inputs depend on the am_candidate (via mem-proj).
*/
bool ia32_prevents_AM(ir_node *const block, ir_node *const am_candidate,
ir_node *const other);
ir_node *ia32_try_create_Immediate(ir_node *node, char immediate_constraint_type);
#endif
......@@ -56,7 +56,6 @@
#include "beutil.h"
#include "ia32_emitter.h"
#include "ia32_common_transform.h"
#include "gen_ia32_emitter.h"
#include "gen_ia32_regalloc_if.h"
#include "ia32_nodes_attr.h"
......
......@@ -24,7 +24,6 @@
#include "bearch_ia32_t.h"
#include "ia32_finish.h"
#include "ia32_new_nodes.h"
#include "ia32_common_transform.h"
#include "ia32_transform.h"
#include "ia32_optimize.h"
#include "gen_ia32_regalloc_if.h"
......
......@@ -17,7 +17,7 @@
#include "ia32_fpu.h"
#include "ia32_new_nodes.h"
#include "ia32_architecture.h"
#include "ia32_common_transform.h"
#include "ia32_transform.h"
#include "gen_ia32_regalloc_if.h"
#include "ircons.h"
......
......@@ -34,7 +34,6 @@
#include "beinfo.h"
#include "bearch_ia32_t.h"
#include "ia32_common_transform.h"
#include "ia32_nodes_attr.h"
#include "ia32_new_nodes.h"
#include "gen_ia32_regalloc_if.h"
......
......@@ -32,7 +32,6 @@
#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_architecture.h"
#include "util.h"
......
This diff is collapsed.
......@@ -48,4 +48,15 @@ void ia32_init_transform(void);
ir_node *ia32_new_IncSP(ir_node *block, ir_node *old_sp, int offset,
unsigned align);
const arch_register_t *ia32_get_clobber_register(const char *clobber);
ir_node *ia32_create_Immediate_full(ir_graph *irg, ir_entity *entity,
bool no_pic_adjust, int32_t val);
static inline ir_node *ia32_create_Immediate(ir_graph *const irg,
int32_t const val)
{
return ia32_create_Immediate_full(irg, NULL, false, val);
}
#endif
Markdown is supported
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