diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-12-01 17:16:18 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:05:24 -0700 |
commit | c08ff7ab5ea442ac4a03fba6998da377456e71e4 (patch) | |
tree | ba1f7a1153c423c362cb381b571e82b4079d50b8 /liveness.c | |
parent | Be more graceful about missing types and malformed expressions. (diff) | |
download | sparse-c08ff7ab5ea442ac4a03fba6998da377456e71e4.tar.gz sparse-c08ff7ab5ea442ac4a03fba6998da377456e71e4.tar.bz2 sparse-c08ff7ab5ea442ac4a03fba6998da377456e71e4.zip |
Walk the basic-block list in reverse order for liveness analysis
(this approximates depth-first) rather than in-order (~breadth first).
This hugely speeds up long chains pseudo use.
Diffstat (limited to 'liveness.c')
-rw-r--r-- | liveness.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -241,9 +241,9 @@ void track_pseudo_liveness(struct entrypoint *ep) /* Calculate liveness.. */ do { liveness_changed = 0; - FOR_EACH_PTR(ep->bbs, bb) { + FOR_EACH_PTR_REVERSE(ep->bbs, bb) { track_bb_liveness(bb); - } END_FOR_EACH_PTR(bb); + } END_FOR_EACH_PTR_REVERSE(bb); } while (liveness_changed); /* Remove the pseudos from the "defines" list that are used internally */ |