search for: emitgenerator

Displaying 9 results from an estimated 9 matches for "emitgenerator".

2007 Feb 05
2
[LLVMdev] automatically generating intrinsic declarations
.../IntrinsicEmitter.cpp,v retrieving revision 1.22 diff -u -r1.22 IntrinsicEmitter.cpp --- utils/TableGen/IntrinsicEmitter.cpp +++ utils/TableGen/IntrinsicEmitter.cpp @@ -38,6 +38,9 @@ // Emit the intrinsic verifier. EmitVerifier(Ints, OS); + // Emit the intrinsic declaration generator. + EmitGenerator(Ints, OS); + // Emit mod/ref info for each function. EmitModRefInfo(Ints, OS); @@ -121,6 +124,19 @@ } } +static void EmitTypeGenerate(std::ostream &OS, Record *ArgType) { + if (ArgType->isSubClassOf("LLVMIntegerType")) { + OS << "IntegerType::get(&q...
2009 Apr 15
3
[LLVMdev] Tablegen question
In IntrinsicEmitter::EmitTypeGenerate, called from IntrinsicEmitter::EmitGenerator, here for (unsigned j = 0; j != N; ++j) { OS << " ArgTys.push_back("; EmitTypeGenerate(OS, ParamTys[j], ArgNo); OS << ");\n"; } I'm hitting this assertion: if (ArgType->isSubClassOf("LLVMMatchType")) { unsigned Number = A...
2009 Apr 15
0
[LLVMdev] Tablegen question
That's a bug. I'm working on a fix.... On Apr 15, 2009, at 10:16 AM, Villmow, Micah wrote: > In IntrinsicEmitter::EmitTypeGenerate, called from > IntrinsicEmitter::EmitGenerator, here > for (unsigned j = 0; j != N; ++j) { > OS << " ArgTys.push_back("; > EmitTypeGenerate(OS, ParamTys[j], ArgNo); > OS << ");\n"; > } > I'm hitting this assertion: > if (ArgType->isSubClassOf("LLVMMatchType&qu...
2007 Feb 05
0
[LLVMdev] automatically generating intrinsic declarations
On Mon, 5 Feb 2007, Dan Gohman wrote: > LLVM knows what all the types of the intrinsic functions are; I thought, > why are users (including llvm-gcc...) required to duplicate all this > information in order to use them? I mean in order to call > getOrInsertFunction to get declarations for them. That is an excellent question! :) In the bad old days, we used to allow intrinsics
2007 Feb 06
1
[LLVMdev] automatically generating intrinsic declarations
.../IntrinsicEmitter.cpp,v retrieving revision 1.22 diff -u -r1.22 IntrinsicEmitter.cpp --- utils/TableGen/IntrinsicEmitter.cpp +++ utils/TableGen/IntrinsicEmitter.cpp @@ -38,6 +38,9 @@ // Emit the intrinsic verifier. EmitVerifier(Ints, OS); + // Emit the intrinsic declaration generator. + EmitGenerator(Ints, OS); + // Emit mod/ref info for each function. EmitModRefInfo(Ints, OS); @@ -121,6 +124,25 @@ } } +static void EmitTypeGenerate(std::ostream &OS, Record *ArgType) { + if (ArgType->isSubClassOf("LLVMIntegerType")) { + OS << "IntegerType::get(&q...
2009 Apr 15
3
[LLVMdev] Tablegen question
...use LLVMMatchType<0> to refer to it. On Apr 15, 2009, at 10:31 AM, Bob Wilson wrote: > That's a bug. I'm working on a fix.... > > On Apr 15, 2009, at 10:16 AM, Villmow, Micah wrote: > >> In IntrinsicEmitter::EmitTypeGenerate, called from >> IntrinsicEmitter::EmitGenerator, here >> for (unsigned j = 0; j != N; ++j) { >> OS << " ArgTys.push_back("; >> EmitTypeGenerate(OS, ParamTys[j], ArgNo); >> OS << ");\n"; >> } >> I'm hitting this assertion: >> if (ArgType->isSubClassO...
2009 Apr 15
2
[LLVMdev] Tablegen question
I have this intrinsic definition for llvm. def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty], [llvm_anyfloat_ty, LLVMMatchType<0>]>; Can someone explain what LLVMMatchType does and how to specify it to match the first argument and not the return value? I've tried LLVMMatchType<1> but it fails in IntrinsicEmitter.cpp
2009 Apr 15
0
[LLVMdev] Tablegen question
On Apr 15, 2009, at 9:29 AM, Villmow, Micah wrote: > I have this intrinsic definition for llvm. > def int_opencl_math_fdistance_fast : Intrinsic<[llvm_float_ty], > [llvm_anyfloat_ty, LLVMMatchType<0>]>; > > > Can someone explain what LLVMMatchType does and how to specify it > to match the first argument and not the return value?
2009 Apr 15
0
[LLVMdev] Tablegen question
...use LLVMMatchType<0> to refer to it. On Apr 15, 2009, at 10:31 AM, Bob Wilson wrote: > That's a bug. I'm working on a fix.... > > On Apr 15, 2009, at 10:16 AM, Villmow, Micah wrote: > >> In IntrinsicEmitter::EmitTypeGenerate, called from >> IntrinsicEmitter::EmitGenerator, here >> for (unsigned j = 0; j != N; ++j) { >> OS << " ArgTys.push_back("; >> EmitTypeGenerate(OS, ParamTys[j], ArgNo); >> OS << ");\n"; >> } >> I'm hitting this assertion: >> if (ArgType->isSubClassO...