Displaying 19 results from an estimated 19 matches for "pointerv".
Did you mean:
pointer
2009 Jul 25
3
[LLVMdev] Bug in ExecutionEngine::getConstantValue() -- Instruction::PtrToInt
...asically APInt's parameters are the wrong way round.
Line 577 for lib/ExecutionEngine/ExecutionEngine.cpp :-
case Instruction::PtrToInt: {
GenericValue GV = getConstantValue(Op0);
uint32_t PtrWidth = TD->getPointerSizeInBits();
GV.IntVal = APInt(PtrWidth, uintptr_t(GV.PointerVal));
return GV;
}
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090725/db18ac2e/attachment.html>
2019 Jul 17
2
Help to understand LoadValueFromMemory
...ack();
GenericValue SRC = getOperandValue(source, SF);
GenericValue* Ptr = (GenericValue*)GVTOP(SRC);
GenericValue Result;
source->getPointerOperand()->getType()->dump(); //[40 x i8]*
LoadValueFromMemory(Result, Ptr, source->getPointerOperand()->getType());
and use Result.PointerVal ...
In the end I have the first 4 bytes within Result.PointrVal but I cannot
see the other bytes.. Unfortunately also Result.AggregateVal has size 0.
Could you help me to understand why please?
The core part of the .ll is the following:
define i32 @main() #0 {
%1 = alloca i32, align 4
%2...
2010 Aug 19
2
[LLVMdev] using external functions from llvm
...FunctionType* ft, const
std::vector<llvm::GenericValue>& args)
{
llvm_object_structure* result = new llvm_object_structure;
result->typeIdx = TypeSystem::number;
result->data = reinterpret_cast<unsigned char*>(new
double(args[0].DoubleVal));
llvm::GenericValue gv;
gv.PointerVal = reinterpret_cast<void*>(result);
return gv;
}
defined in an extern "C" block. I add it as a symbol with:
llvm::sys::DynamicLibrary::AddSymbol("lle_X_create_number_object",(void*)lle_X_create_number_object);
yet when attempting to call it I still get: "LLVM ER...
2009 Jul 25
0
[LLVMdev] Bug in ExecutionEngine::getConstantValue() -- Instruction::PtrToInt
...he wrong way round.
>
> Line 577 for lib/ExecutionEngine/ExecutionEngine.cpp :-
>
> case Instruction::PtrToInt: {
> GenericValue GV = getConstantValue(Op0);
> uint32_t PtrWidth = TD->getPointerSizeInBits();
> GV.IntVal = APInt(PtrWidth, uintptr_t(GV.PointerVal));
> return GV;
> }
> Aaron
That looks to be the right order to me:
APInt(unsigned numBits, uint64_t val, bool isSigned=false)
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/200907...
2007 May 16
1
[LLVMdev] tiny compilation error with g++ 4.1.3
...er/Execution.cpp:1347: error: cast from 'void*' to 'unsigned int' loses precision
The trivial patch which works for me is to use intptr_t instead of unsigned, hence replacing the faulty line with
case Type::PointerTyID: DOUT << "void* " << (intptr_t)(Val.PointerVal); break;
Regards
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faïencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***
2008 Jun 19
1
[LLVMdev] Constant function pointers and inlining
...enericValue that points to the handler, I don't really know how to
turn that to a constant function pointer in LLVM. What I do is rather
complicated:
Value* handler = ConstantExpr::getIntToPtr(
ConstantInt::get(Type::Int32Ty,
(unsigned int) engine->runFunction(get_handler, args).PointerVal),
PointerType::get(handler_type, 0));
/* ^^^^^ Is there a better way to do the conversion? ^^^^^^ */
Value* result = builder.CreateCall2(handler,
execute_data,
tsrlm_ref,
"execute_result");
And as a result I get handler calls like this:
%execute_result9 = tail...
2010 Aug 19
3
[LLVMdev] using external functions from llvm
...<llvm::GenericValue>& args)
> {
> llvm_object_structure* result = new llvm_object_structure;
> result->typeIdx = TypeSystem::number;
> result->data = reinterpret_cast<unsigned char*>(new
> double(args[0].DoubleVal));
> llvm::GenericValue gv;
> gv.PointerVal = reinterpret_cast<void*>(result);
> return gv;
> }
>
> defined in an extern "C" block. I add it as a symbol with:
>
>
> llvm::sys::DynamicLibrary::AddSymbol("lle_X_create_number_object",(void*)lle_X_create_number_object);
>
> yet when attemp...
2010 Aug 19
0
[LLVMdev] using external functions from llvm
...ector<llvm::GenericValue>& args)
> {
> llvm_object_structure* result = new llvm_object_structure;
> result->typeIdx = TypeSystem::number;
> result->data = reinterpret_cast<unsigned char*>(new double(args[0].DoubleVal));
> llvm::GenericValue gv;
> gv.PointerVal = reinterpret_cast<void*>(result);
> return gv;
> }
>
> defined in an extern "C" block. I add it as a symbol with:
>
> llvm::sys::DynamicLibrary::AddSymbol("lle_X_create_number_object",(void*)lle_X_create_number_object);
>
> yet when attempt...
2013 Nov 08
2
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
...only calling a main
function. Perhaps I have to invoke it a different way. Here's my call I
have now:
auto main = linker->getModule()->getFunction( "main" );
std::vector<llvm::GenericValue> args(2);
args[0].IntVal = llvm::APInt( platform::abi_int_size, 0 );
args[1].PointerVal = nullptr;
llvm::GenericValue gv = ee->runFunction( main, args );
On 08/11/13 11:14, Yaron Keren wrote:
> MCJIT::runFunction supports only main-style argument passing but not
> other cases like the JIT.
> These types of arguments will work:
>
> (int, char**, char**)
> (i...
2013 Nov 08
0
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
...different way. Here's my call I
> have now:
>
> auto main = linker->getModule()->getFunction( "main" );
>
> std::vector<llvm::GenericValue> args(2);
> args[0].IntVal = llvm::APInt( platform::abi_int_size, 0 );
> args[1].PointerVal = nullptr;
> llvm::GenericValue gv = ee->runFunction( main, args );
>
>
>
> On 08/11/13 11:14, Yaron Keren wrote:
> > MCJIT::runFunction supports only main-style argument passing but not
> > other cases like the JIT.
> > These types of arguments will wo...
2013 Nov 08
1
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
...39;s my call I
> have now:
>
> auto main = linker->getModule()->getFunction( "main" );
>
> std::vector<llvm::GenericValue> args(2);
> args[0].IntVal = llvm::APInt( platform::abi_int_size, 0 );
> args[1].PointerVal = nullptr;
> llvm::GenericValue gv = ee->runFunction( main, args );
>
>
>
> On 08/11/13 11:14, Yaron Keren wrote:
> > MCJIT::runFunction supports only main-style argument passing but not
> > other cases like the JIT.
> > These typ...
2010 Aug 20
0
[LLVMdev] using external functions from llvm
...mp; args)
>> {
>> llvm_object_structure* result = new llvm_object_structure;
>> result->typeIdx = TypeSystem::number;
>> result->data = reinterpret_cast<unsigned char*>(new
>> double(args[0].DoubleVal));
>> llvm::GenericValue gv;
>> gv.PointerVal = reinterpret_cast<void*>(result);
>> return gv;
>> }
>>
>> defined in an extern "C" block. I add it as a symbol with:
>>
>>
>> llvm::sys::DynamicLibrary::AddSymbol("lle_X_create_number_object",(void*)lle_X_create_number_object...
2008 May 28
0
[LLVMdev] A quick update on FreeBSD support
On May 24, 2008, at 4:25 PM, Marcel Moolenaar wrote:
> On May 24, 2008, at 12:12 PM, Bill Wendling wrote:
>> Let us know if you would like extra eyes on the two PPC failures.
>> Many
>> of us have a lot of experience with C++. :-) Do you know where these
>> allocations are?
>
> I don't mind if people help out, so here's some information:
Nice!
2013 Nov 08
0
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
MCJIT::runFunction supports only main-style argument passing but not other
cases like the JIT.
These types of arguments will work:
(int, char**, char**)
(int, char**)
(int)
(void)
The general case is not supported since it requires creating a small stub
function, compiling and running it on the fly, supported by JIT but not
MCJIT.
However, with the supported calling sequences, you can probably
2013 Nov 08
2
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
I'm trying to get MCJIT working but I get the following errors:
Full-featured argument passing not supported yet!
UNREACHABLE executed at MCJIT.cpp:322!
I'm sure the first one will be a problem, but the second one prevents me
from testing anything. I don't know how to fix the problem.
My code works when using the non-MC JIT, and I added to my EngineBuilder:
.setUseMCJIT(true)
2018 May 05
0
Slow IR compilation/JIT, profiling points to LLVM?
Hi,
Could you share how you compile IR and which version of JIT you use (Orc, MCJIT)?
Could it be that you are using interpreter instead of actual JIT?
Cheers,
Alex.
> On 5. May 2018, at 08:04, edA-qa mort-ora-y via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> I'm having issues of my compiler, and JIT execution, of LLVM IR being
> rather slow. It's accounting for
2019 Jan 20
3
(no subject)
Hi all,
I have the following C code:
#include<stdio.h>
int main(int argc, char *argv[]) {
printf("%s\n", argv[0]);
return argc;
}
that generates the following IR for the main function:
; Function Attrs: noinline nounwind optnone uwtable
define i32 @main(i32, i8**) #0 {
%3 = alloca i32, align 4
%4 = alloca i32, align 4
%5 = alloca i8**, align 8
store i32 0, i32*
2018 May 05
4
Slow IR compilation/JIT, profiling points to LLVM?
I'm having issues of my compiler, and JIT execution, of LLVM IR being
rather slow. It's accounting for the vast majority of my full
compilation time. I'm trying to figure out why this is happening, since
it's becoming an impediment. (Note: by slow I mean about 3s of time for
only about 2K of my front-end code, 65K lines of LLVM-IR)
Using valgrind I see some functions which seem
2008 May 24
5
[LLVMdev] A quick update on FreeBSD support
On May 24, 2008, at 12:12 PM, Bill Wendling wrote:
> Let us know if you would like extra eyes on the two PPC failures. Many
> of us have a lot of experience with C++. :-) Do you know where these
> allocations are?
I don't mind if people help out, so here's some information:
FAIL: /nfs/llvm/src/llvm/test/Transforms/PredicateSimplifier/
2006-11-04-ReplacingZeros.ll
Failed with