[PATCH] D72380: [DataFlow] Factor two worklist implementations out

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 8 11:45:42 PST 2020


xazax.hun added a comment.

Fortunately, UninitializedValues has some statistics. So I printed it for a big translation unit (SemaExpr.cpp) before and after this change.

Before:

  *** Analysis Based Warnings Stats:
  33023 functions analyzed (0 w/o CFGs).
    161696 CFG blocks built.
    4 average CFG blocks per function.
    1246 max CFG blocks per function.
  4792 functions analyzed for uninitialiazed variables
    9189 variables analyzed.
    1 average variables per function.
    55 max variables per function.
    47089 block visits.
    9 average block visits per function.
    1039 max block visits per function.

After:

  *** Analysis Based Warnings Stats:
  33023 functions analyzed (0 w/o CFGs).
    161696 CFG blocks built.
    4 average CFG blocks per function.
    1246 max CFG blocks per function.
  4792 functions analyzed for uninitialiazed variables
    9189 variables analyzed.
    1 average variables per function.
    55 max variables per function.
    45728 block visits.
    9 average block visits per function.
    1039 max block visits per function.

It looks like after getting rid of prepopulating the worklist we overall visit fewer blocks which sounds good. All the tests pass, so if those extra visits were necessary, we do not have test coverage for them. But this makes me think that performance-wise this change should not be bad.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72380/new/

https://reviews.llvm.org/D72380





More information about the cfe-commits mailing list