[PATCH] D86657: Add new hidden option -print-crash-IR that prints out IR that caused opt pipeline to crash

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 11:57:10 PDT 2020


jamieschmeiser updated this revision to Diff 288663.
jamieschmeiser added a comment.

Address review comments.

Change the name of the option to -print-on-crash.
Change the registered signal handler to be a global function that only
references other globals to avoid life-span problems.
Only register a single signal handler for multiple handlers that all refer
to the same global object.  This may cause corruption of the output
in some cases due to race conditions but this is deemed acceptable
since this is for developer use, rather than seen by a user.
Create a pass for the new pass manager that always triggers a crash but
is not put into any pipeline to allow testing of the option.
Finally, a test for the option is added.


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

https://reviews.llvm.org/D86657

Files:
  llvm/include/llvm/Passes/StandardInstrumentations.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/lib/Passes/StandardInstrumentations.cpp
  llvm/test/Other/print-on-crash.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86657.288663.patch
Type: text/x-patch
Size: 6864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200828/c37df27a/attachment.bin>


More information about the llvm-commits mailing list