[all-commits] [llvm/llvm-project] 446268: [llvm-exegesis] Add a custom error for clustering

Miloš Stojanović via All-commits all-commits at lists.llvm.org
Fri Feb 7 05:35:40 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 446268a223452254e054714f252705858fc47563
      https://github.com/llvm/llvm-project/commit/446268a223452254e054714f252705858fc47563
  Author: Miloš Stojanović <Milos.Stojanovic at rt-rk.com>
  Date:   2020-02-07 (Fri, 07 Feb 2020)

  Changed paths:
    M llvm/tools/llvm-exegesis/lib/CMakeLists.txt
    M llvm/tools/llvm-exegesis/lib/Clustering.cpp
    A llvm/tools/llvm-exegesis/lib/Error.cpp
    M llvm/tools/llvm-exegesis/lib/Error.h
    M llvm/tools/llvm-exegesis/llvm-exegesis.cpp

  Log Message:
  -----------
  [llvm-exegesis] Add a custom error for clustering

All errors of type `Failure` are `StringError`s. In order for exit code
mapping to detect that specifically a clustering error has occurred it
needs to have a different type.

This patch also prepares D74085 where termination `report_fatal_error()`
will be replaced with emitting `StringError`s.

Differential Revision: https://reviews.llvm.org/D74124


  Commit: 830af528a550d5fa90c6106a26e8365fa077aca0
      https://github.com/llvm/llvm-project/commit/830af528a550d5fa90c6106a26e8365fa077aca0
  Author: Miloš Stojanović <Milos.Stojanovic at rt-rk.com>
  Date:   2020-02-07 (Fri, 07 Feb 2020)

  Changed paths:
    M llvm/tools/llvm-exegesis/llvm-exegesis.cpp

  Log Message:
  -----------
  Recommit: "[llvm-exegesis] Improve error reporting"

Summary: Commit b3576f60ebc8f660afad8120a72473be47517573 was reverted in
abe01e17f648a97666d4fbed41f0861686a17972 because it broke builds testing
without libpfm. A preparatory commit <commit_sha1> was added to enable
this recommit.

Original commit message:

Fix inconsistencies in error reporting created by mixing
`report_fatal_error()` and `ExitOnErr()`, and add additional information
to the error message to make it more user friendly. Minimize the use
`report_fatal_error()` because it's meant for use in very rare cases and
it results in low information density of the error messages.

Summary of the new design:

 * For command line argument errors output `llvm-exegesis: <error_message>`,
   which is consistent with the error output format emitted by the backend
   which checks correctness of the command line arguments.
 * For other errors the format `llvm-exegesis error: <error_message>` is used.
 ** If the error occurred during file access `<error_message>` will have
    of two parts: `'<file_name>': <rest_of_the_error_message>`

Differential Revision: https://reviews.llvm.org/D74085


  Commit: 4bd40f71a72c3d9b7137bd9eb8767b6c140ae92e
      https://github.com/llvm/llvm-project/commit/4bd40f71a72c3d9b7137bd9eb8767b6c140ae92e
  Author: Miloš Stojanović <Milos.Stojanovic at rt-rk.com>
  Date:   2020-02-07 (Fri, 07 Feb 2020)

  Changed paths:
    M llvm/tools/llvm-exegesis/lib/Target.cpp
    M llvm/tools/llvm-exegesis/lib/Target.h
    M llvm/tools/llvm-exegesis/llvm-exegesis.cpp

  Log Message:
  -----------
  Recommit: "[llvm-exegesis] Improve error reporting in Target.cpp"

Summary: Commit 141915963b6ab36ee4e577d1b27673fa4d05b409 was reverted in
abe01e17f648a97666d4fbed41f0861686a17972 because it broke builds testing
without libpfm. A preparatory commit <commit_sha1> was added to enable
this recommit.

Original commit message:

Followup to D74085.
Replace the use of `report_fatal_error()` with returning the error to
`llvm-exegesis.cpp` and handling it there.

Differential Revision: https://reviews.llvm.org/D74113


Compare: https://github.com/llvm/llvm-project/compare/2de2275cbdb8...4bd40f71a72c


More information about the All-commits mailing list