Dump reason why threads are being cancelled and abstract code.
We are inconsistent on dumping out reasons why a thread was canceled.
This makes debugging jump threading problems harder because paths can be
canceled with no reason given. This patch abstracts out the thread
canceling code and adds a reason for every cancellation.
Tested on x86-64 Linux.
gcc/ChangeLog:
* tree-ssa-threadupdate.c (cancel_thread): New.
(jump_thread_path_registry::thread_block_1): Use cancel_thread.
(jump_thread_path_registry::mark_threaded_blocks): Same.
(jump_thread_path_registry::register_jump_thread): Same.