Dump reason why threads are being cancelled and abstract code.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 3 Sep 2021 08:09:41 +0000 (10:09 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 3 Sep 2021 15:19:53 +0000 (17:19 +0200)
commita3ff15afb4c697117aa8916c47b358045dbf0fe9
treebf74977c01c4b01fb072e34978d515c261730650
parent5ec4990bc777dd191b86aee6156be3f60cf9de24
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.
gcc/tree-ssa-threadupdate.c