Page MenuHomePhabricator

[LV] Remove redundant basic block split

Authored by gilr on Apr 19 2017, 7:31 AM.



This patch is part of D28975's breakdown.

The process of generating the control flow guarding predicated instructions includes:
(1) a call to SplitBlock(), which splits the basic block after the predicated instruction, producing:

--> HEAD -->  PRED --> TAIL -->

(2) a call to SplitBblockAndInsertIfThen() which splits the basic block before the predicated instruction into a "triangle", resulting
in a redundant basic block with an unconditional branch:

--> HEAD -->  PRED --> MERGE --> TAIL -->

By removing (1) we get:

--> HEAD -->  PRED --> MERGE/TAIL -->

Diff Detail


Event Timeline

gilr created this revision.Apr 19 2017, 7:31 AM
gilr edited the summary of this revision. (Show Details)Apr 19 2017, 7:32 AM
gilr edited the summary of this revision. (Show Details)
mkuper accepted this revision.Apr 24 2017, 10:30 AM

Makes sense. LGTM.

This revision is now accepted and ready to land.Apr 24 2017, 10:30 AM
This revision was automatically updated to reflect the committed changes.