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
f56426a9
Commit
f56426a9
authored
Jul 02, 2013
by
Matthias Braun
Browse files
bring back bitfield sel skipping in irmemory.c
parent
1f9e2f1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ana/irmemory.c
View file @
f56426a9
...
...
@@ -432,6 +432,20 @@ ir_storage_class_class_t classify_pointer(const ir_node *irn,
return
res
;
}
static
const
ir_node
*
skip_bitfield_sels
(
const
ir_node
*
adr
)
{
while
(
is_Sel
(
adr
))
{
ir_entity
*
entity
=
get_Sel_entity
(
adr
);
if
(
is_compound_type
(
get_entity_owner
(
entity
))
&&
get_entity_bitfield_size
(
entity
)
>
0
)
{
adr
=
get_Sel_ptr
(
adr
);
}
else
{
break
;
}
}
return
adr
;
}
/**
* Determine the alias relation between two addresses.
*
...
...
@@ -548,6 +562,17 @@ static ir_alias_relation _get_alias_relation(
return
ir_sure_alias
;
}
/*
* Bitfields can be constructed as Sels from its base address.
* As they have different entities, the disambiguator would find that they
* are alias free. While this is true for its values, it is false for the
* addresses (strictly speaking, the Sel's are NOT the addresses of the
* bitfields).
* So, skip those bitfield selecting Sel's.
*/
adr1
=
skip_bitfield_sels
(
adr1
);
adr2
=
skip_bitfield_sels
(
adr2
);
/* skip Sels */
const
ir_node
*
base1
=
adr1
;
const
ir_node
*
base2
=
adr2
;
...
...
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