Commit 38604cf
committed
Local bitvector analysis: reduce number of node visits
By using a set instead of a stack as work queue we reduce the number of
visits to each node in two ways:
1) The work queue will not contain duplicate nodes.
2) When dequeuing successor nodes, back edges will be given preference
over forward ones. Once the later (in program order) node is visited,
more information is already merged into the abstract state.
On a goto function with 160822 instruction, this reduces processing time
(just the local bitvector analysis) from 1700 seconds down to 72
seconds. The number of invocations of `local_bitvector_analysist::merge`
previously was 32815499 (204 times the number of nodes), and is now
997083 (6 times the number of nodes).1 parent eeddb3f commit 38604cf
File tree
2 files changed
+5
-9
lines changed- src/analyses
2 files changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
| 245 | + | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
182 | 180 | | |
183 | 181 | | |
184 | 182 | | |
185 | | - | |
186 | | - | |
187 | 183 | | |
188 | 184 | | |
189 | 185 | | |
| |||
0 commit comments