HIPIFY: [HIPIFY] Statistics reporting seems to be completely broken

  • Passing -o-stats without also passing -print-stats silently does nothing. No stats anywhere, no warning, and no mention of this behaviour in the help text.
  • Passing both options together does produce statistics output. And a segfault.
  • Using -o-stats=wat.csv or -o-stats=wat.csv -print-stats with a nonexistent input source file causes hipify to silently do nothing and yield a 0 exit code.

What’s the intended use-case of the stats output? I’m struggling to see why someone would want to know how many bytes of source hipify changed, or the total number of calls replaced. If they want to know what hipify did to their code, diff -u is extremely good at that.

Warnings about things it failed to convert make sense - but those should surely go through the clang diagnostics API, not this nonstandard output channel? Indeed, these are printed regardless of the stats option.

The stats system accounts for about a third of the code (excluding the lookup tables), and it’s tightly coupled into all sorts of random places to keep the counters in sync. Maybe just get rid of it?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

Whelp, now it works on clang-5.0, too, so this is entirely a non-issue now.