[LLVMdev] Problem in CodeExtractor::severSplitPHINodes()
Jack Tzu-Han Hung
thhung at cs.princeton.edu
Wed Nov 19 09:41:27 CST 2008
I found a problem in CodeExtractor::severSplitPHINodes()
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
In splitBlock, it checks if the NewBB has only one successor. I'm not sure
why this is required, but it will fail on cases where NewBB has multiple
successors, which are pretty common. For example, a switch or a conditional
branch in NewBB can break this check.
Could anyone tell me how to fix this please?
Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LLVMdev