Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Can NewBB have more than one successors in DT.splitBlock method?"
2008 Nov 20
1
[LLVMdev] Problem in CodeExtractor::severSplitPHINodes()
Hi Devang,
Thanks for your reply.
But if you look at the comment of BasicBlock::splitBasicBlock(), it says
that "...an unconditional branch is added to the new BB, and the rest of the
instructions in the BB are moved to the newBB, including the old
terminator."
So, the terminator of the newBB is exactly the same as the terminator of the
oldBB. IF the oldBB has multiple successors,
2008 Nov 20
0
[LLVMdev] Problem in CodeExtractor::severSplitPHINodes()
On Nov 19, 2008, at 7:41 AM, Jack Tzu-Han Hung wrote:
> Hi,
>
> I found a problem in CodeExtractor::severSplitPHINodes()
> <CodeExtractor.cpp>.
>
> The algorithm first separates the header block into two, one
> containing only PHI nodes and the other containing the remaining non-
> PHI nodes. The variable NewBB holds the pointer to the latter half
> block.
2008 Nov 19
2
[LLVMdev] Problem in CodeExtractor::severSplitPHINodes()
Hi,
I found a problem in CodeExtractor::severSplitPHINodes()
<CodeExtractor.cpp>.
The algorithm first separates the header block into two, one containing only
PHI nodes and the other containing the remaining non-PHI nodes. The variable
NewBB holds the pointer to the latter half block. Later, it tries to update
DT information.
if (DT)
DT->splitBlock(NewBB);
In splitBlock, it checks
2008 Feb 01
1
[LLVMdev] Code Extractor Issue
I'm having an issue with the CodeExtractor. When I try to extract the lone basic block from the following function, I get an assertion error.
define i32 @test(i32 %x) {
%tmp = call i32 @test3( i32 %x ) ; <i32> [#uses=1]
ret i32 %tmp
}
The assertion error is:
lli: Dominators.cpp:71: void llvm::DominatorTree::splitBlock(llvm::BasicBlock*): Assertion
2013 Jul 31
1
[LLVMdev] Problem to remove successors
Hi All,
I need to remove successors from every basic block to insert new ones
I tried this code, but it doesn't work
void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) {
assert(SuccNum < TI->getNumSuccessors() &&
"Trying to remove a nonexistant successor!");
// If our old successor block contains any PHI nodes, remove the entry
in the
//
2011 Jan 24
0
[LLVMdev] CodeExtractor.cpp potential bug?
I forgot to cc llvmdev.
Here is my original message.
I'm a bit confused on DominatorTreeBase::Split() (
http://llvm.org/docs/doxygen/html/Dominators_8h_source.html#l00229)
If a basic block A splits into A->B, when I call Split(), which is NewBB? A
or B?
The semantics shows that NewBB is the newly split basic block B.
But the assertion at line 229 doesn't seem right.
00229
2013 Mar 02
2
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
Hi folks,
Hope this is not a silly question. But it bothers me when I am thinking
about it.
My question is:
1. In the implementation of serverSplitPHINodes(), why it only checks the
first PHI node for possible
multiple inputs from outside the region to extract. There could be more
than one PHI nodes in the header
block, and the code only checks the first one. I don't quite get it.
2014 Feb 14
2
[LLVMdev] DominatorTree not updated properly after calling the llvm::SplitBlock.
Hi Fellows,
I am writing a pass that requires the DominatorTree pass. In the
runOnFunction of my own pass, I call llvm::SplitBlock to split a block
(%for.end) at it's first insert point. Then, when I dump my dominator tree
immediately after, I can see the newly split %for.end.split, but its
DFSNumIn and DFSNumOut are not properly updated in llvm::SplitBlock (i.e.,
still the initialized
2013 Mar 03
0
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
> From: Wei Dang [mailto:jacdang at gmail.com]
> Subject: Re: [LLVMdev] Question about method CodeExtractor::severSplitPHINodes
> Please excuse me if I'm not supposed to reply to all.
You should do reply-all, to make sure the list sees all of the thread.
> Are you saying all PHI nodes are required to include all its predecessor blocks
> no matter they have input or not?
2013 Mar 03
2
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
Thanks for reply Chuck.
Please excuse me if I'm not supposed to reply to all.
Are you saying all PHI nodes are required to include all its predecessor
blocks no matter they have input or not?
What about successor blocks? Are they optional if they don't provide inputs?
BTW, where should I look at to verify this, the mem2reg.cpp &
PromoteMemToReg.cpp?
Thanks a lot.
On Sat, Mar 2, 2013
2014 Feb 14
2
[LLVMdev] DominatorTree not updated properly after calling the llvm::SplitBlock.
Hi Andrew,
Thanks a lot. But the function "DT->dominate(A,B)" decides the
dominance relationship through comparing the DFS numbers, right? At least,
in my example, when I check whether the newly split node (i.e., %
*for.end.split*) DOMINATES the original node (I.e., %for.end), the answer
is true, which is obviously wrong.
Paul
On Fri, Feb 14, 2014 at 1:59 AM, Andrew Trick
2010 Dec 31
3
[LLVMdev] CodeExtractor.cpp potential bug?
There might be a misuse of DominatorTree::splitBasicBlock in
CodeExtractor.cpp, line 145.
Header is splited into two (OldPred->NewBB).
Line 145 updates the dominator tree by calling DT->splitBasicBlock(NewBB).
I think it should be DT->splitBasicBlock(OldPred).
When I tried to extract a code region whose header has 2 successors, my pass
crashed.
It was because header (or OldPred) is the
2011 Jan 03
0
[LLVMdev] CodeExtractor.cpp potential bug?
On Dec 31, 2010, at 11:20 AM, Vu Le wrote:
> There might be a misuse of DominatorTree::splitBasicBlock in CodeExtractor.cpp, line 145.
> Header is splited into two (OldPred->NewBB).
>
> Line 145 updates the dominator tree by calling DT->splitBasicBlock(NewBB).
> I think it should be DT->splitBasicBlock(OldPred).
>
> When I tried to extract a code region whose
2011 Aug 02
0
[LLVMdev] Multiple successors, single dynamic successor
I'm assuming that you're talking about a situation where this can't be
determined statically in the existing LLVM IR, but you know it's true
and want to put it in (e.g. you're the one generating LLVM IR). If
that's not the case, then see if JumpThreading will do it for you.
I'm not familiar with a way to express exactly what you want to say,
but are you opposed to just
2011 Aug 02
3
[LLVMdev] Multiple successors, single dynamic successor
Nella citazione martedì 2 agosto 2011 20:02:08, Michael Ilseman ha
scritto:
> I'm assuming that you're talking about a situation where this can't be
> determined statically in the existing LLVM IR, but you know it's true
> and want to put it in (e.g. you're the one generating LLVM IR).
Correct. Or, more precisely, I'd like to investigate macro compression,
i.e.
2011 Aug 02
2
[LLVMdev] Multiple successors, single dynamic successor
Suppose I have a bb with N predecessors and N successors. What is, in
your opinion, the best way to express that the bb has (dynamically) only
one successor (i.e. if coming from the i-th predecessor we will always
jump to the i-th successor)?
b.r.,
--
Carlo Alberto Ferraris <cafxx at strayorange.com
<mailto:cafxx at strayorange.com>>
website/blog
2004 Dec 07
1
[LLVMdev] Question adding dummy basic blocks
Hi,
I got a problem when I am trying to add a dummy basic block.
Let say there are two blocks, A and B.
A----->B
I am trying to generate new BB called C which is located between A and B, but not break the edge of AB. The graph is like the following
A---->B
\ /
\ /
C
There is new BB 'C' with edges AC and CB.
It is kind of like what breakcriticaledge pass does.
2017 Jun 13
2
RFC: Dynamic dominators
Hi Tobias,
1) Daniel and Chandler have for a long time been talking about computing
> dominance and post-dominance in one shot to reduce the cost of
> post-dominance and make it (freely) available everywhere. Is this
> covered by your current (or planned) work?
I'm not sure what you exactly mean by one shot; I'll ask around tomorrow.
I wanted to play a little bit with your
2010 Jun 19
1
[LLVMdev] Successors v/s Children
Hi,
Can anyone tell me how to find successors and children of a basic-block ?
What is the difference between successors and Children?
Regards,
Chayan
2011 Mar 12
0
[LLVMdev] problems when the llvm::ExtractCodeRegion updates the Phi nodes in successors ... is there a method to eliminate phi nodes ?
Hi,
I use the llvm::ExtractCodeRegion to extract each loop into a separate function,
but I have a problem when I run this on the SPEC CPU 2006 on the 401.bzip2
benchmark. First I use clang -O3 to generate optimized llvm code and then I
extract some loops from the module built from blocksort.c source file.
The problem is that the PHI nodes contained in the successors of the codeRepl