Displaying 20 results from an estimated 9000 matches similar to: "Efficient way to identify an instruction"
2019 Jul 28
2
Efficient way to identify an instruction
Hi Tim,
as always thanks for your help. Unfortunately I made a mistake in my email
but apart from that I still have problems.
Il giorno sab 27 lug 2019 alle ore 11:53 Tim Northover <
t.p.northover at gmail.com> ha scritto:
> Hi Alberto,
>
> On Sat, 27 Jul 2019 at 10:09, Alberto Barbaro via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > Having the reference I to
2019 Jul 29
2
Efficient way to identify an instruction
Hi Alberto,
I have not used this myself, but I think you should be able to visit your Instruction ‘users()’. I think the name this function was given is a bit confusing, but this returns an iterator range you can iterate through to find instructions that depend on a given one.
Similarly, you have the function ‘uses()’ that can be used to traverse down the DAG when instructions are still on SSA
2020 Jan 27
3
Custom Alloca implementation
---Adding llvm-dev list to CC---
Hi Alberto,
Thanks for your prompt reply. Actually, I need this information(about total
allocation size and object structure) on runtime, so that is why I was
planning to encode this info and store it in the memory itself.
Regards,
Udit
On Mon, Jan 27, 2020 at 7:05 PM Alberto Barbaro <barbaro.alberto at gmail.com>
wrote:
> Hello Udit,
> I'm not
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]*
2019 Nov 20
2
Get the address of ConstantDataArray
Hi all,
I have a global array declared as: table = internal constant [8 x [256 x
i32]] ...
At the moment I'm able to get the reference to table using Constant* g_var
= cast<GlobalVariable>(I.getOperand(0))->getInitializer(); ( please
consider I to be a GetElementPtrInst object ).
Now I would like to understand how to get the address of table[2][3], for
instance, considering that I
2019 Jul 17
2
Help to understand LoadValueFromMemory
Hi all,
I'm trying to print to screen the value read by the fread function. I'm at
the point where source refers to the GetElementPtrInst ( pointer to the
buffer where fread stored the data - %5 in my case ) and the fread() has
been already called.
I thought the correct approach to achieve what I need was:
ExecutionContext& SF = ECStack.back();
GenericValue SRC =
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?
2019 Dec 18
2
Standard way to remove llvm intrinsics
Hi Eric,
Currently I'm mainly playing with interpreter and trying to understand how
it exactly works. I have noticed that lli complains when llvm.dbg.value is
encounter that why I wanted to remove it. Additionally, I would like to
understand that performances with and without intrinsics and the impact
they have on the interpreter in general.
Thanks
Alberto
On Wed, Dec 18, 2019, 00:33 Eric
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
2019 Mar 04
2
Interpreter improvement
Hi,
I my case I needed to trace the execution of a specific .ll file. I wanted
to know when a store and load instruction were executed. Maybe extending
the Interpreter class was not the best option so I'm happy to hear
suggestions.
As a curiosity, why do you think that class should be rewritten?
Thanks
On Mon, Mar 4, 2019, 08:15 mayuyu.io <admin at mayuyu.io> wrote:
> I dont quite
2019 Dec 18
2
Missing code depending on a #ifdef within the .ll file
Hi David,
My question is: why both #ifdef and #else branches are missing? I think at
least one of the two should be present... In fact there is a case where the
width could be greater then
PNG_USER_WIDTH_MAX but not greater then PNG_UINT_31_MAX. That's why I was
expecting at least one of the two...
Thanks
Alberto
On Wed, Dec 18, 2019, 22:12 David Blaikie <dblaikie at gmail.com>
2019 Mar 09
2
Cast a function parameter to GEP
Hi all,
I'm still working on the Interpreter class and I would like to understand
why an operand cannot be cast to GetElementPtrInst.
My code is something like:
void MyInterpreter::visitCallInst(CallInst& I)
{
for(int i = 0; i < I.getNumArgOperands(); i++) {
operand = I.getOperand(i);
if(GetElementPtrInst* CI =
dyn_cast<GetElementPtrInst>(operand)) {
2018 Nov 18
2
How to add instructions to a Module at runtime?
Hi David,
Thanks for your answer. Just to clarify, I would like to create 2 3
instructions put them in a function and execute them. Do you still think
the JIT would be the best option?
Thanks
On Sun, Nov 18, 2018, 12:55 David Blaikie <dblaikie at gmail.com wrote:
> If you're looking to execute code at runtime (within th eam process - or
> across a network etc - as the one that
2019 Dec 09
2
How to generate a .ll file with functions' parameter names
Hi David,
Thanks for your email. I'm just trying to perform some basic analysis on
the IR. For instance, is it possible to understand if the variable %10
depends on the value of the first parameter? I know that the first
parameter can be referenced as %0 but a proper name would increase the
readability. It is not so crucial for me atm.
Thanks
Alberto
On Mon, Dec 9, 2019, 11:01 David Chisnall
2019 Nov 08
2
How to avoid or remove llvm.dbg.value?
Hi Tim,
Thank you very much for the message. It indeed solved the problem.
Thanks
On Fri, Nov 8, 2019, 15:05 Tim Northover <t.p.northover at gmail.com> wrote:
> Hi Alberto,
>
> On Fri, 8 Nov 2019 at 06:59, Alberto Barbaro via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > Is there any way for avoiding to use llvm.dbg.value within a bc file?
>
>
2019 Dec 08
2
How to generate a .ll file with functions' parameter names
Hi Tim,
My bad, I have installed a newer version of clang and all worked.
Thanks
On Sun, Dec 8, 2019, 10:05 Tim Northover <t.p.northover at gmail.com> wrote:
> On Sun, 8 Dec 2019 at 09:54, Alberto Barbaro via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > thanks for your answer. Unfortunately I'm still using llvm 6.0 and in
> llvm-dis I don't see that
2019 Jun 27
3
How to the get the PHI Nodes in a basic block?
Hi all,
I have an Instruction object I from where I can correctly obtain the parent
doing I.getParent(). Now I would like to understand how to obtain the PHI
Nodes in that block. Do you suggest to iterate all over the instructions
since the PHI nodes are always at the beginning or should I use another
approach? What the best way to iterate over the instructions in a block?
Thanks
Alberto
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 Dec 19
2
Interpreter crash due to an "Unknown constant pointer type!"
Hi David,
Thanks for the suggestions. I can definitely provide the example bc file
and image ( please see the attachments ). For the debug + asserts I need a
bit of more time.
Anyway the full output of lli is:
lli --force-interpreter examples/pngpixel_crash.bc 0 0 examples/mini.png
png_ptr->width: 1
max_pixel_depth: 24
row_bytes: 28
Unknown constant pointer type!
UNREACHABLE executed at