Displaying 20 results from an estimated 20 matches for "visitstoreinst".
2013 Apr 18
2
[LLVMdev] How to retrieve IntToPtr from StoreInst?
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 below:
store i8 %tmp5, i8* inttoptr (i32 301959828 to i8*)
the second operand is "i8* inttoptr (i32 301959828 to i8*)", and i have no
idea how i can retrieve the address 30195...
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 below:
>
> store i8 %tmp5, i8* inttoptr (i32 301959828 to i8*)
The inttoptr used here is a Constant Expression (llvm::ConstantExpr).
You'll need to t...
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/attach...
2014 Jan 09
2
[LLVMdev] InstVisitor usage problem
...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)
{
errs()<<"a store inst:"<<&SI<<"\n";
}
};
char InstVisit::ID = 0;
static RegisterPass<InstVisit>
X("visitInst","visit inst test");
}
then I use
opt -load /home/king/llvm/Release+Asserts/lib/...
2013 Apr 19
1
[LLVMdev] How to retrieve IntToPtr from StoreInst?
...;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) {
> ...
> }
>
> It is pretty simple to handle Store. however, in on test i got an
> instruction like below:
>
> store i8 %tmp5, i8* inttoptr (i32 301959828 to i8*)
>
>
> The inttoptr used here is a Constant Expression (llvm::ConstantExpr).
> You&...
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:
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 = SI.getParent()->getParent()->getParent();
IntegerType* Int8Type = IntegerType::getInt8Ty(M->getContext());
IntegerType* Int32Type = IntegerType::getInt32Ty(M->getContext());
IntegerType* Int64Type = In...
2010 Aug 09
0
[LLVMdev] Determine whether a stored variable is local or global in the code of LLVM 2.7
...ch data is stored is part of the heap or part of the
stack.
Regards,
Nayden
On Sat, Aug 7, 2010 at 3:22 AM, Patrick Marlier <patrick.marlier at unine.ch>wrote:
>
>> On 08/07/2010 04:41 AM, Nayden Nedev wrote:
>>
>>> 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
>>>
>> Hello,
>>
>> Here the answer:
>...
2019 Mar 16
2
Why getNumOperands() incorrectly returns 0?
Hi all,
I have encountered a weird case that I cannot understand. Inside the
visitStoreInst I have a reference (F) to the function png_set_mem_fn. If I
do F->dump() i can set the IR of that function correctly e.g.:
; Function Attrs: nounwind uwtable
define void @png_set_mem_fn(%struct.png_struct_def.68* noalias %png_ptr,
i8* %mem_ptr, i8* (%struct.png_struct_def.68*, i64)* %malloc_fn,...
2020 Jan 03
3
Interpreter crash due to an "Unknown constant pointer type!"
...const*)
/home/al/llvm-9.0.0.src/lib/ExecutionEngine/ExecutionEngine.cpp:1013:0
#9 0x0000564bacfeb873 llvm::Interpreter::getOperandValue(llvm::Value*,
llvm::ExecutionContext&)
/home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Execution.cpp:2108:0
#10 0x0000564bacfe548a llvm::Interpreter::visitStoreInst(llvm::StoreInst&)
/home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Execution.cpp:1105:0
#11 0x0000564bacfee32f llvm::InstVisitor<llvm::Interpreter,
void>::visitStore(llvm::StoreInst&)
/home/al/llvm-9.0.0.src/include/llvm/IR/Instruction.def:173:0
#12 0x0000564bacfed18d llvm::Ins...
2020 Feb 10
2
Interpreter crash due to an "Unknown constant pointer type!"
...nEngine/ExecutionEngine.cpp:1013:0
>> #9 0x0000564bacfeb873 llvm::Interpreter::getOperandValue(llvm::Value*,
>> llvm::ExecutionContext&)
>> /home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Execution.cpp:2108:0
>> #10 0x0000564bacfe548a
>> llvm::Interpreter::visitStoreInst(llvm::StoreInst&)
>> /home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Execution.cpp:1105:0
>> #11 0x0000564bacfee32f llvm::InstVisitor<llvm::Interpreter,
>> void>::visitStore(llvm::StoreInst&)
>> /home/al/llvm-9.0.0.src/include/llvm/IR/Instruction.def:17...
2015 Jan 24
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...rand directly , but such is life ...
CFL-AA *should* treat this like an assignment to GEP operand, not like a
normal store, which is *x = y. This is really *(&GEP operand) = y.
But currently, it does nothing right here :)
I haven't tracked down entirely what is happening, but for sure,
visitStoreInst doesn't do the right thing in this case.
Fixing that still gives a wrong result, i haven't started to track down
what *else* is going on here.
I suspect either more ConstantExpr related bugs, or the global attribute
is not being fully propagated around or something.
On Fri Jan 23 2015...
2020 Feb 01
0
Interpreter crash due to an "Unknown constant pointer type!"
...ine.cpp:1013:0
>>> #9 0x0000564bacfeb873 llvm::Interpreter::getOperandValue(llvm::Value*,
>>> llvm::ExecutionContext&)
>>> /home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Execution.cpp:2108:0
>>> #10 0x0000564bacfe548a
>>> llvm::Interpreter::visitStoreInst(llvm::StoreInst&)
>>> /home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Execution.cpp:1105:0
>>> #11 0x0000564bacfee32f llvm::InstVisitor<llvm::Interpreter,
>>> void>::visitStore(llvm::StoreInst&)
>>> /home/al/llvm-9.0.0.src/include/llvm/IR/In...
2013 Jul 05
2
[LLVMdev] Any suggestion for "Unknown instruction type encountered" error?
...ctx = Fn->getContext();
llvm::IRBuilder<> builder(ctx);
FailBB = llvm::BasicBlock::Create(ctx, "FailBlock", Fn);
llvm::ReturnInst::Create(Fn->getContext(), FailBB);
return FailBB;
}
void visitLoadInst(llvm::LoadInst & LI) {
}
void visitStoreInst(llvm::StoreInst & SI) {
llvm::Value * Addr = SI.getOperand(1);
llvm::PointerType* PTy = llvm::cast<llvm::PointerType>(Addr->getType());
llvm::Type * ElTy = PTy -> getElementType();
if (!ElTy->isPointerTy()) {
llvm::BasicBlock *OldBB = SI.getParent();...
2015 Jan 26
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...GEP operand, not
> > like a normal store, which is *x = y. This is really *(&GEP operand)
> > = y.
> >
> >
> > But currently, it does nothing right here :)
> >
> >
> > I haven't tracked down entirely what is happening, but for sure,
> > visitStoreInst doesn't do the right thing in this case.
> > Fixing that still gives a wrong result, i haven't started to track
> > down what *else* is going on here.
> >
> >
> > I suspect either more ConstantExpr related bugs, or the global
> > attribute is not being fu...
2015 Jan 23
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
...al Alias Queries Performed
176 no alias responses (33.7%)
- 334 may alias responses (64.1%)
- 10 partial alias responses (1.9%)
+ 344 may alias responses (66.0%)
+ 0 partial alias responses (0.0%)
1 must alias responses (0.1%)
I suspect this is all caused by a different set of bugs:
1. visitStoreInst does not appear to handle the case of value being a GEP
properly (Personally, i had no idea this was allowed ...)
It should somehow call into the visitGEP code, but it doesn't.
Thus, it never assigns anything into the value of the global.
2. Something is either busted in querying or in attribu...
2013 Jul 05
0
[LLVMdev] Any suggestion for "Unknown instruction type encountered" error?
...use this builder?
>
> FailBB = llvm::BasicBlock::Create(ctx,"FailBlock", Fn);
> llvm::ReturnInst::Create(Fn->getContext(), FailBB);
> return FailBB;
>
> }
> void visitLoadInst(llvm::LoadInst& LI) {
> }
>
> void visitStoreInst(llvm::StoreInst& SI) {
> llvm::Value * Addr = SI.getOperand(1);
> llvm::PointerType* PTy = llvm::cast<llvm::PointerType>(Addr->getType());
> llvm::Type * ElTy = PTy -> getElementType();
> if (!ElTy->isPointerTy()) {
> llvm::BasicBl...
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
2014 Aug 19
45
[LLVMdev] [RFC] Removing static initializers for command line options
> On Aug 19, 2014, at 1:32 PM, Rafael EspĂndola <rafael.espindola at gmail.com> wrote:
>
>>> * Nobs for which there is not a single right answer for all users.
>>> There are very few of these currently and we expect it to remain like
>>> that. These should not use cl::opt or static storage at all. They
>>> should be an option passed to the
2015 Jan 23
2
[LLVMdev] question about enabling cfl-aa and collecting a57 numbers
Works for me
On Thu, Jan 22, 2015 at 8:27 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> We should use graph edges, so we can do something better at set build time
> :)
>
>
> On Thu Jan 22 2015 at 5:20:46 PM George Burgess IV <
> george.burgess.iv at gmail.com> wrote:
>
>> > Should we be added an edge from the inttoptr to all other pointer
>>