This is the mail archive of the
mailing list for the GCC project.
Re: [lto] Stop using TREE_LIST in functions dealing with PENDING_STMT.
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Kazu Hirata <kazu at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 02 Jun 2006 10:08:23 -0400
- Subject: Re: [lto] Stop using TREE_LIST in functions dealing with PENDING_STMT.
- References: <200606021013.k52ADT4l007057@sparrowhawk.codesourcery.com>
Kazu Hirata wrote on 06/02/06 06:13:
> The only caveat is that we have to count the number of PHI nodes first
> to figure out the size of TREE_VEC, but the cost of counting the PHI
> is probably still cheaper than the overhead associated with allocating
> multiple chunks of memory.
Probably? Numbers please.
> Tested on x86_64-pc-linux-gnu. OK to apply?
> Kazu Hirata
> 2006-06-02 Kazu Hirata <email@example.com>
> * tree-ssa.c (ssa_redirect_edge): Store TREE_VEC in
> (reinstall_phi_args): Blah.
> * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Blah.
> --- 48,91 ----
> /* Remove the corresponding arguments from the PHI nodes in E's
> destination block and redirect it to DEST. Return redirected edge.
> ! The list of removed arguments is stored in PENDING_STMT (e) as a
> ! TREE_VEC with PHI_RESULT in the even-th elements and PHI_ARG_DEF in
> ! the odd-th elements. */
The rest is fine. Could you test for performance changes?
PS: Could you send unified diffs? I know it's not a requirement, but I find
them much easier to read. Thanks.