沈天豪 via llvm-dev
2018-Sep-12 13:36 UTC
[llvm-dev] There is an error “use of unknown builtin”
Hello,everyone. I am very embarrassed to ask such a simple question. I want to add an intrinsics(named max_qb) in x86 backend. In include/llvm/IR/IntrinsicsX86.td, I add a intrinsics (GCCBuiltin). In clang( BuiltinsX86.def ), I add a BUILTIN. And in x86 backend , I change : the X86InstrInfo.td to add def X86max_qb_flag , X86InstrArithmetic.td to add define of instruction , X86ISelLowering.cpp to add SDnode. It's succeed when LLVM compilates.But there is an error “use of unknown builtin '__builtin_x86_max_qb' ”,when I test the intrinsics. I do not know what I should do.I have been stranded here for 2 days. Grate for any suggestions. Thanks a lot. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180912/c24c5902/attachment.html>
Friedman, Eli via llvm-dev
2018-Sep-12 17:49 UTC
[llvm-dev] There is an error “use of unknown builtin”
On 9/12/2018 6:36 AM, 沈天豪 via llvm-dev wrote:> Hello,everyone. > I am very embarrassed to ask such a simple question. > I want to add an intrinsics(named max_qb) in x86 backend. > In include/llvm/IR/IntrinsicsX86.td, I add a intrinsics (GCCBuiltin)|.| > In clang( BuiltinsX86.def ), I add a |BUILTIN.| > And in x86 backend , I change : > the X86InstrInfo.td to add def X86max_qb_flag , > X86InstrArithmetic.td to add define of instruction , > X86ISelLowering.cpp to add SDnode. > It's succeed when LLVM compilates.But there is an error “use of > unknown builtin '__builtin_x86_max_qb' ”,when I test theintrinsics.All clang builtins are required to have a C language signature defined in clang; for x86, look in include/clang/Basic/BuiltinsX86.def . -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180912/5332a7b6/attachment.html>
沈天豪 via llvm-dev
2018-Sep-13 05:48 UTC
[llvm-dev] There is an error “use of unknown builtin”
Thank you for your suggesttion. I have already written the defined as following: BUILTIN(__builtin_x86_max_qb, "iii", "") 在 2018-09-13 01:49:19,"Friedman, Eli" <efriedma at codeaurora.org> 写道: On 9/12/2018 6:36 AM, 沈天豪 via llvm-dev wrote: Hello,everyone. I am very embarrassed to ask such a simple question. I want to add an intrinsics(named max_qb) in x86 backend. In include/llvm/IR/IntrinsicsX86.td, I add a intrinsics (GCCBuiltin). In clang( BuiltinsX86.def ), I add a BUILTIN. And in x86 backend , I change : the X86InstrInfo.td to add def X86max_qb_flag , X86InstrArithmetic.td to add define of instruction , X86ISelLowering.cpp to add SDnode. It's succeed when LLVM compilates.But there is an error “use of unknown builtin '__builtin_x86_max_qb' ”,when I test the intrinsics. All clang builtins are required to have a C language signature defined in clang; for x86, look in include/clang/Basic/BuiltinsX86.def . -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180913/de5bbfad/attachment.html>