search for: phinod

Displaying 20 results from an estimated 198 matches for "phinod".

Did you mean: phinode
2014 Sep 20
6
[LLVMdev] PHINode containing itself causes segfault when compiling Blender OpenCL kernel with R600 backend
...hey were using . instead of -> in 1 place), and after fixing this bug I've got the kernel to compile... ...But after that, LLVM started to crash during translation of IR into shader code with R600 backend. I've done some investigation and figured out that the crash is caused by a PHINode containing itself. SIAnnotateControlFlow::handleLoopCondition() can't handle such situation - it recurses into itself, calls Phi->eraseFromParent() inside the inner execution, returns into outer one, gets zeroed out object and crashes when trying to do something with its members......
2004 Sep 03
2
[LLVMdev] diffs for vc7.1
On Fri, Sep 03, 2004 at 03:01:01PM -0500, Anshu Dasgupta wrote: > ><snip> > >for (BasicBlock::iterator I = Dest->begin(); PHINode *PN = > >dyn_cast<PHINode>(I); ++I) > > visitPHINode(*PN); > ><snip> > > > >build_vc71\lib\Transforms\Scalar\SCCP.cpp(202) : error C2275: > >'llvm::PHINode' : illegal use of this type as an expression > > > >but I think is a...
2004 Sep 03
4
[LLVMdev] diffs for vc7.1
...foA[RegInfo->getNumRegs()]; C99 array llvm/lib/Target/TargetSchedInfo.cpp, # int classPairGaps[numSchedClasses][numSchedClasses]; C99 array The next bigger problem is that the compiler complains about this kind of construct... <snip> for (BasicBlock::iterator I = Dest->begin(); PHINode *PN = dyn_cast<PHINode>(I); ++I) visitPHINode(*PN); <snip> build_vc71\lib\Transforms\Scalar\SCCP.cpp(202) : error C2275: 'llvm::PHINode' : illegal use of this type as an expression in short, is the assignment in the PHINode *PN = dyn_cast<PHINode>(I) ,as if I br...
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...
2004 Sep 03
0
[LLVMdev] diffs for vc7.1
I can confirm that both are compiled properly: A) PHINode *PN; for (BasicBlock::iterator I = H->begin(); PN = dyn_cast<PHINode>(I); I++) .... B) for (BasicBlock::iterator I = H->begin; isa<PHINode>(I); I++) { PHINode *PN = cast<PHINode(I); .... } I'll make a patch for whatever solution do you prefer (this probl...
2004 Sep 03
0
[LLVMdev] diffs for vc7.1
Hi Paolo, > <snip> > for (BasicBlock::iterator I = Dest->begin(); PHINode *PN = > dyn_cast<PHINode>(I); ++I) > visitPHINode(*PN); > <snip> > > build_vc71\lib\Transforms\Scalar\SCCP.cpp(202) : error C2275: > 'llvm::PHINode' : illegal use of this type as an expression > > but I think is a NO-NO, so suggestions? Since it...
2004 Sep 07
2
[LLVMdev] diffs for vc7.1
On Fri, 3 Sep 2004, Paolo Invernizzi wrote: > I can confirm that both are compiled properly: Ok. > for (BasicBlock::iterator I = H->begin; isa<PHINode>(I); I++) { > PHINode *PN = cast<PHINode(I); > .... > } > > I'll make a patch for whatever solution do you prefer (this problem is > a showstopper for more than a dozen files...) I prefer this option (it reduces the scope of the PN variable). -Chris > &g...
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
I guess I didn't have a clear question. Suppose we have BB1 and BB2 both point to BB3. BB1 has variable x. BB2 also as variable x. BB3 will have PHINode for x with 2 value from BB1 and BB2. BB1 BB2 \ / BB3 Now if BB1 and BB2 is extracted into a function (using ExtractCodeRegion), they will be replaced by a basic block called codeRepl (which has a call to the extracted function). codeRepl | BB3 The problem is that the PHI...
2011 Jan 25
2
[LLVMdev] Update PHINode after extracting code
...tmp.15 = load %struct.MYSQL_ROWS** %3, align 4 ... bb1: ... %tmp.1 = load %struct.MYSQL_ROWS** %6, align 4 ... bb4: ; preds = %bb1, %bb, %entry %tmp.0 = phi %struct.MYSQL_ROWS* [ null, %entry ], [ %tmp.15, %bb ], [ %tmp.1, %bb1 ] %tmp.0 is the PHINode whose value is from entry, bb and bb1. After extracting bb and bb1 into new function, the program becomes codeRepl: ; preds = %entry call void @mysql_data_seek_bb(%struct.MYSQL_DATA* %1, i64 %row, %struct.MYSQL_ROWS** %tmp.15.loc, %struct.MYSQL_ROWS** %tm...
2011 Jan 31
2
[LLVMdev] Segmentation fault on using get parent of a PHINode
I am getting a segmentation fault as soon as I touch the Basic block *b value defined as :  std::string getPHIAssigns(const PHINode *PH)  { const BasicBlock *b = PH->getParent();    errs() << b->size(); where as getPHIAssigns is being called from               for (BasicBlock::iterator ins=b->begin(), e3=b->end(); ins!=e3; ++ins, ++l) // get instructions                 { if (const PHINode *PH = dyn_c...
2011 Feb 05
0
[LLVMdev] Segmentation fault on using get parent of a PHINode
...est that (1) you build LLVM with assertions enabled, (2) you run the verifier on your bitcode, and (3) run your program under valgrind. Ciao, Duncan. > I am getting a segmentation fault as soon as I touch the Basic block > *b value defined as : > > std::string getPHIAssigns(const PHINode *PH) > { const BasicBlock *b = PH->getParent(); > errs()<< b->size(); > > > where as getPHIAssigns is being called from > > for (BasicBlock::iterator ins=b->begin(), e3=b->end(); > ins!=e3; ++ins, ++l) // get instructions >...
2011 Jan 27
2
[LLVMdev] Update PHINode after extracting code
On 01/26/2011 07:50 PM, Vu Le wrote: > I guess I didn't have a clear question. > > Suppose we have BB1 and BB2 both point to BB3. > BB1 has variable x. BB2 also as variable x. > BB3 will have PHINode for x with 2 value from BB1 and BB2. > BB1 BB2 > \ / > BB3 > > Now if BB1 and BB2 is extracted into a function > (using ExtractCodeRegion), they will be replaced by > a basic block called codeRepl (which has a call to the extracted > function). > codeRe...
2011 Feb 01
0
[LLVMdev] Loop simplification
...ed->getTerminator()) return false; // Delete the terminator in the predecessor block pred->getTerminator()->eraseFromParent(); // Update predecessor PHIs for (BasicBlock::iterator it = pred->begin(); it != pred->end(); ++it) { PHINode *phi = dyn_cast<PHINode>(it); UT_ASSERT(phi); // Adjust the PHI to have the correct incoming block set for (pred_iterator pi = pred_begin(succ); pi != pred_end(succ); ++pi) { // We're a different predecessor than the pre...
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: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190318/51ad402c/attachment.html>
2006 Aug 05
1
[LLVMdev] help with phinode
I'm running into an error message about PHINode which I don't understand too well. Hopefully I can explain this clearly. At a high level, I'm just trying to add a fprintf() statement at the end of functions to show me a timestamp. However, I also add an if/then such that I can turn the printing on/off. When using llvm-gcc, I've...
2011 Feb 01
3
[LLVMdev] Loop simplification
...a single loop. >> >> llvm::MergeBlockIntoPredecessor does not do what I want since it >> requires that the the block have a unique predecessor. > > I didn't notice anything that will do what you want out-of-box, but it should not be hard to write. llvm::FoldSingleEntryPHINodes is an example of phi node replacement. But in this case, you'll need to do one in-place operand replacement for each successor phi use and call PhiNode::addIncoming for the rest. Note that multiple successor phis may use the same predecessor phi, so you should be careful of mutating the phis...
2016 Mar 19
2
Should we enable -Wrange-loop-analysis? (Was: [llvm] r261524 - Fix some abuse of auto...)
...= > --- llvm/trunk/lib/Target/PowerPC/PPCBoolRetToInt.cpp (original) > +++ llvm/trunk/lib/Target/PowerPC/PPCBoolRetToInt.cpp Mon Feb 22 07:11:58 2016 > @@ -119,7 +119,7 @@ class PPCBoolRetToInt : public FunctionP > Promotable.insert(P); > > SmallVector<const PHINode *, 8> ToRemove; > - for (const auto &P : Promotable) { > + for (const PHINode *P : Promotable) { > // Condition 2 and 3 > auto IsValidUser = [] (const Value *V) -> bool { > return isa<ReturnInst>(V) || isa<CallInst>(V) || isa<PHI...
2008 Sep 27
2
[LLVMdev] SwitchInstr::removeCase() doesn't remove PHINodes' predecessors
Hi, I've been writing an optimization pass (described on the ML previously). Sometimes this pass removes some case entries from switch instructions, which cause an abort because removeCase() doesn't fix the PHINodes predecessors when needed. e.g.: define i32 @foo() nounwind { ifthen: %call = call i32 @bar() switch i32 %call, label %myphi [ i32 0, label %ifelse i32 1, label %ifelse ] ifelse: br label %myphi myphi: %ret.0 = phi i32 [ 0, %ifthen ], [ 1, %ifelse ] ret i32 %ret.0 } Suppose I remo...
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
...Tobias Grosser <grosser at fim.uni-passau.de>wrote: > On 01/26/2011 07:50 PM, Vu Le wrote: > >> I guess I didn't have a clear question. >> >> Suppose we have BB1 and BB2 both point to BB3. >> BB1 has variable x. BB2 also as variable x. >> BB3 will have PHINode for x with 2 value from BB1 and BB2. >> BB1 BB2 >> \ / >> BB3 >> >> Now if BB1 and BB2 is extracted into a function >> (using ExtractCodeRegion), they will be replaced by >> a basic block called codeRepl (which has a call to the extracted &...
2005 Jul 28
2
[LLVMdev] help with pointer-to-array conversion
...======== RCS file: /var/cvs/llvm/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp,v retrieving revision 1.78 diff -r1.78 IndVarSimplify.cpp 310c310 < runOnLoop(*I); --- > runOnLoop(LI, *I); 322,323c322,323 < void runOnLoop(Loop *L); < void EliminatePointerRecurrence(PHINode *PN, BasicBlock *Preheader, --- > void runOnLoop(LoopInfo *LI, Loop *L); > void EliminatePointerRecurrence(LoopInfo *LI, Loop *L, PHINode *PN, BasicBlock *Preheader, 361c361 < void IndVarSimplify::EliminatePointerRecurrence(PHINode *PN, --- > void IndVarSimplify::EliminatePoin...