Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
09913c64
Commit
09913c64
authored
Feb 24, 2011
by
Michael Beck
Browse files
Constify node_cmp_attr_func.
[r28458]
parent
cf1faf80
Changes
9
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irop.h
View file @
09913c64
/*
* Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
* Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
...
...
@@ -165,7 +165,7 @@ typedef ir_node *(*transform_node_func)(ir_node *self);
* Compares the nodes attributes of two nodes of identical opcode
* and returns 0 if the attributes are identical, 1 if they differ.
*/
typedef
int
(
*
node_cmp_attr_func
)(
ir_node
*
a
,
ir_node
*
b
);
typedef
int
(
*
node_cmp_attr_func
)(
const
ir_node
*
a
,
const
ir_node
*
b
);
/**
* The reassociation operation.
...
...
ir/be/amd64/amd64_new_nodes.c
View file @
09913c64
/*
* Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
* Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
...
...
@@ -153,7 +153,7 @@ static void init_amd64_SymConst_attributes(ir_node *node, ir_entity *entity)
}
/** Compare node attributes for SymConst. */
static
int
cmp_amd64_attr_SymConst
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_amd64_attr_SymConst
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
amd64_SymConst_attr_t
*
attr_a
=
get_amd64_SymConst_attr_const
(
a
);
const
amd64_SymConst_attr_t
*
attr_b
=
get_amd64_SymConst_attr_const
(
b
);
...
...
@@ -166,7 +166,7 @@ static int cmp_amd64_attr_SymConst(ir_node *a, ir_node *b)
}
/** Compare common amd64 node attributes. */
static
int
cmp_amd64_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_amd64_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
amd64_attr_t
*
attr_a
=
get_amd64_attr_const
(
a
);
const
amd64_attr_t
*
attr_b
=
get_amd64_attr_const
(
b
);
...
...
ir/be/arm/arm_new_nodes.c
View file @
09913c64
/*
* Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
* Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
...
...
@@ -420,14 +420,14 @@ static void init_arm_CopyB_attributes(ir_node *res, unsigned size)
attr
->
size
=
size
;
}
static
int
cmp_attr_arm
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_arm
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
(
void
)
a
;
(
void
)
b
;
return
0
;
}
static
int
cmp_attr_arm_SymConst
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_arm_SymConst
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
arm_SymConst_attr_t
*
attr_a
;
const
arm_SymConst_attr_t
*
attr_b
;
...
...
@@ -441,7 +441,7 @@ static int cmp_attr_arm_SymConst(ir_node *a, ir_node *b)
||
attr_a
->
fp_offset
!=
attr_b
->
fp_offset
;
}
static
int
cmp_attr_arm_CopyB
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_arm_CopyB
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
arm_CopyB_attr_t
*
attr_a
;
const
arm_CopyB_attr_t
*
attr_b
;
...
...
@@ -454,7 +454,7 @@ static int cmp_attr_arm_CopyB(ir_node *a, ir_node *b)
return
attr_a
->
size
!=
attr_b
->
size
;
}
static
int
cmp_attr_arm_CondJmp
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_arm_CondJmp
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
(
void
)
a
;
(
void
)
b
;
...
...
@@ -462,7 +462,7 @@ static int cmp_attr_arm_CondJmp(ir_node *a, ir_node *b)
return
1
;
}
static
int
cmp_attr_arm_SwitchJmp
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_arm_SwitchJmp
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
(
void
)
a
;
(
void
)
b
;
...
...
@@ -470,7 +470,7 @@ static int cmp_attr_arm_SwitchJmp(ir_node *a, ir_node *b)
return
1
;
}
static
int
cmp_attr_arm_fConst
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_arm_fConst
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
arm_fConst_attr_t
*
attr_a
;
const
arm_fConst_attr_t
*
attr_b
;
...
...
ir/be/beinfo.c
View file @
09913c64
/*
* Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
* Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
...
...
@@ -75,7 +75,7 @@ static void new_phi_copy_attr(ir_graph *irg, const ir_node *old_node,
old_phi_copy_attr
(
irg
,
old_node
,
new_node
);
}
int
be_nodes_equal
(
ir_node
*
node1
,
ir_node
*
node2
)
int
be_nodes_equal
(
const
ir_node
*
node1
,
const
ir_node
*
node2
)
{
const
backend_info_t
*
info1
=
be_get_info
(
node1
);
const
backend_info_t
*
info2
=
be_get_info
(
node2
);
...
...
ir/be/beinfo.h
View file @
09913c64
/*
* Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
* Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
...
...
@@ -65,6 +65,6 @@ void be_info_new_node(ir_node *node);
void
be_info_duplicate
(
const
ir_node
*
old_node
,
ir_node
*
new_node
);
int
be_info_initialized
(
const
ir_graph
*
irg
);
int
be_nodes_equal
(
ir_node
*
node1
,
ir_node
*
node2
);
int
be_nodes_equal
(
const
ir_node
*
node1
,
const
ir_node
*
node2
);
#endif
ir/be/benode.c
View file @
09913c64
/*
* Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
* Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
...
...
@@ -112,7 +112,7 @@ ir_op *op_be_Barrier;
*
* @return zero if both nodes have identically attributes
*/
static
int
FrameAddr_cmp_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
FrameAddr_cmp_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
be_frame_attr_t
*
a_attr
=
(
const
be_frame_attr_t
*
)
get_irn_generic_attr_const
(
a
);
const
be_frame_attr_t
*
b_attr
=
(
const
be_frame_attr_t
*
)
get_irn_generic_attr_const
(
b
);
...
...
@@ -128,7 +128,7 @@ static int FrameAddr_cmp_attr(ir_node *a, ir_node *b)
*
* @return zero if both nodes have identically attributes
*/
static
int
Return_cmp_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
Return_cmp_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
be_return_attr_t
*
a_attr
=
(
const
be_return_attr_t
*
)
get_irn_generic_attr_const
(
a
);
const
be_return_attr_t
*
b_attr
=
(
const
be_return_attr_t
*
)
get_irn_generic_attr_const
(
b
);
...
...
@@ -148,7 +148,7 @@ static int Return_cmp_attr(ir_node *a, ir_node *b)
*
* @return zero if both nodes have identically attributes
*/
static
int
IncSP_cmp_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
IncSP_cmp_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
be_incsp_attr_t
*
a_attr
=
(
const
be_incsp_attr_t
*
)
get_irn_generic_attr_const
(
a
);
const
be_incsp_attr_t
*
b_attr
=
(
const
be_incsp_attr_t
*
)
get_irn_generic_attr_const
(
b
);
...
...
@@ -164,7 +164,7 @@ static int IncSP_cmp_attr(ir_node *a, ir_node *b)
*
* @return zero if both nodes have identically attributes
*/
static
int
Call_cmp_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
Call_cmp_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
be_call_attr_t
*
a_attr
=
(
const
be_call_attr_t
*
)
get_irn_generic_attr_const
(
a
);
const
be_call_attr_t
*
b_attr
=
(
const
be_call_attr_t
*
)
get_irn_generic_attr_const
(
b
);
...
...
ir/be/ia32/ia32_new_nodes.c
View file @
09913c64
/*
* Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
* Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
...
...
@@ -957,7 +957,7 @@ static int ia32_compare_attr(const ia32_attr_t *a, const ia32_attr_t *b)
}
/** Compare nodes attributes for all "normal" nodes. */
static
int
ia32_compare_nodes_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
ia32_compare_nodes_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
ia32_attr_t
*
attr_a
=
get_ia32_attr_const
(
a
);
const
ia32_attr_t
*
attr_b
=
get_ia32_attr_const
(
b
);
...
...
@@ -966,7 +966,7 @@ static int ia32_compare_nodes_attr(ir_node *a, ir_node *b)
}
/** Compare node attributes for nodes with condition code. */
static
int
ia32_compare_condcode_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
ia32_compare_condcode_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
ia32_condcode_attr_t
*
attr_a
;
const
ia32_condcode_attr_t
*
attr_b
;
...
...
@@ -984,7 +984,7 @@ static int ia32_compare_condcode_attr(ir_node *a, ir_node *b)
}
/** Compare node attributes for nodes with condition code. */
static
int
ia32_compare_switch_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
ia32_compare_switch_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
ia32_switch_attr_t
*
attr_a
;
const
ia32_switch_attr_t
*
attr_b
;
...
...
@@ -1002,7 +1002,7 @@ static int ia32_compare_switch_attr(ir_node *a, ir_node *b)
}
/** Compare node attributes for call nodes. */
static
int
ia32_compare_call_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
ia32_compare_call_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
ia32_call_attr_t
*
attr_a
;
const
ia32_call_attr_t
*
attr_b
;
...
...
@@ -1023,7 +1023,7 @@ static int ia32_compare_call_attr(ir_node *a, ir_node *b)
}
/** Compare node attributes for CopyB nodes. */
static
int
ia32_compare_copyb_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
ia32_compare_copyb_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
ia32_copyb_attr_t
*
attr_a
;
const
ia32_copyb_attr_t
*
attr_b
;
...
...
@@ -1042,7 +1042,7 @@ static int ia32_compare_copyb_attr(ir_node *a, ir_node *b)
/** Compare ASM node attributes. */
static
int
ia32_compare_asm_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
ia32_compare_asm_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
ia32_asm_attr_t
*
attr_a
;
const
ia32_asm_attr_t
*
attr_b
;
...
...
@@ -1070,7 +1070,7 @@ static unsigned ia32_hash_Immediate(const ir_node *irn)
}
/** Compare node attributes for Immediates. */
static
int
ia32_compare_immediate_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
ia32_compare_immediate_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
ia32_immediate_attr_t
*
attr_a
=
get_ia32_immediate_attr_const
(
a
);
const
ia32_immediate_attr_t
*
attr_b
=
get_ia32_immediate_attr_const
(
b
);
...
...
@@ -1086,13 +1086,13 @@ static int ia32_compare_immediate_attr(ir_node *a, ir_node *b)
}
/** Compare node attributes for x87 nodes. */
static
int
ia32_compare_x87_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
ia32_compare_x87_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
return
ia32_compare_nodes_attr
(
a
,
b
);
}
/** Compare node attributes for ClimbFrame nodes. */
static
int
ia32_compare_climbframe_attr
(
ir_node
*
a
,
ir_node
*
b
)
static
int
ia32_compare_climbframe_attr
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
ia32_climbframe_attr_t
*
attr_a
;
const
ia32_climbframe_attr_t
*
attr_b
;
...
...
ir/be/sparc/sparc_new_nodes.c
View file @
09913c64
/*
* Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
* Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
...
...
@@ -299,7 +299,7 @@ static void sparc_copy_attr(ir_graph *irg, const ir_node *old_node,
/**
* compare some node's attributes
*/
static
int
cmp_attr_sparc
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_sparc
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
sparc_attr_t
*
attr_a
=
get_sparc_attr_const
(
a
);
const
sparc_attr_t
*
attr_b
=
get_sparc_attr_const
(
b
);
...
...
@@ -308,7 +308,7 @@ static int cmp_attr_sparc(ir_node *a, ir_node *b)
||
attr_a
->
immediate_value_entity
!=
attr_b
->
immediate_value_entity
;
}
static
int
cmp_attr_sparc_load_store
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_sparc_load_store
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
sparc_load_store_attr_t
*
attr_a
=
get_sparc_load_store_attr_const
(
a
);
const
sparc_load_store_attr_t
*
attr_b
=
get_sparc_load_store_attr_const
(
b
);
...
...
@@ -320,7 +320,7 @@ static int cmp_attr_sparc_load_store(ir_node *a, ir_node *b)
||
attr_a
->
load_store_mode
!=
attr_b
->
load_store_mode
;
}
static
int
cmp_attr_sparc_jmp_cond
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_sparc_jmp_cond
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
sparc_jmp_cond_attr_t
*
attr_a
=
get_sparc_jmp_cond_attr_const
(
a
);
const
sparc_jmp_cond_attr_t
*
attr_b
=
get_sparc_jmp_cond_attr_const
(
b
);
...
...
@@ -332,7 +332,7 @@ static int cmp_attr_sparc_jmp_cond(ir_node *a, ir_node *b)
||
attr_a
->
is_unsigned
!=
attr_b
->
is_unsigned
;
}
static
int
cmp_attr_sparc_switch_jmp
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_sparc_switch_jmp
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
sparc_switch_jmp_attr_t
*
attr_a
=
get_sparc_switch_jmp_attr_const
(
a
);
const
sparc_switch_jmp_attr_t
*
attr_b
=
get_sparc_switch_jmp_attr_const
(
b
);
...
...
@@ -343,7 +343,7 @@ static int cmp_attr_sparc_switch_jmp(ir_node *a, ir_node *b)
return
attr_a
->
default_proj_num
!=
attr_b
->
default_proj_num
;
}
static
int
cmp_attr_sparc_fp
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_sparc_fp
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
sparc_fp_attr_t
*
attr_a
=
get_sparc_fp_attr_const
(
a
);
const
sparc_fp_attr_t
*
attr_b
=
get_sparc_fp_attr_const
(
b
);
...
...
@@ -354,7 +354,7 @@ static int cmp_attr_sparc_fp(ir_node *a, ir_node *b)
return
attr_a
->
fp_mode
!=
attr_b
->
fp_mode
;
}
static
int
cmp_attr_sparc_fp_conv
(
ir_node
*
a
,
ir_node
*
b
)
static
int
cmp_attr_sparc_fp_conv
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
sparc_fp_conv_attr_t
*
attr_a
=
get_sparc_fp_conv_attr_const
(
a
);
const
sparc_fp_conv_attr_t
*
attr_b
=
get_sparc_fp_conv_attr_const
(
b
);
...
...
ir/ir/iropt.c
View file @
09913c64
...
...
@@ -5863,19 +5863,19 @@ static ir_op_ops *firm_set_default_transform_node(ir_opcode code, ir_op_ops *ops
#define N_IR_NODES 512
/** Compares the attributes of two Const nodes. */
static
int
node_cmp_attr_Const
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Const
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
return
get_Const_tarval
(
a
)
!=
get_Const_tarval
(
b
);
}
/** Compares the attributes of two Proj nodes. */
static
int
node_cmp_attr_Proj
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Proj
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
return
a
->
attr
.
proj
.
proj
!=
b
->
attr
.
proj
.
proj
;
}
/* node_cmp_attr_Proj */
/** Compares the attributes of two Alloc nodes. */
static
int
node_cmp_attr_Alloc
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Alloc
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
alloc_attr
*
pa
=
&
a
->
attr
.
alloc
;
const
alloc_attr
*
pb
=
&
b
->
attr
.
alloc
;
...
...
@@ -5883,7 +5883,7 @@ static int node_cmp_attr_Alloc(ir_node *a, ir_node *b)
}
/* node_cmp_attr_Alloc */
/** Compares the attributes of two Free nodes. */
static
int
node_cmp_attr_Free
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Free
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
free_attr
*
pa
=
&
a
->
attr
.
free
;
const
free_attr
*
pb
=
&
b
->
attr
.
free
;
...
...
@@ -5891,7 +5891,7 @@ static int node_cmp_attr_Free(ir_node *a, ir_node *b)
}
/* node_cmp_attr_Free */
/** Compares the attributes of two SymConst nodes. */
static
int
node_cmp_attr_SymConst
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_SymConst
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
symconst_attr
*
pa
=
&
a
->
attr
.
symc
;
const
symconst_attr
*
pb
=
&
b
->
attr
.
symc
;
...
...
@@ -5900,7 +5900,7 @@ static int node_cmp_attr_SymConst(ir_node *a, ir_node *b)
}
/** Compares the attributes of two Call nodes. */
static
int
node_cmp_attr_Call
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Call
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
call_attr
*
pa
=
&
a
->
attr
.
call
;
const
call_attr
*
pb
=
&
b
->
attr
.
call
;
...
...
@@ -5909,7 +5909,7 @@ static int node_cmp_attr_Call(ir_node *a, ir_node *b)
}
/* node_cmp_attr_Call */
/** Compares the attributes of two Sel nodes. */
static
int
node_cmp_attr_Sel
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Sel
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
ir_entity
*
a_ent
=
get_Sel_entity
(
a
);
const
ir_entity
*
b_ent
=
get_Sel_entity
(
b
);
...
...
@@ -5917,7 +5917,7 @@ static int node_cmp_attr_Sel(ir_node *a, ir_node *b)
}
/* node_cmp_attr_Sel */
/** Compares the attributes of two Phi nodes. */
static
int
node_cmp_attr_Phi
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Phi
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
/* we can only enter this function if both nodes have the same number of inputs,
hence it is enough to check if one of them is a Phi0 */
...
...
@@ -5929,19 +5929,19 @@ static int node_cmp_attr_Phi(ir_node *a, ir_node *b)
}
/* node_cmp_attr_Phi */
/** Compares the attributes of two Conv nodes. */
static
int
node_cmp_attr_Conv
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Conv
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
return
get_Conv_strict
(
a
)
!=
get_Conv_strict
(
b
);
}
/* node_cmp_attr_Conv */
/** Compares the attributes of two Cast nodes. */
static
int
node_cmp_attr_Cast
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Cast
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
return
get_Cast_type
(
a
)
!=
get_Cast_type
(
b
);
}
/* node_cmp_attr_Cast */
/** Compares the attributes of two Load nodes. */
static
int
node_cmp_attr_Load
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Load
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
if
(
get_Load_volatility
(
a
)
==
volatility_is_volatile
||
get_Load_volatility
(
b
)
==
volatility_is_volatile
)
...
...
@@ -5955,7 +5955,7 @@ static int node_cmp_attr_Load(ir_node *a, ir_node *b)
}
/* node_cmp_attr_Load */
/** Compares the attributes of two Store nodes. */
static
int
node_cmp_attr_Store
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Store
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
/* do not CSE Stores with different alignment. Be conservative. */
if
(
get_Store_align
(
a
)
!=
get_Store_align
(
b
))
...
...
@@ -5967,7 +5967,7 @@ static int node_cmp_attr_Store(ir_node *a, ir_node *b)
}
/* node_cmp_attr_Store */
/** Compares two exception attributes */
static
int
node_cmp_exception
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_exception
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
except_attr
*
ea
=
&
a
->
attr
.
except
;
const
except_attr
*
eb
=
&
b
->
attr
.
except
;
...
...
@@ -5978,7 +5978,7 @@ static int node_cmp_exception(ir_node *a, ir_node *b)
#define node_cmp_attr_Bound node_cmp_exception
/** Compares the attributes of two Div nodes. */
static
int
node_cmp_attr_Div
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Div
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
div_attr
*
ma
=
&
a
->
attr
.
div
;
const
div_attr
*
mb
=
&
b
->
attr
.
div
;
...
...
@@ -5988,7 +5988,7 @@ static int node_cmp_attr_Div(ir_node *a, ir_node *b)
}
/* node_cmp_attr_Div */
/** Compares the attributes of two Mod nodes. */
static
int
node_cmp_attr_Mod
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Mod
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
const
mod_attr
*
ma
=
&
a
->
attr
.
mod
;
const
mod_attr
*
mb
=
&
b
->
attr
.
mod
;
...
...
@@ -5997,21 +5997,21 @@ static int node_cmp_attr_Mod(ir_node *a, ir_node *b)
}
/* node_cmp_attr_Mod */
/** Compares the attributes of two Confirm nodes. */
static
int
node_cmp_attr_Confirm
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Confirm
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
/* no need to compare the bound, as this is a input */
return
(
get_Confirm_cmp
(
a
)
!=
get_Confirm_cmp
(
b
));
}
/* node_cmp_attr_Confirm */
/** Compares the attributes of two Builtin nodes. */
static
int
node_cmp_attr_Builtin
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Builtin
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
/* no need to compare the type, equal kind means equal type */
return
get_Builtin_kind
(
a
)
!=
get_Builtin_kind
(
b
);
}
/* node_cmp_attr_Builtin */
/** Compares the attributes of two ASM nodes. */
static
int
node_cmp_attr_ASM
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_ASM
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
int
i
,
n
;
const
ir_asm_constraint
*
ca
;
...
...
@@ -6058,7 +6058,7 @@ static int node_cmp_attr_ASM(ir_node *a, ir_node *b)
}
/* node_cmp_attr_ASM */
/** Compares the inexistent attributes of two Dummy nodes. */
static
int
node_cmp_attr_Dummy
(
ir_node
*
a
,
ir_node
*
b
)
static
int
node_cmp_attr_Dummy
(
const
ir_node
*
a
,
const
ir_node
*
b
)
{
(
void
)
a
;
(
void
)
b
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment