aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-12-01 17:16:18 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:24 -0700
commitc08ff7ab5ea442ac4a03fba6998da377456e71e4 (patch)
treeba1f7a1153c423c362cb381b571e82b4079d50b8 /liveness.c
parentBe more graceful about missing types and malformed expressions. (diff)
downloadsparse-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liveness.c b/liveness.c
index 3725327..39d3721 100644
--- a/liveness.c
+++ b/liveness.c
@@ -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 */