Displaying 20 results from an estimated 1000 matches similar to: "Help to understand LoadValueFromMemory"
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*
2020 Jan 03
3
Interpreter crash due to an "Unknown constant pointer type!"
David,
sorry for this email but I noticed I made a mistake in the previous one. So
I managed to compile llvm Debug with asserts release. I have used the
following commands:
cmake -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_RTTI=ON
-DLLVM_ENABLE_FFI=ON -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=ON ..
cmake --build . -- -j8 && sudo cmake --build . --target install
Once lli was
2020 Feb 10
2
Interpreter crash due to an "Unknown constant pointer type!"
>
> Hey Lang - does any of this look familiar to you?
I'm afraid not: I know nothing about the interpreter. As far as I'm aware
it's essentially abandonware.
Alberto: The usual recommendation in these circumstances is to use a JIT
class instead of the interpreter. You're using -force-interpreter though,
so I assume you really want to use the interpreter for your use case?
2008 Oct 30
3
[LLVMdev] Problem executing code with lli...
Hi all,
I am facing new problem with lli now. I am having a sample code in which I am doing malloc for two variables. If I compile the code with normal gcc the program runs without any warning of any sorts. If I compile the program to convert it into a bytecode file and then run it through lli it segfaults and the program aborts. This is the stack trace after execution.
lli((anonymous
2008 Jun 19
1
[LLVMdev] Constant function pointers and inlining
Hello,
I've been working on turning PHP scripts into LLVM IR and I've gotten
to the stage where I'm able to construct LLVM code that calls the PHP
opcode handlers that I've pre-compiled to LLVM IR in the correct
order. However, the PHP API is designed so that the handlers are not
globally accessible (qualified by "static" in the C source). Instead
they're supposed to
2019 Dec 24
2
Interpreter crash due to an "Unknown constant pointer type!"
Hi David,
In pretty sure that the crash is due to the instruction I have shared in my
first email. In order to run pngpixel you just need libpng and zlib..
honest I thought that the .bc had Al the necessary. I'm happy to help you
to reproduce it. As a curiosity, why do you think you cannot reproduce it?
Unfortunately I won't be able to modify the interpreter soon.. anyway, I'll
try to
2009 Jul 25
3
[LLVMdev] Bug in ExecutionEngine::getConstantValue() -- Instruction::PtrToInt
I think I might have found a bug in the exection engine's 'constants
folding'.
Basically 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,
2019 Mar 22
2
Understand if a condition was true or false
Hi all,
I have the condition of an ICmpInst in a variable called condition obtained
doing GenericValue condition = getOperandValue(&I, SF);
Now I would like to understand if the comparison was true or false. Is it
correct to use condition.IntVal.getSExtValue() and if the value is 0
consider the true and if the value is -1 consider the condition false?
I'm not sure because I was expecting
2010 Aug 19
2
[LLVMdev] using external functions from llvm
Is there documentation somewhere on how to call external functions from
llvm? The only guide I found was this: http://www.gearleaf.com/blog/post/44,
and it doesn't seem to be working for me.
I have a function:
llvm::GenericValue lle_X_create_number_object(llvm::FunctionType* ft, const
std::vector<llvm::GenericValue>& args)
{
llvm_object_structure* result = new
2019 Jan 27
2
(no subject)
Hi,
All good points and jokes in your email :)
My final goal is the get the value of %8 at runtime. So considering the
program is called argv I would like to execute something like ./argv 22 and
get the value of argv[0]. Is it possible? So far I have the address where
the parameter at position 0 in store but I'd like to read the value and
print it.
I hope it is clear now
Thanks again
On
2019 Jul 27
2
Efficient way to identify an instruction
Hi all,
I would like to understand if there is an efficient way to identify the
instruction that "created" a specific variable. For example,
define i32 @main() #0 {
%1 = alloca i32, align 4
%2 = alloca %struct._IO_FILE*, align 8
%3 = alloca [40 x i8], align 16
store i32 0, i32* %1, align 4
%4 = call %struct._IO_FILE* @fopen(i8* getelementptr inbounds ([51 x i8],
[51 x i8]*
2010 Aug 19
3
[LLVMdev] using external functions from llvm
The blog post I linked to implied that adding a symbol in the form
lle_X_FUNCTIONNAME would allow you to call a function called FUNCTIONNAME.
Is this not the case?
On Thu, Aug 19, 2010 at 6:46 PM, <o.j.sivart at gmail.com> wrote:
> You are adding the symbol as "lle_X_create_number_object" yet your error
> message implies you have tried to lookup and use
2019 Mar 09
2
Cast a function parameter to GEP
Thanks Tim,
I'll try to solve my problem ASAP, if I cannot maybe I'll some other
clarifications.
Thanks again
On Sat, Mar 9, 2019, 06:03 Tim Northover <t.p.northover at gmail.com> wrote:
> Hi Alberto,
>
> On Sat, 9 Mar 2019 at 05:50, Alberto Barbaro via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > i8* getelementptr inbounds ([7 x i8], [7 x i8]*
2020 Feb 01
0
Interpreter crash due to an "Unknown constant pointer type!"
Hi Alberto,
Can you please file a bug for it, with the test case attached (if you
haven't already).
Thanks,
Ehud.
On Sat, 1 Feb 2020 at 11:32 Alberto Barbaro via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi all,
> just a gentle reminder :) Is there any update on this please?
>
> Happy to help in any way I can
>
> Alberto
>
> Il giorno ven 3 gen 2020 alle
2010 Aug 19
0
[LLVMdev] using external functions from llvm
You are adding the symbol as "lle_X_create_number_object" yet your error message implies you have tried to lookup and use "create_number_object". Can you provide the code for the lookup?
On 20/08/2010, at 8:07 AM, Alec Benzer wrote:
> Is there documentation somewhere on how to call external functions from llvm? The only guide I found was this:
2013 Nov 08
2
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
That makes it more mysterious then since I am indeed 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 =
2007 May 16
1
[LLVMdev] tiny compilation error with g++ 4.1.3
Hello All
File llvm/lib/ExecutionEngine/Interpreter/Execution.cpp (cvs rev 1.182)
fails to compile with g++ 4.1.3 (Debian/Sid/AMD64 system)
make[2]: Leaving directory `/usr/src/Lang/llvm/_Obj64/lib/Target'
make[2]: Entering directory `/usr/src/Lang/llvm/_Obj64/lib/ExecutionEngine'
make[3]: Entering directory `/usr/src/Lang/llvm/_Obj64/lib/ExecutionEngine/Interpreter'
llvm[3]:
2009 Jul 25
0
[LLVMdev] Bug in ExecutionEngine::getConstantValue() -- Instruction::PtrToInt
Aaron Gray wrote:
> I think I might have found a bug in the exection engine's 'constants
> folding'.
>
> Basically 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 =
2010 Nov 03
4
[LLVMdev] Fw: Forcing the Interpreter segfaults
[I assume you meant to send this to the list as well, not just me.]
Begin forwarded message:
Date: Wed, 3 Nov 2010 14:43:54 +0000
From: Salomon Brys <salomon.brys at gmail.com>
To: Török Edwin <edwintorok at gmail.com>
Subject: Re: [LLVMdev] Forcing the Interpreter segfaults
I have build LLVM in debug mode. Here are the informations of the
segfault : memcpy() at 0x7ffff6f6581e
2013 Nov 08
0
[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!
Something must be wrong with the Function Type. Try to debug into
runFunction to see which if condition fails.
Just a guess, if this is on 64 bit system the first argument type may be
int64 but needs to be int32.
Yaron
2013/11/8 edA-qa mort-ora-y <eda-qa at disemia.com>
> That makes it more mysterious then since I am indeed only calling a main
> function. Perhaps I have to invoke