Displaying 20 results from an estimated 24 matches for "paramtyp".
Did you mean:
paramty
2005 Apr 21
0
[LLVMdev] Using LLVM for a dynamically typed language
...ction type you want to cast to.
2. Use a cast instruction to actually perform the type cast.
In the code I'm currently working on, I do the following to cast a
function pointer from one type to another. Hopefully the line wrapping
won't totally destroy this.
std::vector<const Type*> paramTypes;
// First parameter: a void pointer
paramTypes.push_back( PointerType::get( Type::getPrimitiveType( Type::SByteTyID ) ) );
FunctionType* pthreadFunctionType = FunctionType::get(
PointerType::get( Type::getPrimitiveType( Type::SByteTyID ) ),
paramTypes, false );
assert( pthreadFunctionType...
2005 Apr 21
2
[LLVMdev] Using LLVM for a dynamically typed language
I recently ran into the following problem.
I'm prototyping a compiler for a dynamically typed language in which
functions are first class objects. Assuming I have something like
this:
if(rand() > 5)
i = define(x, y, z) { return x + y + z; }
else
i = define(x, y) { return x + y; }
At this point I cannot know the type of 'i' at compile time. At
runtime 'i' is a
2013 Dec 04
0
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
...es from the arguments that are
present.
PointerType *PFTy = 0;
FunctionType *Ty = 0;
if (!(PFTy = dyn_cast<PointerType>(RetType)) ||
!(Ty = dyn_cast<FunctionType>(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector<Type*> ParamTypes;
for (unsigned i = 0, e = ArgList.size(); i != e; ++i)
ParamTypes.push_back(ArgList[i].V->getType());
if (!FunctionType::isValidReturnType(RetType))
return Error(RetTypeLoc, "Invalid result type for LLVM function");
Ty = FunctionType::get(RetType, ParamTypes...
2009 Apr 27
5
ruby jasper report
Hi,
I am trying to create a pdf using ruby jasper.
For this I am referring this url:-
http://oldwiki.rubyonrails.org/rails/pages/howtointegratejasperreports
I have done everything whatever is in that link.
Still I am not able to get the pdf. I am not getting any error in log
file. My log file is:-
"Processing AccountController#customer_report (for 127.0.0.1 at
2009-04-27 13:19:34) [GET]
2013 Dec 03
2
[LLVMdev] Newbie question: LLVM IR, printf, and varargs
Whoops... Seems I forgot the asterisk (*) after the cast. Or something.
Because I did insert the cast and it didn't work. But NOW it works.
Thank you for spending some time on this - and also for presenting the
solution.
-- Mikael
2013/12/4 Eli Bendersky <eliben at google.com>
> This code:
>
> declare i32 @printf(i8* nocapture readonly, ...) nounwind
>
> define
2019 Jul 20
2
ARI libraries?
In article <301a2e78-d490-3805-e30f-41b668aac5c1 at sysnux.pf>,
Jean-Denis Girard <jd.girard at sysnux.pf> wrote:
>
> Hi Tony,
>
> Le 20/07/2019 à 06:29, Tony Mountifield a écrit :
> > Are there any other languages/libraries I should be considering?
>
> Same here, after years of AGI / AMI, I recently made my first project
> using ARI on Asterisk-16. I love
2005 Apr 21
5
[LLVMdev] Using LLVM for a dynamically typed language
...; 2. Use a cast instruction to actually perform the type cast.
>
> In the code I'm currently working on, I do the following to cast a
> function pointer from one type to another. Hopefully the line wrapping
> won't totally destroy this.
>
> std::vector<const Type*> paramTypes;
>
> // First parameter: a void pointer
> paramTypes.push_back( PointerType::get( Type::getPrimitiveType( Type::SByteTyID ) ) );
>
> FunctionType* pthreadFunctionType = FunctionType::get(
> PointerType::get( Type::getPrimitiveType( Type::SByteTyID ) ),
> par...
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
...File(Buffer.get(), &ErrorMessage);
ExecutionEngine *EE = ExecutionEngine::create(new
ExistingModuleProvider(M), false, &ErrorMessage);
// Function returning std::string
Function *F = M->getFunction("_Z9get_hellov");
// XXX Is all of this the right way?
const Type* paramType = F->getFunctionType()->getParamType(0); //
pointer to struct
const Type* structRetType = dynamic_cast<const
PointerType*>(paramType)->getTypeAtIndex((unsigned)0);
const std::string structRetName(M->getTypeName(structRetType));
if (structRetName != "struct.std::strin...
2010 Sep 07
0
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
On Sep 7, 2010, at 8:03 AM, F van der Meeren wrote:
> Hello,
>
> I have a question, what is wrong with the following code?
>
> declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind
>
> ...
>
> call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false)
>
> ...
>
>
> According to the compiler this is the
2010 Sep 07
2
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
...odNameSize];
// Create the methodName.
memset(methodName, 0, methodNameSize);
sprintf(methodName, methodNameTemplate,
dstSize,
srcSize,
lengthSize);
// Search for the function or create it.
if((function = LLVMGetNamedFunction(module, methodName)) == NULL) {
LLVMTypeRef paramTypes [] = {
dstType,
srcType,
lengthType,
LLVMInt32TypeInContext(context),
LLVMInt1TypeInContext(context),
};
functionType = LLVMFunctionType(LLVMVoidTypeInContext(context),
paramTypes, numberOfArguments, false);...
2012 Jul 26
1
[LLVMdev] Calling a function with bad signature, possible bug.
...ass inserts a call to this function. But I don't have any problems with my pass if I run clang -emit-llvm -S, then llc and then gcc. With this approach I get a binary with my instrumentation inserted.
This line causes a problem - assert((i >= FTy->getNumParams() ||
FTy->getParamType(i) == Args[i]->getType()) &&
"Calling a function with a bad signature!");
I tried to get a dump of FTy->getParamType(i) and Args[i]->getType(), but I wasn't able to do it in gdb - everytime I create a breakpoint it just misses it. So I made the followin...
2015 Jan 19
2
[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint
...@@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
// Verify that the types of the call parameter arguments match
// the type of the wrapped callee.
- for (int i = 0; i < NumCallArgs; i++) {
+ for (int i = 0; i < NumParams; i++) {
Type *ParamType = TargetFuncType->getParamType(i);
Type *ArgType = CI.getArgOperand(3+i)->getType();
Assert1(ArgType == ParamType,
diff --git a/test/CodeGen/X86/statepoint-call-lowering.ll b/test/CodeGen/X86/statepoint-call-lowering.ll
index 0f1ebbe..1b696c3 100644
--- a/test/CodeGen/X86/state...
2014 Jul 17
2
[LLVMdev] Fwd: Re: [PATCH] [TABLEGEN] Do not crash on intrinsics with names longer than 40 characters
...e;
+}
+
+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
+// CHECK: this_is_a_really_long_intrinsic_name_but_we_should_still_not_crash // llvm...
2014 Jul 17
2
[LLVMdev] Fwd: Re: [PATCH] [TABLEGEN] Do not crash on intrinsics with names longer than 40 characters
...> +}
>> +
>> +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
>> +// CHECK:
>...
2010 Sep 07
4
[LLVMdev] Intrinsic prototype has incorrect number of arguments!
Hello,
I have a question, what is wrong with the following code?
declare void @llvm.memcpy.p0i64.p0i64.i8(i64*, i64*, i8, i32, i1) nounwind
...
call void @llvm.memcpy.p0i64.p0i64.i8(i64* %19, i64* %21, i8 %17, i32 0, i1 false)
...
According to the compiler this is the error, but I seem to miss where exactly my fault is.
Intrinsic prototype has incorrect number of arguments!
void (i64*,
2004 May 11
1
[LLVMdev] Follow-up on: Dynamic updates of current executed code
...t pointer to first function pointer
%theKernel = malloc %kernel
%FirstFunctionPTR = getelementptr %kernel* %theKernel, long 0, ubyte 0
;Load code
%myNewFunction = %getPointerToGlobal(%dynamically_compiled_function_code)
; Write memory address of myNewFunction() into kernel struct
store RETURNTYPE (PARAMTYPE*)* %myNewFunction, RETURNTYPE (PARAMTYPE*)** %FirstFunctionPTR
;Any code using first function element in %kernel is now_
;using dynamically updated function!?
ret int 0
}
%-----------
The questionmark is at this pseudocode row:
%myNewFunction = %getPointerToGlobal(%dynamically_compiled_functio...
2016 Dec 21
2
different compilers and mzR build fails
...path.o
./boost/filesystem/src/utf8_codecvt_facet.o
./boost/chrono/src/chrono.o
./boost/chrono/src/process_cpu_clocks.o
./boost/chrono/src/thread_clock.o
./pwiz/data/msdata/Version.o
./pwiz/data/common/MemoryIndex.o
./pwiz/data/common/CVTranslator.o ./pwiz/data/common/cv.o
./pwiz/data/common/ParamTypes.o
./pwiz/data/common/BinaryIndexStream.o
./pwiz/data/common/diff_std.o ./pwiz/data/common/Unimod.o
./pwiz/data/msdata/SpectrumList_MGF.o
./pwiz/data/msdata/DefaultReaderList.o
./pwiz/data/msdata/ChromatogramList_mzML.o
./pwiz/data/msdata/examples.o
./pwiz/data/msdata/Serializer_mzML.o
./p...
2017 Sep 18
0
Counterintuitive use of LLVMBool in C-API?
Okay after translating the headers to Delphi, i found more inconsistencies:
> LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType,
> LLVMTypeRef *ParamTypes, unsigned ParamCount,
> LLVMBool IsVarArg);
>
In this case it is the other way around. 0 means False and anything else
means true :/ (so it acts more like a "traditional" bool)
2016-09-12 11:17 GMT+02:00 Alexander Benikowski <sebal007 at googlemai...
2004 Apr 20
2
[LLVMdev] Dynamic updates of current executed code
...Kernel = malloc %kernel
%FirstFunctionPTR = getelementptr %kernel* %theKernel, long 0, ubyte 0
;Load code
%myNewFunction = %getPointerToGlobal(%dynamically_compiled_function_code)
; Write memory address of myNewFunction() into kernel struct
store RETURNTYPE (PARAMTYPE*)* %myNewFunction, RETURNTYPE (PARAMTYPE*)** %FirstFunctionPTR
;Any code using first function element in %kernel is now_
;using dynamically updated function!?
ret int 0
}
%-----------------------------------------------------
The questionmark is at this pseudocode row:...
2016 Sep 12
1
Counterintuitive use of LLVMBool in C-API?
Of course, this is normal for C-APIs. But maybe change the name to
LLVMResult to propagate the real use? I am not arguing about the results
themself. They are standard. But the name is missguiding. As long as it's
consistent i know that i have to write an extra record operator in Delphi
to reflect this.
2016-09-12 11:11 GMT+02:00 David Chisnall <David.Chisnall at cl.cam.ac.uk>:
> On