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
1786345c
Commit
1786345c
authored
Jun 27, 2016
by
Christoph Mallon
Browse files
Correctly use the element type, not the array type, for Load/Store.
parent
9acafd2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/irprofile.c
View file @
1786345c
...
...
@@ -218,17 +218,18 @@ static void instrument_block(ir_node *const bb, ir_node *const address, unsigned
if
(
bb
==
get_irg_end_block
(
irg
))
return
;
ir_type
*
const
type_Iu
=
get_entity_type
(
get_irn_entity_attr
(
address
));
ir_type
*
const
type_arr
=
get_entity_type
(
get_irn_entity_attr
(
address
));
ir_type
*
const
type_ctr
=
get_array_element_type
(
type_arr
);
ir_node
*
const
unknown
=
new_r_Unknown
(
irg
,
mode_M
);
ir_mode
*
const
mode_off
=
get_reference_offset_mode
(
get_irn_mode
(
address
));
ir_node
*
const
cnst
=
new_r_Const_long
(
irg
,
mode_off
,
get_mode_size_bytes
(
mode_Iu
)
*
id
);
ir_node
*
const
offset
=
new_r_Add
(
bb
,
address
,
cnst
);
ir_node
*
const
load
=
new_r_Load
(
bb
,
unknown
,
offset
,
mode_Iu
,
type_
Iu
,
cons_none
);
ir_node
*
const
load
=
new_r_Load
(
bb
,
unknown
,
offset
,
mode_Iu
,
type_
ctr
,
cons_none
);
ir_node
*
const
lmem
=
new_r_Proj
(
load
,
mode_M
,
pn_Load_M
);
ir_node
*
const
proji
=
new_r_Proj
(
load
,
mode_Iu
,
pn_Load_res
);
ir_node
*
const
one
=
new_r_Const_one
(
irg
,
mode_Iu
);
ir_node
*
const
add
=
new_r_Add
(
bb
,
proji
,
one
);
ir_node
*
const
store
=
new_r_Store
(
bb
,
lmem
,
offset
,
add
,
type_
Iu
,
cons_none
);
ir_node
*
const
store
=
new_r_Store
(
bb
,
lmem
,
offset
,
add
,
type_
ctr
,
cons_none
);
ir_node
*
const
smem
=
new_r_Proj
(
store
,
mode_M
,
pn_Store_M
);
set_irn_link
(
bb
,
smem
);
...
...
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