On 5/17/2026 8:20 PM, Andrew Pinski wrote:
We use unshare_expr in many places now outside of gimple
even. So it makes sense to move the decl to tree.h.
A few sources can now even not need to include gimplify.h;
I have not checked all of them just a few which seemed
like including gimplify.h didn't make sense.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

        * cfgrtl.cc: Don't include gimplify.h or gimplify-me.h.
        * cgraphbuild.cc: Likewise.
        * emit-rtl.cc: Likewie.
        * tree-ssa-dom.cc: Likewise.
        * tree-ssa-dse.cc: Likewise.
        * tree-ssa-loop-im.cc: Likewise.
        * tree-ssa-loop-niter.cc: Likewise.
        * tree-ssa-loop-unswitch.cc: Likewise.
        * tree-ssa-math-opts.cc: Likewise.
        * tree-ssa-phiopt.cc: Likewise.
        * tree-ssa-phiprop.cc: Likewise.
        * tree-ssa-pre.cc: Likewise.
        * tree-ssa-propagate.cc: Likewise.
        * tree-ssa-sccvn.cc: Likewise.
        * gimplify.h (unshare_expr): Remove.
        (unshare_expr_without_location): Remove.
        * tree.h (unshare_expr): New decl.
        (unshare_expr_without_location): Likewise.
OK
jeff

Reply via email to