[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
Wed Aug 26 19:14:55 PDT 2020


jamieschmeiser added a comment.

--print-before-all will print the IR before every pass which can result in the IR being printed literally thousands of times while this option prints it only once.  The IR is saved in a string which is cleared each time and re-used so the memory overhead is not great; also this overhead is only hit when the option is requested.  It does slow the compilation when used but not as much as --print-before-all and the user does not have as difficult a task in extracting the IR from the output.  If the option is false (the default), the overhead is only the checking of the option.  Basically, --print-before-all is cumbersome for this purpose while this option is convenient.  Also, one could reasonably request a user to retrieve the IR (if they are willing) with this option when reporting a crash while requesting a user to use --print-before-all would not be reasonable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86657



More information about the llvm-commits mailing list