llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Block visitation order should account for CFG loops

Open ymand opened this issue 3 years ago • 1 comments

Currently, we visit blocks in topological order. While better than an arbitrary order, this fails to account for the effects of loops. Namely, that we will visit the successor of a loop before we've reached a fixpoint on a loop, potentially wasting all computation along that path, because of updates resulting from the loop.

Instead, we should use some form of hierarchical ordering, like those discussed in Bourdoncle's Efficient chaotic iteration strategies with widenings](https://citeseerx.ist.psu.edu/doc_view/pid/d885e8dc100cb95bf13cc36c8f0532a3ea4960b1).

ymand avatar Jan 24 '23 23:01 ymand

We changed the CFG's RPO order to respect loop structure. Benchmarks indicate this resolves all known issues.

ymand avatar Mar 07 '24 18:03 ymand