> On 8 May 2025, at 18:36, Richard Sandiford <richard.sandif...@arm.com> wrote:
> 
> Yangyu Chen <c...@cyyself.name> writes:
>>> On 6 May 2025, at 17:49, Alfie Richards <alfie.richa...@arm.com> wrote:
>>> 
>>> On 06/05/2025 09:36, Yangyu Chen wrote:
>>>>> On 6 May 2025, at 16:01, Alfie Richards <alfie.richa...@arm.com> wrote:
>>>>> 
>>>>> Additionally, I think ideally the file can express functions 
>>>>> disambiguated by file, signature, and namespace.
>>>>> I imagine we could use similar syntax to gdb supports?
>>>>> 
>>>>> For example:
>>>>> 
>>>>> ```
>>>>> foo              |arch=+v
>>>>> bar(int, char)   |arch=+zba,+zbb
>>>>> file.C:baz(char) |arch=+zba,+zbb#arch=+v
>>>>> namespace::qux   |arch=+v
>>>>> ```
>>>> Also a great idea. However, I think it's not easy to use to implement
>>>> it now in GCC. But I would like to accept any further feedback if
>>>> we have such a simple API in GCC to do so, or if it will be implemented
>>>> by the community.
>>>> And something behind this idea is that I'm researching auto-generating
>>>> target clones attributes for developers. Only accepting the ASM
>>>> name is enough to implement this.
>>> 
>>> Ah that makes sense, apologies I missed that.
>>> 
>>> I think accepting the assembler name is good, and solves the overloading 
>>> ambiguity issue.
>>> 
>>> Maybe we can use the pipe '|' instead of ':' in the file format to leave 
>>> room for both in future?
>> 
>> 
>> I will consider using the pipe '|' in the next revision. Thanks for
>> the advice.
> 
> How about instead using a json file?  There's already a parser built into
> the compiler.
> 
> That has the advantage of being an established format that generators
> can use.  It would also allow other ways of specifying the functions
> to be added in future.
> 

Thanks for this useful information. I also want to extend the current
function multi-versioning to have the ability to set -mtune for
different micro-architectures in the future. Using JSON can provide
more extensibility in the future.

Thanks,
Yangyu Chen


Reply via email to