search for: nouralizadeh

Displaying 15 results from an estimated 15 matches for "nouralizadeh".

2018 Aug 08
3
Error Calling eraseFromParent()
...ith this > code in Debug Mode or is it simply null pointer dereference? > On a side note, usually when doing transforms similar to yours I use > IRBuilder’s CreateXXX followed by a ReplaceInstWithInst which works > perfectly fine for me. > > Zhang > > 在 2018年8月9日,00:29,Ahmad Nouralizadeh <ahmadnouralizadeh at gmail.com> 写道: > > Hi. Thanks. I changed the code but the problem exists. This is my new code > which is again very simple: > ... > bool runOnFunction(Function &F) override { > > vector<Instruction *> dels; > dels.clear(); > > for...
2018 Aug 08
2
Error Calling eraseFromParent()
...rote: > Hi: > As stated in the documentation you shouldn’t modify it while iterating as > this invalidates the iterator. Try save the pointers to a vector outside > your loop and perform erasing in a new loop following your current one. > > Zhang > > 在 2018年8月8日,07:54,Ahmad Nouralizadeh via llvm-dev <llvm-dev at lists.llvm.org> > 写道: > > Thanks Bjorn! But The problem is still there. > > On Wed, Aug 8, 2018 at 2:04 AM, Björn Pettersson A < > bjorn.a.pettersson at ericsson.com> wrote: > >> It looks quite dangerous to erase the instruction I ins...
2018 Aug 07
2
Error Calling eraseFromParent()
...... > } > > That will make sure that you step the iterator before modifying the data > structure you iterate over. > > Regards, > Björn > ________________________________________ > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Ahmad > Nouralizadeh via llvm-dev <llvm-dev at lists.llvm.org> > Sent: Tuesday, August 7, 2018 22:26 > To: paul.robinson at sony.com > Cc: llvm-dev at lists.llvm.org > Subject: Re: [llvm-dev] Error Calling eraseFromParent() > > The code is really simple. But I can not the reason for the segmenta...
2018 Nov 12
2
Convert Register Names to String
...IR. You mean I should reuse the code to extract and output the register names in a file. Next, I should postprocess the file in my own pass? Regards. On Mon, 12 Nov 2018 at 13:09, Tim Northover <t.p.northover at gmail.com> wrote: > Hi Ahmad, > > On Sun, 11 Nov 2018 at 13:39, Ahmad Nouralizadeh Khorrami via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > I want to do a cutomized points-to analysis on IR. Suppose that we have: > > %91 = bitcast i8* %90 to %struct.demux_packet*, !dbg !2688 > > > > I want to store sth similar to %91 -> target of %90, wh...
2018 Aug 16
2
Convert Function Pointer Call to Function Call at the IR Level
Hi, I want to convert a function pointer call in the IR of MPlayer to a function call. For example, I have the following line: ... %10 = tail call i32 %7(%struct.demuxer* nonnull %0, i32 %1, i8* %2) #7, !dbg !863222 ... I want to set the target which is stored in %7 to a real function called "demux_lavf_control()" with the following definition: ... define internal i32
2018 Aug 07
2
Error Calling eraseFromParent()
..._ASSERTIONS=ON, > right?) If not, likely you are dereferencing a null pointer somewhere. > Personally I debug with 'printf' statements, but that's just me. > > --paulr > > > > *From:* llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] *On Behalf Of *Ahmad > Nouralizadeh via llvm-dev > *Sent:* Tuesday, August 07, 2018 11:03 AM > *To:* llvm-dev at lists.llvm.org > *Subject:* [llvm-dev] Error Calling eraseFromParent() > > > > Hi. > > This is part of my code: > > ... > > if (auto* op = dyn_cast<BinaryOperator>(&I)) { &g...
2018 Aug 07
2
Create an Add Instruction in LLVM IR
I want to create an add instruction that takes two constant operands at the LLVM IR level. I use the IRBuilder class, but nothing happens. Here is part of the runOnFunction() method of my function pass: ... LLVMContext &Context = F.getContext(); IRBuilder<> builder(&Instruction); Value *Lef = ConstantInt::get(Type::getInt32Ty(Context), 4); Value *Rig =
2018 Nov 11
2
Convert Register Names to String
Hi. I want to do a cutomized points-to analysis on IR. Suppose that we have: *%91 = bitcast i8* %90 to %struct.demux_packet*, !dbg !2688* I want to store sth similar to %91 -> target of %90, which records the target of pointer named %91. How can I access the names (Here, %90 and %91)? I know that I can put the whole line for an instruction into a string, using the following code: *string str;*
2018 Aug 07
2
Error Calling eraseFromParent()
Hi. This is part of my code: ... if (auto* op = dyn_cast<BinaryOperator>(&I)) { Value* lhs = op->getOperand(0); Value* rhs = op->getOperand(1); Value* mul = builder.CreateMul(lhs, rhs); for (auto& U : op->uses()) { User* user = U.getUser(); user->setOperand(U.getOperandNo(), mul); } I.eraseFromParent(); } ... This leads to the following
2018 Sep 03
2
Replacing a function from one module into another one
...fModule, and I don't know how to go instruction by instruction in all the moved blocks and correct the reference to point to the arguments in the oldModule's new function, this also sounds very messy and complicated. Regards, Daniel Moya El dom., 2 de sep. de 2018 a la(s) 23:18, Ahmad Nouralizadeh Khorrami ( ahmad.llvm at gmail.com) escribió: > Hi Daniel, > The answer was for your first thread. The benefits are outlined in the > repository, but your problem is still there. I'm not sure. But this looks > similar to my recent problem. I think that a bitcast will solve the >...
2018 Sep 04
2
Replacing a function from one module into another one
...d correct the >> reference to point to the arguments in the oldModule's new function, this >> also sounds very messy and complicated. >> >> >> Regards, >> Daniel Moya >> >> >> >> >> El dom., 2 de sep. de 2018 a la(s) 23:18, Ahmad Nouralizadeh Khorrami ( >> ahmad.llvm at gmail.com) escribió: >> >>> Hi Daniel, >>> The answer was for your first thread. The benefits are outlined in the >>> repository, but your problem is still there. I'm not sure. But this looks >>> similar to my recent pr...
2018 Sep 02
2
Replacing a function from one module into another one
...LVM linker does the job for me, the issue is when changing the called function to call another function (in the example previously provided, to change it from foo2 to foo3, and adjusting the function parameter's references). Regards, Daniel Moya El dom., 2 de sep. de 2018 a la(s) 17:00, Ahmad Nouralizadeh Khorrami ( ahmad.llvm at gmail.com) escribió: > Hi. > Besides the LLVM linker, you can also use this tool: > https://github.com/travitch/whole-program-llvm > It links all the modules and produces a single module containing every > function. > Regards. > > On Sun, 2 Sep 2018...
2018 Sep 06
2
Replacing a function from one module into another one
...s new function, this >>>> also sounds very messy and complicated. >>>> >>>> >>>> Regards, >>>> Daniel Moya >>>> >>>> >>>> >>>> >>>> El dom., 2 de sep. de 2018 a la(s) 23:18, Ahmad Nouralizadeh Khorrami ( >>>> ahmad.llvm at gmail.com) escribió: >>>> >>>>> Hi Daniel, >>>>> The answer was for your first thread. The benefits are outlined in the >>>>> repository, but your problem is still there. I'm not sure. But this lo...
2018 Sep 06
2
Replacing a function from one module into another one
...ated. >>>>>> >>>>>> >>>>>> Regards, >>>>>> Daniel Moya >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> El dom., 2 de sep. de 2018 a la(s) 23:18, Ahmad Nouralizadeh Khorrami >>>>>> (ahmad.llvm at gmail.com) escribió: >>>>>> >>>>>>> Hi Daniel, >>>>>>> The answer was for your first thread. The benefits are outlined in >>>>>>> the repository, but your problem is sti...
2018 Sep 02
2
Replacing a function from one module into another one
Hello and thanks for the answer, I'm still facing issues, I'll do my best to explain my situation, as I explained, I have two modules, each one with its own main and functions, I would like to replace in the *oldModule* a function call that is calling *foo2* (defined in *oldModule*) to instead call *foo3*, which is defined in the *refModule. *So in summary, I have: 1. The original