Displaying 2 results from an estimated 2 matches for "removeextraedges".
2013 Apr 10
3
[LLVMdev] If Conversion and predicated returns
...LR<imp-use>, %RM<imp-use>
While the resulting code is not incorrect, the CFG is not quite right, and this pessimizes later transformations. Specifically, the issue is that BB#1 still lists BB#3 as a successor, but this is not true. Looking at IfConversion.cpp, I see this function:
/// RemoveExtraEdges - Remove true / false edges if either / both are no longer
/// successors.
void IfConverter::RemoveExtraEdges(BBInfo &BBI) {
MachineBasicBlock *TBB = NULL, *FBB = NULL;
SmallVector<MachineOperand, 4> Cond;
if (!TII->AnalyzeBranch(*BBI.BB, TBB, FBB, Cond))
BBI.BB->CorrectEx...
2013 Apr 10
0
[LLVMdev] If Conversion and predicated returns
...Finkel wrote:
>
> Should AnalyzeBranch be enhanced to somehow indicate conditional returns?
I don't think that returns can ever be analyzable (since LLVM's CFG does
not have a designated exit block).
> Alternatively, the diamond conversion routine contains this:
>
> // RemoveExtraEdges won't work if the block has an unanalyzable branch,
> // which can happen here if TailBB is unanalyzable and is merged, so
> // explicitly remove BBI1 and BBI2 as successors.
> BBI.BB->removeSuccessor(BBI1->BB);
> BBI.BB->removeSuccessor(BBI2->BB);
> Re...