Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] How to retrieve IntToPtr from StoreInst?"
2013 Apr 18
0
[LLVMdev] How to retrieve IntToPtr from StoreInst?
On 4/18/13 9:56 AM, Jun Koi wrote:
> hi,
>
> i am writing a simple LLVM pass to analyze the Store instruction.
> my pass derives from InstVisitor class, and the method to handle Store
> instruction is like this:
>
> void MyPass::visitStoreInst(StoreInst &I) {
> ...
> }
>
> It is pretty simple to handle Store. however, in on test i got an
> instruction like
2013 Apr 19
1
[LLVMdev] How to retrieve IntToPtr from StoreInst?
On Thu, Apr 18, 2013 at 11:11 PM, John Criswell <criswell at illinois.edu>wrote:
> On 4/18/13 9:56 AM, Jun Koi wrote:
>
> hi,
>
> i am writing a simple LLVM pass to analyze the Store instruction.
> my pass derives from InstVisitor class, and the method to handle Store
> instruction is like this:
>
> void MyPass::visitStoreInst(StoreInst &I) {
> ...
>
2014 Jan 09
2
[LLVMdev] InstVisitor usage problem
Hi.All
I had a problem in using llvm::InstVisitor class, my pass is like that:
using namespace llvm;
namespace
{
class InstVisit : public ModulePass,
public InstVisitor<InstVisit>
{
public :
static char ID;
InstVisit():ModulePass(ID){}
virtual bool runOnModule(Module &M)
{
visit(M);
return false;
}
void visitStoreInst(StoreInst &SI)
{
2013 Jan 18
2
[LLVMdev] How to get more details from storeInst ?
I have a loop fully unrolled and got the following store instruction.
store i32 %add.3, i32* getelementptr inbounds ([20 x [20 x i32]]* @c, i32 0,
i32 0, i32 0), align 4
I want to know exactly which element of the array that is going to be
stored, which help me to transform the high level language to hardware. Take
the instruction above as an example, I know the data is stored into c[0][0].
It
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
2013 Jan 18
0
[LLVMdev] How to get more details from storeInst ?
Hi Cheng,
On 18/01/13 03:00, Cheng Liu wrote:
> I have a loop fully unrolled and got the following store instruction.
>
> store i32 %add.3, i32* getelementptr inbounds ([20 x [20 x i32]]* @c, i32 0,
> i32 0, i32 0), align 4
>
> I want to know exactly which element of the array that is going to be
> stored, which help me to transform the high level language to hardware. Take
2014 Jan 08
3
[LLVMdev] reference to non-static member function must be called
Hi,everyone.
I'm writing a pass in which a CallInst to an external function will be
inserted. The function is declared like this:
void func(int a, unsigned chat *p);
and in the Pass(a Function Pass ,and using the InstVistor template ), I
wrote like this:
void visitStoreInst(StoreInst &SI)
{
//Get the refference of the types
Module *M =
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?
2012 Jan 27
3
[LLVMdev] How to get the string value?
Thanks Duncan,
Yes, it is a ConstantExpr! Thank you!
Now trying to find a clue in ConstantExpr's functions to get that string :-)
Regards,
Welson
On Thu, Jan 26, 2012 at 9:04 PM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Welson Sun,
>
> > Hi, if I have some LLVM code like this:
> >
> > @.str = private unnamed_addr constant [7 x i8]
2013 Nov 10
1
[LLVMdev] about creating the first value of the storeinst
Dear All
I'm trying to create storeInst using
StoreInst *SI = new StoreInst(val, AI, BB);
AI is an alloca instruction previously created, BB is the basicBlock I want to put instructionsi in. Val is the value to store.
I've created val from a genericValue like this:
Value* val = ConstantInt::get(getGlobalContext(), Result.IntVal);
Result is the genericValue
However I keep getting
2010 Aug 16
1
[LLVMdev] Create the Value object for StoreInst
Hello all,
I would like to create a new StoreInst into a basic block. I found that I
could use methods like ConstantInt::get() to provide the Value* for the
first argument of the constructor of the StoreInst, but I don't know how to
provide the second one. For example, if I would to do x = 1, I would like
to create the "Value" object of "x" for the second argument. I
2014 Jan 09
2
[LLVMdev] reference to non-static member function must be called
I'm using LLVM 3.3 Release. From the Class Reference Page. CallInst has a
member function :
static CallInst * Create (Value *Func, ArrayRef< Value * > Args, const
Twine &NameStr="", Instruction *InsertBefore=0)
This is what I want to use! the default name is "" and I also use that .
Thanks!
-----
Kind Regards!
-JinHuang
--
View this message in context:
2018 Aug 31
2
Extending StoreInst/LoadInst
Hi,
I am trying to figure out the best way to add some extra metadata to the store and load llvm-ir instructions:
The metadata content is a 'Value*' expression representing a side channel, containing dependency information that is used to help the Scoped Alias Analysis.
Optimizations that don't know about this side channel can safely drop it, where the only effect would be on the
2014 Aug 04
3
[LLVMdev] LLVM AllocaInst and StoreInst
Hi,
I am trying to write a simple interpreter.
I am trying to generate LLVM IR for assignment operation. The code for the
generation part looks like this
llvm::Value* codeGenSymTab(llvm::LLVMContext& context) {
> printf("\n CodeGen SymTab \n");
> Value *num = ConstantInt::get(Type::getInt64Ty(context), aTable.value,
> true);
> Value *alloc = new
2012 Dec 19
2
[LLVMdev] GetElementPtrConstantExpr
Ok, now it's arising another problem. IR code that I obtain is the
following:
i8* bitcast ([5 x i8] c"hello\00" to i8*)
generated from instructions:
ConstantExpr::getBitCast (ConstantDataArray::getString (getGlobalContext
(), "hello"), PointerType::get (Type::getInt8Ty (getGlobalContext ()), 0))
but the LLC tool says: invalid cast opcode for cast from '[5 x i8]'
2018 Mar 09
4
Dump LLVM StoreInst
Hi,
I’m writing a loop-free LLVM pass, my thought is to track if the value inside the loop is changed, so I look up the Instruction StoreInst first and try to get its value in a set. I checked getValueOperand(), getValueName() in the API document but unfortunately they failed the compilation.
if (isa<StoreInst>(I)){
Value* v = I.getOperand(0);
Instruction* op1 =
2010 Aug 07
3
[LLVMdev] Determine whether a stored variable is local or global in the code of LLVM 2.7
Hi,
I am trying to modify visitStoreInst() function in Execution.cpp of LLVM 2.7
to do some extra things. How I can determine whether the stored variable is
global or local for some function?
Regards,
Nayden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100806/fba58a79/attachment.html>
2012 Dec 18
2
[LLVMdev] GetElementPtrConstantExpr
Because I need to convert an [4 x i8] type to i8* in the instantiation of a
GlobalVariable.
I have the follow declaration: %xxx = type { i8* } and I must emit the
following variable:
@yyy = linkonce_odr constant %xxx { [4 x i8] c"hello\00" }, but it's wrong.
How do I do?
2012/12/18 Óscar Fuentes <ofv at wanadoo.es>
> Alessio Giovanni Baroni <alessiogiovanni.baroni at
2018 Mar 10
0
Dump LLVM StoreInst
The code you've pasted there is inconsistent in variable names. Your
created an instruction called 'op1' but your print uses 'v1'. What should
be an '->' is just a '-'. You also have a variable in your print called
'op' but that's not declared in your code. Also the result of dyn_cast
should always be checked for null before using the result.
2016 Dec 16
2
Alignment of the StoreInst
Hi all,
I am wondering the semantics of alignment in a StoreInst. For example, in
the following code:
%A = bitcast i8* %buffer to i32*
store i32 %x, i32* %A, align 4
We have an "align 4" in the StoreInst. Does this mean
1) the address 'A' should be aligned to 4 bytes?
2) the lower 2 bits of 'A' should be always 0?
Thanks
Hongbin
-------------- next part