projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a73cb23
)
incomplete offset calculation added
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Thu, 26 Apr 2007 21:14:32 +0000
(21:14 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Thu, 26 Apr 2007 21:14:32 +0000
(21:14 +0000)
[r13492]
ir/ana/irmemory.c
patch
|
blob
|
history
diff --git
a/ir/ana/irmemory.c
b/ir/ana/irmemory.c
index
03ed6cf
..
9b3343a
100644
(file)
--- a/
ir/ana/irmemory.c
+++ b/
ir/ana/irmemory.c
@@
-84,6
+84,25
@@
static ir_node *find_base_adr(ir_node *sel, ir_entity **pEnt) {
return ptr;
} /* find_base_adr */
return ptr;
} /* find_base_adr */
+/**
+ * Check if the address can be decomposed into base PLUS offset.
+ */
+static int has_offset(ir_node *adr, int *offset) {
+ if (is_SymConst(adr)) {
+ *offset = 0;
+ return 1;
+ }
+ if (is_Sel(adr)) {
+ ir_entity *ent = get_Sel_entity(adr);
+ ir_type *owner = get_entity_owner(ent);
+
+ if (get_type_state(owner) != layout_fixed) {
+ /* The layout is NOT fixed yet, symbolic evaluation needed */
+ }
+ }
+ return 0;
+} /* has_offset */
+
/**
* Two address expressions have the same base address,
* check if there offsets are different.
/**
* Two address expressions have the same base address,
* check if there offsets are different.
@@
-92,6
+111,10
@@
static ir_node *find_base_adr(ir_node *sel, ir_entity **pEnt) {
* @param adr2 The second address.
*/
static ir_alias_relation different_offsets(ir_node *adr1, ir_node *adr2) {
* @param adr2 The second address.
*/
static ir_alias_relation different_offsets(ir_node *adr1, ir_node *adr2) {
+ int offset1, offset2;
+ if (has_offset(adr1, &offset1) && has_offset(adr2, &offset2)) {
+ /* */
+ }
return may_alias;
} /* different_offsets */
return may_alias;
} /* different_offsets */