On Thu, 12 Nov 2026 at 18:38, Alfie Richards <[email protected]> wrote:
>
> On 12/11/2026 05:02, Andrea Pinski wrote:
> > On Wed, Nov 11, 2026 at 8:56 PM Andrea Pinski
> > <[email protected]> wrote:
> >>
> >> On Wed, Nov 11, 2026 at 9:08 AM Alfie Richards <[email protected]> 
> >> wrote:
> >>>
> >>> Changes the TARGET_POLY_INT_INDETERMINATE_BOUND to be a macro instead
> >>> of a target hook. This is to lower the cost of this operation in
> >>> poly_int comparisons which can happen very often.
> >>
> >> NAK.  We should moving towards target hooks from target macros.
> >
> > And you didn't add documentation for the new target macro
> > POLY_INT_INDETERMINATE_BOUND either.
> > Maybe you could still make a target variable as part of the target
> > hook like unwind_emit_before_insn is done. Then it is just a load
> > instead.  Would that be ok for performance?
> >
> > Thanks,
> > Andrea
>
> Hi Andrea,
>
> Thank you for the review, good to know about not adding macros.
>
> This case is a little awkward as poly_ing.h it is within core types so
> tends to get included before the target hooks are included, and loaded
> into the gen- files with where they're not included at all, so I will
> have to do a little dance to make it work. But that shouldn't be too bad.
>
> I'm much less concerned with performance than I was now I know this
> can't be enabled by default, and so will likely be less wide spread.

What you mean by "now I know this can't be enabled by default"?
Was this in response to some other thread, or perhaps to an irc discussion?

At the moment, poly-int.h is an ADT that doesn't even encode
NUM_POLY_INT_COEFFS, which is a more fundamental property than
the bounds of the indeterminates.  Using the target bounds seems
like a layering violation to me.  (Perhaps that's what you meant
by enabling by default.)

I can see the attraction of having something that handles bounds better,
but I don't think this is the way to go.  Even if the argument is that
poly-int.h should become tied to the target, I think that's too big of
a design change to be done at the end of stage 1.

Thanks,
Richard

Reply via email to