search for: targetprefix

Displaying 20 results from an estimated 32 matches for "targetprefix".

2016 Jul 01
2
Missing TargetPrefix for NVVM intrinsics
Justins: I noticed that the intrinsics in IntrinsicsNVVM don't specify a TargetPrefix. This seems like a simple omission, so I was going to simply throw a `let TargetPrefix = "nvvm" ` block around them, but this doesn't quite work. There seem to be three prefixes that are used in this file. About 900 are int_nvvm_*, 30 are int_ptx_*, and 1 is int_cuda. It isn't cl...
2018 Feb 01
1
Intrinsic pattern matching
Hello, I have a problem with pattern matching on intrinsics. I have following code in IntrinsicsX86.td: ``` let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_mpx_bndmk: Intrinsic<[llvm_x86bnd_ty], [llvm_ptr_ty, llvm_i64_ty], []>; } ``` And following instruction that is generated when @llvm.x86.mpx.bndmk is used in code: ``` let isPseudo = 1 in let...
2020 May 06
2
Issues porting intrinsics to LLVM 10
...LLVM 10, I get: /home/dej/work/llvm_git/llvm-project/llvm/build/lib/Target/RISCV/RISCVGenGlobalISel.inc:11582:60: error: ‘idaho_mt_begin’ is not a member of ‘llvm::Intrinsic’ GIM_CheckIntrinsicID, /*MI*/0, /*Op*/0, Intrinsic::idaho_mt_begin, This intrinsic is defined pretty simply: let TargetPrefix = "idaho" in { def int_idaho_mt_begin : Intrinsic<[], [llvm_ptr_ty,llvm_i64_ty], []>; } With LLVM 7, I notice that build/include/llvm/IntrinsicEnums.inc contains an entry for each intrinsic in the system. This is no longer the case for LLVM 10: there are only 277 definitions in th...
2018 Sep 17
2
error about adding an trinsics
.... I want to add an trinsics in X86. This trinsics can compare two numbers and return the larger. There are the changes I do as fllowing. In /tools/clang/include/clang/Basic/BuiltinsX86.def : BUILTIN(__builtin_x86_max_qb, "iii", "") In include/llvm/IR/IntrinsicsX86.td : let TargetPrefix = "x86" in { def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; } In /lib/Target/X86/X86SelLowering.h: add a sdnode max_qb, In /lib/Target/X86/X86SelLowering.cpp: case X86ISD::max_qb:...
2018 Sep 06
2
Adding an trinsics in x86
Hi Everyone! I am a newbie at llvm. So the question may be fundamental but difficult to me. I want to add an trinsics in x86 and make the following changes.I want that max_qb can find the max of two Integers and return it. In src/include/llvm/IR/Intrinsics.td : let TargetPrefix = "x86" in { def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; } In src//tools/clang/include/clang/Basic/BuiltinsX86.def TARGET_BUILTIN(__builtin_x86_max_qb, "V2iV2iV2i", "ncV:64:...
2007 Aug 01
0
[LLVMdev] Adding custom operation intrinsic for ASIP architectures.
...this works. This is exactly the idea of the builtin functions in GCC. For example, in SSE, the __builtin_ia32_movntps function does a nontemporal store. To answer David's question, we already have direct support for this in tblgen, for example, include/llvm/IntrinsicsX86.td contains: let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_sse_movnt_ps : GCCBuiltin<"__builtin_ia32_movntps">, Intrinsic<[llvm_void_ty, llvm_ptr_ty, llvm_v4f32_ty], [IntrWriteMem]>; } and lib/Target/X86...
2014 Jul 17
2
[LLVMdev] Fwd: Re: [PATCH] [TABLEGEN] Do not crash on intrinsics with names longer than 40 characters
...t value> { + string Namespace = "MVT"; + int Size = size; + int Value = value; +} + +class LLVMType<ValueType vt> { + ValueType VT = vt; +} + +class Intrinsic<string name, list<LLVMType> param_types = []> { + string LLVMName = name; + bit isTarget = 0; + string TargetPrefix = ""; + list<LLVMType> RetTypes = []; + list<LLVMType> ParamTypes = param_types; + list<IntrinsicProperty> Properties = []; +} + +def iAny : ValueType<0, 254>; +def llvm_anyint_ty : LLVMType<iAny>; + +// Make sure we generate the long name without crashing...
2007 Jul 31
3
[LLVMdev] Adding custom operation intrinsic for ASIP architectures.
Hi, I was talking with aKor in #llvm how we could implement custom operation support for our ASIP architecture. We came into solution that the best way would be to write new custom operation intrinsic and optimization pass for raising certain type of function calls to those intrinsics (similar to raising mallocs). Basically our custom operation are like calls, with operand name and multiple
2014 Jul 17
2
[LLVMdev] Fwd: Re: [PATCH] [TABLEGEN] Do not crash on intrinsics with names longer than 40 characters
...lue; >> +} >> + >> +class LLVMType<ValueType vt> { >> + ValueType VT = vt; >> +} >> + >> +class Intrinsic<string name, list<LLVMType> param_types = []> { >> + string LLVMName = name; >> + bit isTarget = 0; >> + string TargetPrefix = ""; >> + list<LLVMType> RetTypes = []; >> + list<LLVMType> ParamTypes = param_types; >> + list<IntrinsicProperty> Properties = []; >> +} >> + >> +def iAny : ValueType<0, 254>; >> +def llvm_anyint_ty : LLVMType<iAny&...
2015 Sep 08
2
Strange types on x86 vcvtph2ps and vcvtps2ph intrinsics
...d as to why certain types were chosen. I've gone ahead and used their current definition with success but I'd like to understand why the types used with these intrinsics are done this way. For reference see ``include/llvm/IR/IntrinsicsX86.td``. Here are the intrinsics of interest. ``` let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". def int_x86_vcvtph2ps_128 : GCCBuiltin<"__builtin_ia32_vcvtph2ps">, Intrinsic<[llvm_v4f32_ty], [llvm_v8i16_ty], [IntrNoMem]>; def int_x86_vcvtph2ps_256 : GCCBuiltin<"__builtin...
2018 Nov 14
2
Fw: How to define an instruction
...n content ) test.ll shows as following: %0 = load i32, i32* %a, align 4 %1 = load i32, i32* %b, align 4 %2 = call i32 @llvm.x86.max.qb(i32 %1, i32 %2) store i32 %2, i32* %a, align 4 when lli test.ll ,it goes wrong. Here is my all code: 1. In llvm/include/llvm/IR/IntrinsicsX86.td : let TargetPrefix = "x86" in { def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [Commutative]>; } 2. In llvm//tools/clang/include/clang/Basic/BuiltinsX86.def: BUILTIN(__builtin_x86_max_qb, "iii", "")...
2018 Nov 14
2
Fw: How to define an instruction
...n content ) test.ll shows as following: %0 = load i32, i32* %a, align 4 %1 = load i32, i32* %b, align 4 %2 = call i32 @llvm.x86.max.qb(i32 %1, i32 %2) store i32 %2, i32* %a, align 4 when lli test.ll ,it goes wrong. Here is my all code: 1. In llvm/include/llvm/IR/IntrinsicsX86.td : let TargetPrefix = "x86" in { def int_x86_max_qb: GCCBuiltin<"__builtin_x86_max_qb">, Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [Commutative]>; } 2. In llvm//tools/clang/include/clang/Basic/BuiltinsX86.def: BUILTIN(__builtin_x86_max_qb, "iii", "")...
2009 Apr 22
0
[LLVMdev] a very strange question about adding new instrinsic.
Hi: I want add new Instrinsic for my target. So I first do some test. I add them in IntrinsicsPowerPC.td //===--------------------===// let TargetPrefix = "ppc" in { def int_ppc_mytest : Intrinsic<[llvm_void_ty], [], [IntrWriteMem]>; } //===--------------------===// I add them in PPCInstrInfo.td //===--------------------===// def MYTEST : XForm_24_sync<31, 599, (outs), (ins),                         "mytest", LdStSync...
2011 Nov 21
2
[LLVMdev] PTX builtin functions.
...ypes, we may want to create two versions for each > integer > > type; something like: > > > > i32 @llvm.ptx.max.signed.i32(i32, i32) > > i32 @llvm.ptx.max.unsigned.i32(i32, i32) > > Yes, this the only way. > A couple more comments: 1. Please make sure to set TargetPrefix="ptx" for the intrinsics (probably best in the multiclass, see PTXReadSpecialRegisterIntrinsic_r32) 2. I'm not sure how to define a GCCBuiltin for an intrinsic that can take multiple types, but it's probably worth looking into so we can expose this intrinsic to Clang....
2010 Jan 06
0
[LLVMdev] something wrong with .ll file?
On Jan 6, 2010, at 1:12 PM, fima rabin wrote: > I am trying to compile a little intrinsic function for my machine. Here is a dump from clang-cc with --emit-llvm option: > ===================== > > ; ModuleID = 'foo.c' > target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" >
2016 May 25
0
running intrinsics from C code
GCCBuiltin just gives it a name for clang to lookup. Generally they match up with builtins that gcc also implements, but that's not a requirement. If you add a builtin with the same name to the builtin file in clang's include/clang/Basic/Builtins*.def then they will find each other. You can also just add a builtin to clang's builtin file and catch it in clang's
2011 Nov 22
0
[LLVMdev] PTX builtin functions.
...each >> > integer >> > type; something like: >> > >> > i32 @llvm.ptx.max.signed.i32(i32, i32) >> > i32 @llvm.ptx.max.unsigned.i32(i32, i32) >> >> Yes, this the only way. > > > A couple more comments: > > Please make sure to set TargetPrefix="ptx" for the intrinsics (probably best > in the multiclass, see PTXReadSpecialRegisterIntrinsic_r32)] Ok > I'm not sure how to define a GCCBuiltin for an intrinsic that can take > multiple types, but it's probably worth looking into so we can expose this > intrinsic...
2011 Nov 22
2
[LLVMdev] PTX builtin functions.
...ething like: > >> > > >> > i32 @llvm.ptx.max.signed.i32(i32, i32) > >> > i32 @llvm.ptx.max.unsigned.i32(i32, i32) > >> > >> Yes, this the only way. > > > > > > A couple more comments: > > > > Please make sure to set TargetPrefix="ptx" for the intrinsics > (probably best > > in the multiclass, see PTXReadSpecialRegisterIntrinsic_r32)] > > Ok > > > I'm not sure how to define a GCCBuiltin for an intrinsic that can > take > > multiple types, but it's probably worth looking i...
2007 Aug 01
2
[LLVMdev] Adding custom operation intrinsic for ASIP architectures.
...idea of the builtin functions in > GCC. For example, in SSE, the __builtin_ia32_movntps function does a > nontemporal store. > > To answer David's question, we already have direct support for this in > tblgen, for example, include/llvm/IntrinsicsX86.td contains: > > let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". > def int_x86_sse_movnt_ps : GCCBuiltin<"__builtin_ia32_movntps">, > Intrinsic<[llvm_void_ty, llvm_ptr_ty, > llvm_v4f32_ty], [IntrWriteMem]>; > } > > and lib/Target/X86/X86InstrSSE.td...
2016 May 25
2
running intrinsics from C code
I've created an intrinsic from my target, but I can't figure out how I can run it from a C code. Most of the targets have a GCCBuiltin and it looks like it is the way to execute an intrinsic from C code. However in my case there is no actual GCC built in. Any help on this is really appreciated. -- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part