Displaying 12 results from an estimated 12 matches for "getfloatti".
Did you mean:
getfloatty
2019 Sep 26
2
ConstantFP->getType() is not right
Hi, I want to create a double constant from a float constant, here's my
code:
auto* constFloat1 =
static_cast<llvm::ConstantFP*>(llvm::ConstantFP::get(llvm::Type::getFloatTy(context),
3.1));
assert(constFloat1->getType() == llvm::Type::getFloatTy(context));
auto* constFloat2 =
llvm::ConstantFP::get(llvm::Type::getDoubleTy(context),
constFloat1->getValueAPF());
2010 Mar 19
2
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Reid,
Thanks! You were right!
Changing the code to:
float (*theF)(float) = (float (*)(float)) EE -> getPointerToFunction(f);
float retVal = theF(arg1);
made the difference. Now it is dozens of times faster!
I don't really understand the cause though..
Why doesn't ExecutionEngine cope well with "define float
@someFunc(float %x)" and needs this trick ? (but copes well with
2013 Sep 18
2
[LLVMdev] JIT compiled intrinsics calls is call to null pointer
Hi everyone,
I am trying to call an LLVM intrinsic (llvm.pow.f32), inserted with the
following call:
std::vector<llvm::Type *>
arg_types;arg_types.push_back(llvm::Type::getFloatTy(context));auto
function=llvm::Intrinsic::getDeclaration(module, llvm::Intrinsic::pow,
arg_types);auto result=ir_builder->CreateCall(function, args);
When I try to execute the code generated by the JIT
2010 Mar 19
0
[LLVMdev] JIT : Does it cache the compiled code of executed functions upon runFunction(..)?
Probably because the integer version of the prototype is
special-cased. The problem is that the JIT has a C function pointer
of an arbitrary type that it only finds out about at runtime.
Normally, if you call a function pointer with a known type, your
compiler will generate the proper calling code and allocate the
arguments in registers or on the stack. However, doing that inside
the JIT would
2013 May 22
1
[LLVMdev] Best strategy to add a parameter to a function
I am trying to build a function (C++ Builder) and at the same time
extend its parameter set. Here's what I try to do:
Value* arg0 = add_param_float("arg0");
Value* tmp = builder->CreateFAdd(arg0,some_previous_value);
Value* arg1 = add_param_float("arg1");
The function add_param_float should add a 'float' parameter to the
function and return its value. Right
2013 Sep 19
1
[LLVMdev] JIT compiled intrinsics calls is call to null pointer
Hi Andrew,
this sounded a plausible explanation, because the X86 processor does not
have an instruction to calculate the power function.
So I tried the llvm.sin.f32 intrinsic, as the X86 processor family does
have an instruction for that, but I still get the same problem. While you
may still be right, there is at least something else going on as well.
Thanks for your input, though.
Taco.
2016 May 17
3
External function resolution: MCJIT vs ORC JIT
When using ORC JIT, I'm having trouble with external function resolution (that is, of a function defined in the app, with C linkage).
I add a declaration for the function to my IR, and when I use MCJIT, it finds it and all is well, But when I use ORC JIT (I *think* correctly, at least it closely matches what I see in the tutorial), I get an LLVM error, "Program used external function
2009 Aug 14
0
[LLVMdev] How shall we modify llvm's OCaml binding to support LLVMContext?
I've partially ported the OCaml bindings to support LLVMContext, and I
wanted to get people's opinion on how to implement it in the API. For the
LLVM's C++ api, many key functions were modified to only take a LLVMContext,
such as replacing the global variable Type::FloatTy with a function
Type::getFloatTy(LLVMContext&). For llvm-c though, we need to maintain
backwards compatibility
2015 Jan 15
2
[LLVMdev] AllocaInst for FunctionType?
Hi,
I'm trying to get my head around c++ - IR - c++ API and getting used
tramform manual information to code.
The manual states alloca is defined for <type>. FunstionType is a type, so
alloca for functionType should be possible? Not?
If we have a valid Module *m
we can get an allocate instruction allocating space for a non-argumented
function as follows:
AllocaInst* pa2 = new
2016 May 19
2
External function resolution: MCJIT vs ORC JIT
Thanks so much! This seems to do the trick. I would have spun my wheels for a long time before discovering all of this, wow.
Do I even want to know what additional chickens need to be sacrificed to get this to work on Windows?
-- lg
> On May 18, 2016, at 1:52 PM, Lang Hames <lhames at gmail.com> wrote:
>
> Hi Larry,
>
> You're basically there, but you're hitting
2016 May 20
0
External function resolution: MCJIT vs ORC JIT
Hi Larry,
Thanks so much! This seems to do the trick. I would have spun my wheels for
> a long time before discovering all of this, wow.
No worries. :)
I'll try to keep this in mind and make sure I address it in future
Kaleidoscope tutorial chapters - these issues tripped me up the first time
I encountered them too.
Do I even want to know what additional chickens need to be sacrificed
2016 May 22
1
External function resolution: MCJIT vs ORC JIT
>> llvm::sys::DynamicLibrary::LoadLibraryPermanently(nullptr)
This is one is a bit tricky and hard to find.
I spent quiet some time digging into MC and ORC JIT execution engines trying to find what makes them work.
The problem is that this trick (LoadLibraryPermanently) happens inside of EngineBuilder, despite that the functionality belongs to a JIT engine itself, not to the builder.
I