Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intrinsics/Builtins: Make names more configurable #152

Open
2 tasks
PhilippvK opened this issue Dec 13, 2024 · 0 comments
Open
2 tasks

Intrinsics/Builtins: Make names more configurable #152

PhilippvK opened this issue Dec 13, 2024 · 0 comments

Comments

@PhilippvK
Copy link
Member

PhilippvK commented Dec 13, 2024

As far as I can tell, the names of intrinsics are generated by concatenating the arch string (of the instruction set) and the intrinsic_name (defined by the user).

This leads to the following names being generated (for arch: xcorevalu & intrinsic_name: alu_abs):

  • llvm.riscv.xcorevalu.alu.abs (LLVM-IR Intrinsic)
  • __builtin_xcorevalu_alu_abs (Clang Builtin)

I see two problems here:

  1. __builtin_xcorevalu_alu_abs should actually be __builtin_riscv_xcorevalu_alu_abs (easy fix)
  2. If I would like to have an intrinsic called llvm.riscv.cv.alu.abs instead of llvm.riscv.xcorevalu.alu.abs there is now way to achive this without renaming the arch/intruction set name. Ideally, we should have a way to (optionally) configure the names in a more specific fashion (i.e. providing a full_name: "riscv_cv_alu_abs" or prefix: "riscv_cv" option)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants