On 8/24/2026 7:03 AM, Aldy Hernandez wrote:
Both the jump threader's joiner registration and the upcoming phiopt
replication of PHI-of-compares joins need a way to determine if a
block on an edge can be duplicated.  Abstract out the code in
tree-ssa-threadedge.cc to be reusable by the upcoming work.

OK?

        PR tree-optimization/126896

gcc/ChangeLog:

        * cfghooks.cc (can_duplicate_block_on_edge_p): New.
        * cfghooks.h (can_duplicate_block_on_edge_p): Declare.
        * tree-ssa-threadedge.cc: Include cfghooks.h.
        (jump_threader::thread_across_edge): Use
        can_duplicate_block_on_edge_p.
OK
jeff

Reply via email to