search for: getincomingblock

Displaying 16 results from an estimated 16 matches for "getincomingblock".

2011 Apr 21
2
[LLVMdev] Compilation error with LLVM 2.9
Hi all, I wrote code that compiled with llvm 2.8, but now I'm using llvm 2.9 and it doesn't compile anymore: My code looks like this: User *U; ... if (PHINode * phi = dyn_cast<PHINode>(U)) { ... BasicBlock * Pred = phi->getIncomingBlock(I); ... } And when I compile it with clang: Live.cc:130:27: error: member access into incomplete type 'llvm::PHINode' BasicBlock * Pred = phi->getIncomingBlock(I); ^ In file included from Live.cc:3:...
2013 Mar 02
2
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
...ned i = 0, e = PN->getNumIncomingValues <http://llvm.org/docs/doxygen/html/classllvm_1_1PHINode.html#aa45f6c0433576e3858a6209a43750ad4>(); i != e; ++i)00199 if (Blocks.count <http://llvm.org/docs/doxygen/html/classllvm_1_1SetVector.html#a0fd2953d62c1b1cabb87e420be5177c4>(PN->getIncomingBlock <http://llvm.org/docs/doxygen/html/classllvm_1_1PHINode.html#a4c25b6c00c4867281779c81ab64d2081>(i)))00200 ++NumPredsFromRegion;00201 else00202 ++NumPredsOutsideRegion;00203 00204 // If there is one (or fewer) predecessor from outside the region, we don't00205 // need...
2011 Apr 21
0
[LLVMdev] Compilation error with LLVM 2.9
...wrote code that compiled with llvm 2.8, but now I'm using llvm > 2.9 and it doesn't compile anymore: > > My code looks like this: > > User *U; > ... > if (PHINode * phi = dyn_cast<PHINode>(U)) { > ... > BasicBlock * Pred = phi->getIncomingBlock(I); > ... > } > > And when I compile it with clang: > > > Live.cc:130:27: error: member access into incomplete type 'llvm::PHINode' > BasicBlock * Pred = phi->getIncomingBlock(I); > Looks like something you were inclu...
2019 Mar 18
2
How to get the possible predecessors for a PHINode
Hi all, I have encountered the following instruction: %.0.i = phi i8* [ %9, %8 ], [ %11, %10 ] How can I get the %8 and %10? I'm using http://llvm.org/doxygen/classllvm_1_1PHINode.html as a reference but I cannot understand how to do that. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL:
2012 May 10
1
[LLVMdev] How to get the label field of PHI instruction?
Typical PHI instruction in LLVM goes like this: %P = phi i32* [%A, %BB1], [%B, %BB2] When I try to access all the source operands, only %A and %B are included. I checked the methods in instruction.h, but I didn't find any methods obtaining the label fields i.e. %BB1, %BB2. I notice that each label of a basic block is related with a value which can be referenced in 'br'
2017 May 01
4
RFC: Stop using redundant PHI node entries for multi-edge predecessors
Hi, On Mon, May 1, 2017 at 8:47 AM, Daniel Berlin via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> Today, the IR requires that if you have multiple edges from A to B >> (typically with a switch) any phi nodes in B must have an equal number of >> entries for A, but that all of them must have the same value. > >> This seems rather annoying.... >> 1) It
2013 Nov 05
0
[LLVMdev] Identifying the instructions that uses a pointer used as a function argument
...nates(BB, I->getParent())) Replace.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....
2005 Jul 28
2
[LLVMdev] help with pointer-to-array conversion
...tr) // We want this to become explicit... > { > std::cerr << "Block Before: " << *GEPI->getParent(); > Instruction *mul = BinaryOperator::createMul(saved_trip_count, > LI->getLoopFor( phi->getIncomingBlock(1) ) > ->getCanonicalInductionVariable(), "mul.", GEPI); > Instruction *add = BinaryOperator::createAdd(mul, NewAdd, "add.", GEPI); > GEPI->setOperand( 0, phi->getIncomingValue(0) ); &g...
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
...())) > Replace.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, i...
2005 Jul 29
0
[LLVMdev] patch for pointer-to-array conversion
...390,6 +382,35 @@ // Update the GEP to use the new recurrence we just inserted. GEPI->setOperand(1, NewAdd); + // Nesting is deep... + if ( PHINode *PN = dyn_cast<PHINode>( GEPI->getOperand(0) ) ) + return transformPointerRecurrence( GEPI, PN, PN->getIncomingBlock(0) ); + return std::make_pair(NewAdd,NewPhi); +} + +/// EliminatePointerRecurrence - Check to see if this is a trivial GEP pointer +/// recurrence. If so, change it into an integer recurrence, permitting +/// analysis by the SCEV routines. +void IndVarSimplify::EliminatePointerRecurrence(PHI...
2020 Mar 18
2
valid BasicAA behavior?
Am Di., 17. März 2020 um 16:56 Uhr schrieb Chawla, Pankaj via llvm-dev <llvm-dev at lists.llvm.org>: > All I am expecting from DA is a direction vector containing (*). There seems to be a bug in DI, see Felipe's answer. > I think the main problem is that currently there is no exact way DA can query AliasAnalysis in a ‘conservatively correct’ manner. > > Using UnknownSize
2005 Jul 28
0
[LLVMdev] help with pointer-to-array conversion
...to become explicit... >> { >> std::cerr << "Block Before: " << *GEPI->getParent(); >> Instruction *mul = > BinaryOperator::createMul(saved_trip_count, >> LI->getLoopFor( phi->getIncomingBlock(1) ) >> ->getCanonicalInductionVariable(), "mul.", > GEPI); >> Instruction *add = BinaryOperator::createAdd(mul, > NewAdd, "add.", GEPI); >> GEPI->setOperand( 0, phi->get...
2008 Apr 29
0
[LLVMdev] [PATCH] use-diet for review
On Apr 29, 2008, at 1:27 AM, Gabor Greif wrote: > Hi all, > > I have reported more than enough about the space savings achieved > and the associated costs, here comes the current patch for review. > > Since this one is substantially smaller than the previous one, I did > not cut it in pieces. The front part is about headers and the rest > the .cpp and other files. Hi
2006 May 17
0
[LLVMdev] Obfuscation with LLVM
...unsigned idx = 0; idx < phiNode->getNumIncomingValues(); idx++ ) { 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", us...
2008 Apr 29
5
[LLVMdev] [PATCH] use-diet for review
Hi all, I have reported more than enough about the space savings achieved and the associated costs, here comes the current patch for review. Since this one is substantially smaller than the previous one, I did not cut it in pieces. The front part is about headers and the rest the .cpp and other files. Cheers, Gabor -------------- next part -------------- An embedded and charset-unspecified