This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch 2/5] add hook to track when splitting is complete
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 20 Oct 2017 10:24:56 +0200
- Subject: Re: [patch 2/5] add hook to track when splitting is complete
- Authentication-results: sourceware.org; auth=none
- References: <59E95981.4040306@codesourcery.com> <59E95ACC.5050707@codesourcery.com>
On Fri, Oct 20, 2017 at 4:09 AM, Sandra Loosemore
<sandra@codesourcery.com> wrote:
> This patch adds a function to indicate whether the split1 pass has run
> yet. This is used in part 3 of the patch set to decide whether 32-bit
> symbolic constant expressions are permitted, e.g. in
> TARGET_LEGITIMATE_ADDRESS_P and the movsi expander.
>
> Since there's currently no usable hook for querying the pass manager
> where it is relative to another pass, I implemented this using a
> target-specific pass that runs directly after split1 and does nothing
> but set a flag.
"Nice" hack ;) The only currently existing way would be to add a property
to the IL state like
const pass_data pass_data_split_all_insns =
{
RTL_PASS, /* type */
"split1", /* name */
OPTGROUP_NONE, /* optinfo_flags */
TV_NONE, /* tv_id */
0, /* properties_required */
PROP_rtl_split_insns, /* properties_provided */
0, /* properties_destroyed */
and test that via cfun->curr_properties & PROP_rtl_split_insns
Having run split might be a important enough change to warrant this.
Likewise reload_completed and reload_in_progress could be transitioned
to IL properties.
Richard.
> -Sandra
>