Displaying 20 results from an estimated 198 matches for "phinodes".
Did you mean:
phinode
2014 Sep 20
6
[LLVMdev] PHINode containing itself causes segfault when compiling Blender OpenCL kernel with R600 backend
...something with its
members... for example when trying to erase it again.
I have no real background in LLVM or GCC, so the concept of PHINode itself
was a real discovery for me :) and PHINode containing itself does look
even more strange... I've tried to understand the semantics of such
PHINodes from reading the code and got a suspicion that the rest of LLVM
code just ignores PHINodes equal to their parent... So I've tried to fix
the bug by making handleLoopCondition() skip IncomingValues equal to the
Phi itself, but the bug didn't go away! Surprisingly, PHINode may not just...
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
2004 Sep 03
4
[LLVMdev] diffs for vc7.1
Hi all,
Here the first bunch of patch for compiling part of LLVM under win32
with MSVC 7.1:
* Trivial addings (I hope!):
- #include <string> at top of:
llvm\include\llvm\ExecutionEngine\ExecutionEngine.h(78) : error
C2039: 'string' : is not a member of '_STL'
- #include <algorithm> at top of:
llvm\lib\CodeGen\LiveIntervalAnalysis.cpp(639) : error C2039:
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
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 problem is
a showstopper for more than a dozen
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's fussy
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
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
2011 Jan 25
2
[LLVMdev] Update PHINode after extracting code
Hi all,
I have problem with ExtractCodeRegion (CodeExtractor.cpp).
My original program is as follows.
bb:
...
%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 ]
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
2011 Feb 05
0
[LLVMdev] Segmentation fault on using get parent of a PHINode
Hi Surinder, I don't see anything obviously wrong with your code. I suggest
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)
> {
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
2011 Feb 01
0
[LLVMdev] Loop simplification
...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 wh...
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:
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 disabled linker and assembler optimizations in
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 wh...
2016 Mar 19
2
Should we enable -Wrange-loop-analysis? (Was: [llvm] r261524 - Fix some abuse of auto...)
...if (!isa<PHINode>(V) && !isa<Constant>(V) && !isa<Argument>(V))
> return false;
>
> - for (const auto &V : Defs)
> + for (Value *V : Defs)
> if (const PHINode *P = dyn_cast<PHINode>(V))
> if (!PromotablePHINodes.count(P))
> return false;
> @@ -214,7 +214,7 @@ class PPCBoolRetToInt : public FunctionP
> ++NumBoolCallPromotion;
> ++NumBoolToIntPromotion;
>
> - for (const auto &V : Defs)
> + for (Value *V : Defs)
> if (!BoolToIntMap.count(V))
&g...
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 remove...
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
Hi Tobias,
If the PHI node at exit block of region R has multiple inputs from the R,
I split the exit block into 2.
The first block contains all PHI nodes whose input are all from the region.
The second is the new exit node.
All branches (outside R) to the old exit now point the new exit.
All regions whose exit is the old exit are also updated with the new exit
node.
It works like a charm.
2005 Jul 28
2
[LLVMdev] help with pointer-to-array conversion
I now understand that IndVarSimplify.cpp is capable of reproducing array
references when the pointer initialization from the array address is found
inside the immediately enclosing loop, such that in the following code:
int A[20000], B[100], Z;
int main()
{
int i, j, *a, *b;
for ( a = &A[0], i = 0; i != 200; i++ )
for ( b = &B[0], j = 0; j != 100; j++