search for: setincomingvalu

Displaying 7 results from an estimated 7 matches for "setincomingvalu".

Did you mean: setincomingvalue
2013 Nov 09
1
[LLVMdev] Variable-length Phi-node
...asic block!"); assert(getType() == V->getType() && "All operands to PHI node must be the same type as the PHI node!"); if (NumOperands == ReservedSpace) growOperands(); // Get more space! // Initialize some new operands. ++NumOperands; setIncomingValue(NumOperands - 1, V); setIncomingBlock(NumOperands - 1, BB); } -Filip On Nov 9, 2013, at 9:56 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote: > On 9 Nov 2013, at 16:35, William Moses <moses.williamsteven at gmail.com> wrote: > >> Is it possible to creat...
2013 Nov 05
0
[LLVMdev] Identifying the instructions that uses a pointer used as a function argument
...e.insert(I); else if (PHINode *Phi = dyn_cast<PHINode>(*UI)) for (unsigned Idx = 0; Idx < Phi->getNumIncomingValues(); ++Idx) if (Phi->getIncomingValue(Idx) == V && DT_->dominates(BB, Phi->getIncomingBlock(Idx))) Phi->setIncomingValue(Idx, R); } for (auto& I : Replace) I->replaceUsesOfWith(V, R); } If this doesn't help, you could try showing us the actual IR you're running the transformation on. Just FMI, is it okay to post code on this mailing list? H. On Tue, Nov 5, 2013 at 8:59 AM, Arnamoy Bha...
2013 Nov 05
2
[LLVMdev] Identifying the instructions that uses a pointer used as a function argument
Hello all; So here is my goal: *** If there is a Call instruction to myFunction(int * val), I need to identify all the instructions that uses val in the IR and replace the uses with a newly created pointer. I will also be changing the argument of myFunction to the new pointer. int * val = malloc/calloc; ... myFunction(val); .... *val = 45; becomes== int * val = malloc/calloc; int * val1 =
2013 Nov 05
1
[LLVMdev] Identifying the instructions that uses a pointer used as a function argument
...lse if (PHINode *Phi = dyn_cast<PHINode>(*UI)) > for (unsigned Idx = 0; Idx < Phi->getNumIncomingValues(); ++Idx) > if (Phi->getIncomingValue(Idx) == V && > DT_->dominates(BB, Phi->getIncomingBlock(Idx))) > Phi->setIncomingValue(Idx, R); > } > > for (auto& I : Replace) > I->replaceUsesOfWith(V, R); > } > > If this doesn't help, you could try showing us the actual IR you're running > the transformation on. > > Just FMI, is it okay to post code on this mailing list? &gt...
2013 Nov 09
0
[LLVMdev] Variable-length Phi-node
On 9 Nov 2013, at 16:35, William Moses <moses.williamsteven at gmail.com> wrote: > Is it possible to create something which has the same effect of a variable-length phi node in the C++ api. Specifically, create a phi-node where the number of incoming values is not known at the time of its creation. The PHI node preallocates its storage, so no. > If there is no such way of creating a
2013 Nov 09
2
[LLVMdev] Variable-length Phi-node
All, Is it possible to create something which has the same effect of a variable-length phi node in the C++ api. Specifically, create a phi-node where the number of incoming values is not known at the time of its creation. If there is no such way of creating a phinode like that, would it be possible to create a dummy instruction and perform a replaceAllUsesWith? If so, what should the dummy
2006 May 17
0
[LLVMdev] Obfuscation with LLVM
...{ if( phiNode->getIncomingValue( idx ) == inst ) { LoadInst* loadedValue = new LoadInst( valuePtr, "value_of_reduced_var", phiNode->getIncomingBlock( idx )->getTerminator() ); phiNode->setIncomingValue( idx, loadedValue ); } } } else { user->replaceUsesOfWith( inst, new LoadInst( valuePtr, "value_of_reduced_var", user ) ); } } } } bool MakeDispatcherPass::IsUsedOutsidePar...