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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to