On Thu, 30 Mar 2023 14:41:29 GMT, Quan Anh Mai <qa...@openjdk.org> wrote:
>> Yeah, I agree that saving a node have some benefits like what you said. My >> concern is there are more and more methods added into `Matcher::` and each >> platform has to do the different implementation. There is not too much >> meaning for those platforms that do not implement Vector API like` >> arm/ppc/...` for me. This makes code not so easy to maintain. > > I agree, I am thinking of (ab)using template to have a common query function > like this > > template <VectorQuery N, class T, class... U> > T vectorQuery(U... args) { > return T(); > } > > then each platform can have a specialisation that looks like this: > > template <> > bool vectorQuery<VectorQuery::NEEDS_LOAD_SHUFFLE>(BasicType bt, int vlen) > { > } > > Unimplemented platform will return `false` for this, what do you think? Sounds good! Maybe we can have a folllowed patch to see what the final code looks like. Thanks! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13093#discussion_r1153928312