Displaying 20 results from an estimated 24 matches for "paramtypes".
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 ) ),
> param...
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
Hi,
I'm using LLVM 2.4 (but llvm-gcc 2.2) on Ubuntu 8.10 (Intrepid Ibex) for
a small part-time project combining Witty (http://www.webtoolkit.eu) and
the ExecutionEngine in LLVM. (This is my second week with any of these
so I still lack a lot of basic knowledge.)
Sometimes I want to call a function returing a struct (in this case
std::string), thus hasStructRetAttr() is true for the Function
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.
Hello,
I'm having troubles with writing a pass. In my pass I've have created a function that has two parameters - both of type i8*. Initially I wrote this function in C, that I translated it into IR, and then by using llc -march=cpp I got it's implementation in cpp code that actually inserts IR instructions. Then, I inserted this cpp code in my pass.
And in some places of a program
2015 Jan 19
2
[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint
I actually need this feature quite badly in my untyped language
compiler: since I support first-class functions, I've made the types of
all functions a standard vararg (so I can box them).
The implementation crashes when I try to read out the value of
gc.result. Hints as to what might be wrong?
Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com>
---
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.t...
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:
>&g...
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
Hello!
I am coming back to the below discussion again, regarding the LLVM support of Ruby dynamics. The initial problem description is as follow, to refresh your memory :) After that my questions come:
-----------BEGIN Initial problem description---------------
Problem is though, that the Ruby compiler is integrated in the compilation of the program being executed, to be able to parse &
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
./pwi...
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 googlemail....
2004 Apr 20
2
[LLVMdev] Dynamic updates of current executed code
Thanks!
Problem is though, that the Ruby compiler is integrated in the compilation of the program being executed, to be able to parse & compile dynamic code at run-time. Therefore the calls to ExecutionEngine::getPointerToGlobal(F) need to be made in LLVM code. Here is a detailed simplistic example in pseudocode of what we want to do:
First Ruby code is entered at run-time, received as a
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