This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 2/5] add hook to track when splitting is complete


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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]