projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d41c190
)
becopyilp: fix search for aligned free color
author
Matthias Braun
<matze@braunis.de>
Thu, 26 Jan 2012 17:37:05 +0000
(18:37 +0100)
committer
Matthias Braun
<matthias.braun@kit.edu>
Thu, 1 Mar 2012 15:02:01 +0000
(16:02 +0100)
ir/be/becopyilp.c
patch
|
blob
|
history
diff --git
a/ir/be/becopyilp.c
b/ir/be/becopyilp.c
index
3e34848
..
b03ed5a
100644
(file)
--- a/
ir/be/becopyilp.c
+++ b/
ir/be/becopyilp.c
@@
-206,11
+206,15
@@
void sr_reinsert(size_red_t *sr)
/* now all bits not set are possible colors */
/* take one that matches the alignment constraint */
/* now all bits not set are possible colors */
/* take one that matches the alignment constraint */
- do {
- free_col = (unsigned)rbitset_next(possible_cols, 0, true);
- } while ((free_col % arch_get_irn_register_req(irn)->width) != 0
- && free_col != n_regs - 1);
+ free_col = 0;
assert(!rbitset_is_empty(possible_cols, n_regs) && "No free color found. This can not be.");
assert(!rbitset_is_empty(possible_cols, n_regs) && "No free color found. This can not be.");
+ while (true) {
+ free_col = (unsigned)rbitset_next(possible_cols, free_col, true);
+ if (free_col % arch_get_irn_register_req(irn)->width == 0)
+ break;
+ ++free_col;
+ assert(free_col < n_regs);
+ }
set_irn_col(sr->co->cls, irn, free_col);
pset_remove_ptr(sr->all_removed, irn); /* irn is back in graph again */
}
set_irn_col(sr->co->cls, irn, free_col);
pset_remove_ptr(sr->all_removed, irn); /* irn is back in graph again */
}