* @brief Backend node support for generic backend nodes.
* @author Sebastian Hack
* @date 17.05.2005
- * @version $Id$
*
* Backend node support for generic backend nodes.
* This file provides Perm, Copy, Spill and Reload nodes.
return a->align;
}
-static arch_irn_class_t be_node_classify(const ir_node *irn)
-{
- switch (get_irn_opcode(irn)) {
- case beo_Spill: return arch_irn_class_spill;
- case beo_Reload: return arch_irn_class_reload;
- case beo_Perm: return arch_irn_class_perm;
- case beo_Copy: return arch_irn_class_copy;
- default: return arch_irn_class_none;
- }
-}
-
static ir_entity *be_node_get_frame_entity(const ir_node *irn)
{
return be_get_frame_entity(irn);
/* for be nodes */
static const arch_irn_ops_t be_node_irn_ops = {
- be_node_classify,
be_node_get_frame_entity,
be_node_set_frame_offset,
be_node_get_sp_bias,
panic("Tried querying undefined register '%s' at Return", reg->name);
}
-static arch_irn_class_t dummy_classify(const ir_node *node)
-{
- (void) node;
- return arch_irn_class_none;
-}
-
static ir_entity* dummy_get_frame_entity(const ir_node *node)
{
(void) node;
/* for "middleend" nodes */
static const arch_irn_ops_t dummy_be_irn_ops = {
- dummy_classify,
dummy_get_frame_entity,
dummy_set_frame_offset,
dummy_get_sp_bias,
assert(mode_is_datab(get_irn_mode(node)));
}
-void be_dump_phi_reg_reqs(FILE *F, ir_node *node, dump_reason_t reason)
+void be_dump_phi_reg_reqs(FILE *F, const ir_node *node, dump_reason_t reason)
{
switch (reason) {
case dump_node_opcode_txt:
}
static const arch_irn_ops_t phi_irn_ops = {
- dummy_classify,
dummy_get_frame_entity,
dummy_set_frame_offset,
dummy_get_sp_bias,
/**
* ir_op-Operation: dump a be node to file
*/
-static void dump_node(FILE *f, ir_node *irn, dump_reason_t reason)
+static void dump_node(FILE *f, const ir_node *irn, dump_reason_t reason)
{
assert(is_be_node(irn));