]> git.ipfire.org Git - thirdparty/gcc.git/commit
Abstract PHI and forwarder block checks in jump threader.
authorAldy Hernandez <aldyh@redhat.com>
Fri, 3 Sep 2021 09:55:11 +0000 (11:55 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Fri, 3 Sep 2021 15:19:54 +0000 (17:19 +0200)
commit62099645c204f64cbf2546fc7c2cd0428c4990e0
treeeae3c17da66219926e069f0d452518ccd4acd41e
parent779275c0835b58325f806568836c8b5081d1f52f
Abstract PHI and forwarder block checks in jump threader.

This patch abstracts out a couple common idioms in the forward
threader that I found useful while navigating the code base.

Tested on x86-64 Linux.

gcc/ChangeLog:

* tree-ssa-threadedge.c (has_phis_p): New.
(forwarder_block_p): New.
(potentially_threadable_block): Call forwarder_block_p.
(jump_threader::thread_around_empty_blocks): Call has_phis_p.
(jump_threader::thread_through_normal_block): Call
forwarder_block_p.
gcc/tree-ssa-threadedge.c