This is the mail archive of the
mailing list for the GCC project.
Re: reload question about unmet constraints
- From: Jim Wilson <jim dot wilson at linaro dot org>
- To: DJ Delorie <dj at redhat dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 14 Sep 2015 23:58:29 -0700
- Subject: Re: reload question about unmet constraints
- Authentication-results: sourceware.org; auth=none
- References: <201509010744 dot t817iv6A012061 at greed dot delorie dot com> <55E63993 dot 40700 at linaro dot org> <201509020120 dot t821KUur014778 at greed dot delorie dot com> <CABXYE2VzQcbF-rh+2fdNLCPtJr92ak+7g3Pfydcgdu0eLRA2sg at mail dot gmail dot com> <201509150605 dot t8F65UkP006353 at greed dot delorie dot com>
On Mon, Sep 14, 2015 at 11:05 PM, DJ Delorie <email@example.com> wrote:
> As a test, I added this API. It seems to work. I suppose there could
> be a better API where we determine if a constrain matches various
> memory spaces, then compare with the memory space of the operand, but
> I can't prove that's sufficiently flexible for all targets that
> support memory spaces. Heck, I'm not even sure what to call the
> macro, and "TARGET_IS_THIS_MEMORY_ADDRESS_RELOADABLE_TO_MATCH_THIS_CONTRAINT_P()"
> is a little long ;-)
> What do we think of this direction?
We already have define_constraint and define_memory_constraint. We
could perhaps add a define_special_memory_constraint that returns
CT_SPECIAL_MEMORY which mostly operates like CT_MEMORY, except that it
doesn't assume any MEM can be reloaded to match.
We already have constraint_satisfied_p, which is generated from
define*_constraint. We could have a constraint_reloadable_to_match_p
function parallel to that, which is for operands that don't match, but
can be reloaded to match. Perhaps we don't even need a distinction
between define_memory_constraint and define_special_memory_constraint.
We could have constraint_reloadable_to_match_p default to the current
code for memory constraints, that assumes any mem is reloadable to
match, if a special reloadable condition isn't specified.
Perhaps define_memory_constraint can be extended with an optional
field at the end, that is used to generate the
Otherwise, I think you are headed in the right direction. I would
worry a bit about whether we are making reload even more complicated
for folks. But given that we already have the concept of address
spaces, there should be some way to expose this info to reload.