search for: doubleti

Displaying 20 results from an estimated 20 matches for "doubleti".

Did you mean: doublety
2020 Jan 14
2
sizeof implementation: how to get size as a constantInt?
I'm implementing c style "sizeof()", and I did as http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt illuarstrated, and it works find, here's an example of my implementation: auto *p = builder.CreateGEP(structTy, llvm::ConstantPointerNull::get(pointerTy), constint1); auto *size =
2008 Jun 09
0
[LLVMdev] regression? Or did I do something wrong again?
Hi Hendrik, > hendrik at lovesong:~/dv/llvm/tut$ g++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy > toy.cpp: In member function ‘virtual llvm::Value* NumberExprAST::Codegen()’: > toy.cpp:359: error: no matching function for call to ‘llvm::ConstantFP::get(const llvm::Type*&, llvm::APFloat)’ > /usr/local/llvm/include/llvm/Constants.h:237: note:
2008 Jun 10
1
[LLVMdev] regression? Or did I do something wrong again?
On Mon, 09 Jun 2008 21:25:42 +0200, Matthijs Kooijman wrote: > Hi Hendrik, > > It seems the ConstantFP method get might have been modified to take a > reference-to-APFloat, meaning you can't pass in APFloat(Value) anonymously. > You should either put it in a local variable, like > APFloat F(Val); > return ConstantFP::get(Type::DoubleTy, F); > which I _think_ is the
2009 Aug 23
1
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
2009/8/22 Bill Wendling <isanbard at gmail.com>: > I think you might have to provide an empty list if your function doesn't > take parameters. Maybe using an irbuilder would help? It does take one parameter. Here's the important bits: // My Function extern "C" void print(double X) { printf("%f\n", X); } // Args type std::vector<const Type*>
2008 Jun 09
7
[LLVMdev] regression? Or did I do something wrong again?
I don't know if the toy program in chapter 4 of the tutorial implementing Kaleidoscope in llvm with C++ is part of your regression suite, but with the version of llvm I installed last weekend, it does not compile: hendrik at lovesong:~/dv/llvm/tut$ g++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy toy.cpp: In member function ‘virtual llvm::Value*
2015 Jan 22
3
[LLVMdev] numeric limits of llvm Types?
Hi all, can I access the numeric limits of the llvm types, e.g. HalfTy, FloatTy, DoubleTy, etc. in a fashion like the std numeric_limits tool? std::numeric_limits<half>::min() std::numeric_limits<half>::max() In c++API, I want to initialize values and need to know the correct range for the llvm types.... Thx Alex
2009 Aug 22
1
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
2009/7/4 Albert Graef <Dr.Graef at t-online.de>: > This is all I ever needed to interface to C functions using LLVM. It's > really easy. Of course you still need a prototype of the external > function (function definition without body) in your IR, but that's it. Hi Albert, I'm having a similar problem and I found I can't declare the function and use it, most likely
2009 Aug 22
0
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
I think you might have to provide an empty list if your function doesn't take parameters. Maybe using an irbuilder would help? -bw On Aug 22, 2009, at 2:13 PM, Renato Golin <rengolin at systemcall.org> wrote: > 2009/7/4 Albert Graef <Dr.Graef at t-online.de>: >> This is all I ever needed to interface to C functions using LLVM. >> It's >> really
2008 Jun 09
0
[LLVMdev] regression? Or did I do something wrong again?
On Mon, Jun 9, 2008 at 7:29 AM, Hendrik Boom <hendrik at topoi.pooq.com> wrote: > I don't know if the toy program in chapter 4 of the tutorial > implementing Kaleidoscope in llvm with C++ is part of your > regression suite It isn't (although that might be a good idea). > but with the version of llvm I installed > last weekend, it does not compile: > > hendrik
2009 Jul 04
2
[LLVMdev] Having JIT resolve extern "C" functions declared in executible
John McCall wrote: > On Jul 2, 2009, at 1:05 AM, Carter Cheng wrote: >> I am having some difficulties getting the LLVM JIT to resolve extern >> "C" functions which I have defined in source file and invoking them >> via EE::runFunction() after generating a Function prototype for it. >> Is this possible or do I need to generate a .so for my functions are
2017 Feb 06
3
Kaleidoscope tutorial: comments, corrections and Windows support
Hi, I'm currently working my way through the tutorial with LLVM 3.9.1 on Windows (finished chapter 4) and stumbled over a few things which could be improved: - "LLVMContext" does not exist as a variable -> "TheContext" - Chapter 3: 5 times - Chapter 4: 1 time - Chapter 5: 4 times - Chapter 6: 2 times - Chapter 7: 2 times 3.4. Function Code
2009 Jun 05
2
[LLVMdev] Int1 to Double Type Conversion
Hello, I would like to know if there is an instruction to convert values from the Int1 type to the Double type in LLVM. I would like to achieve the equivalent of casting a bool value to a double value in C++. Doing the simple CreateSIToFP or CreateUIToFP does not work, it throws an assertion ("invalid cast"). I simply want to avoid branching it's not necessary. What's the
2009 Jun 05
0
[LLVMdev] Int1 to Double Type Conversion
On Fri, Jun 5, 2009 at 2:15 PM, Nyx<mcheva at cs.mcgill.ca> wrote: > > Hello, > > I would like to know if there is an instruction to convert values from the > Int1 type to the Double type in LLVM. I would like to achieve the equivalent > of casting a bool value to a double value in C++. Doing the simple > CreateSIToFP or CreateUIToFP does not work, it throws an assertion
2011 Oct 21
2
[LLVMdev] convert integer to double "uitofp" or "sitofp" ?
Hello, As I understand, in LLVM IR it cannot be determined whether a register of type int is signed or unsigned. If one wants to convert an integer to a double, which instruction should be used:  "uitofp" or "sitofp" ? We track the values taken by all load instructions and we process them using a function. If the value is a pointer, we use int64 as the type of the function
2008 Jun 07
2
[LLVMdev] ExecutionEngine::create returns 0
What does it mean when ExecutionEngine::create returns 0? Here's a simplified example: #include "llvm/Module.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" main() { llvm::Module * module = new llvm::Module("the module"); llvm::ExecutionEngine *ee = llvm::ExecutionEngine::create(module); fprintf(stdout, "pointer is %x.\n", ee); } I
2008 Jun 09
0
[LLVMdev] ExecutionEngine::create returns 0
On Sat, 07 Jun 2008 15:24:41 +0000, Hendrik Boom wrote: > What does it mean when ExecutionEngine::create returns 0? > > Here's a simplified example: > > #include "llvm/Module.h" > #include "llvm/ExecutionEngine/ExecutionEngine.h" > > main() > { > llvm::Module * module = new llvm::Module("the module"); >
2009 Sep 30
0
[LLVMdev] long double type on ARM
Hi Jin-Gu Kang! It are possible that the problem you are experiencing have already been solved in the current llvm 2.6 release tree and the current svn trunk. So try using llc from llvm 2.6 release branch or llvm pre2.7 svn trunk! It would be helpful if you could open a bugreport for this issue and attach the problematic od.bc since we need a testcase from the bitcode that exposes the bug inorder
2006 Sep 02
0
[LLVMdev] gfortran calling convention
On Fri, 1 Sep 2006, Michael McCracken wrote: > Here's what works now, and I have a separate test case for each of these: > > statement functions > intrinsic functions (print, cos, etc) > loops, goto statments > scalarized array operations > function calls with *no arguments* > simple common blocks Great! > Function calls with more than one argument don't work.
2006 Sep 02
2
[LLVMdev] gfortran calling convention
The NIST F77 test suite doesn't seem to be compatible with gfortran at all, so I had to work from my own sample codes, and generate test cases from them. Here's what works now, and I have a separate test case for each of these: statement functions intrinsic functions (print, cos, etc) loops, goto statments scalarized array operations function calls with *no arguments* simple common
2009 Sep 30
5
[LLVMdev] long double type on ARM
Dear LLVM members. I am compiling coreutils-7.4 package for ARM linux using LLVM 2.5 version. When i compiled 'od' program in coreutils package using LLVM 2.5, i could see the error message on llc processing. > llvm-gcc -emit-llvm ./od.c -c -o ./od.bc -other-options... > llc -march=arm ./od.bc -f -o ./od.s llc: