[PATCH] D150674: [RISCV] Set GenCrashDialog=true for various report_fatal_error calls in lib/Target/RISCV

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 07:56:00 PDT 2023


asb created this revision.
asb added reviewers: craig.topper, reames, kito-cheng.
Herald added subscribers: jobnoorman, luke, wingo, pmatos, VincentWu, abrachet, vkmr, frasercrmck, phosek, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
asb requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

The GenCrashDialog parameter to report_fatal_error controls whether a backtrace and an invitation to submit a bug report are printed. As a number of our users of report_fatal_error really indicate an exit with an error message for improper input, it's more appropriate to just print the diagnostic and exit rather than suggest a bug report (especially true for handling of errors from RISCVISAInfo). D62236 <https://reviews.llvm.org/D62236> is one patch I remember making a similar change.

This patch changes most report_fatal_error calls within lib/Target/RISCV to disable the backtrace and bug report suggestion. I've left it as the default (GenCrashDialog=true) for e.g. getRegisterByName, movImm as I think these are likely to represent an error on the LLVM side that deserves a bug report.


https://reviews.llvm.org/D150674

Files:
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
  llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
  llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp
  llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
  llvm/lib/Target/RISCV/RISCVSubtarget.cpp
  llvm/lib/Target/RISCV/RISCVTargetMachine.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150674.522618.patch
Type: text/x-patch
Size: 12252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230516/5f9dc0ef/attachment.bin>


More information about the llvm-commits mailing list