Commit 032fcdc
committed
C++: Don't rely on reverse reads to obtain nested store steps, as this
creates bad performance.
In the AST dataflow library the 'final' reverse read step will read from
the beginning of a chain of field dereferences (i.e., the x in x.y.z =
source()). Typically, this start node will not be a source in the
localFlowStep relation.
This is different in the IR, where the 'final' reverse read step (up
until this commit) was the total chi operand, and this total chi operand
will typically be the source of several simpleLocalFlowStep results.
This can create pathological cases where a node can both end a big step
in the dataflow library, but also be part of a _bigger_ big step. This
caused a huge performance regression on openjdk.
This commit avoids reverse reads, and instead creates explicit store
steps for nested field dereferences. We compute the final step from the
FieldNode to the total chi operand as a simpleFlowStep instead, thus
avoiding the performance problem.
Lesson learned: Be sure that the target of your readStep isn't also a
source in your localFlowStep relation.1 parent d07f393 commit 032fcdc
1 file changed
Lines changed: 18 additions & 17 deletions
Lines changed: 18 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
287 | 297 | | |
288 | 298 | | |
289 | 299 | | |
| |||
293 | 303 | | |
294 | 304 | | |
295 | 305 | | |
296 | | - | |
| 306 | + | |
| 307 | + | |
297 | 308 | | |
298 | 309 | | |
299 | 310 | | |
| |||
396 | 407 | | |
397 | 408 | | |
398 | 409 | | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
408 | 413 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
| 414 | + | |
| 415 | + | |
415 | 416 | | |
416 | 417 | | |
417 | 418 | | |
| |||
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
458 | | - | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
| |||
0 commit comments