[PATCH] D110621: [llvm-locstats] Report an error if overflow was detected by llvm-dwarfdump

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 02:43:30 PDT 2021


djtodoro added inline comments.


================
Comment at: llvm/utils/llvm-locstats/llvm-locstats.py:196-198
+    if json_parsed[name] == 'overflowed':
+      print ('error: "' + name + '" field overflowed.')
+      sys.exit(1)
----------------
dblaikie wrote:
> djtodoro wrote:
> > dblaikie wrote:
> > > Should it stop after the first overflowed field, or continue to print other stats?
> > Some stat fields are being calculated from the other, so I guess it is better not to show any stats, than to show wrong stats.
> I'd figure not to present incorrect stats - but render those tainted stats as tainted/invalid/incomputable in some way. (worst case they could say "overflow" too, though that could be slightly misleading/not-the-whole-story)
Hmm, it makes sense. There are some stats fields that are very important (such as `bytes in parent scope`), and if they overflow, we have to taint all the `locstats` fields.


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

https://reviews.llvm.org/D110621



More information about the llvm-commits mailing list