Modifier and Type | Field and Description |
---|---|
private BasicBlock |
bottom
The bottom of the diamond
|
private BasicBlock |
notTaken
The "not-taken" branch of the diamond (might be null)
|
private BasicBlock |
taken
The "taken" branch of the diamond (might be null)
|
private BasicBlock |
top
The top of the diamond
|
Constructor and Description |
---|
Diamond(BasicBlock top,
BasicBlock taken,
BasicBlock notTaken,
BasicBlock bottom) |
Modifier and Type | Method and Description |
---|---|
(package private) static Diamond |
buildDiamond(BasicBlock bb)
See if bb is the root of a diamond.
|
private static Diamond |
fourElementDiamond(BasicBlock top,
BasicBlock left,
BasicBlock right,
BasicBlock bottom) |
(package private) BasicBlock |
getBottom() |
(package private) BasicBlock |
getNotTaken() |
(package private) BasicBlock |
getTaken() |
(package private) BasicBlock |
getTop() |
private static Diamond |
threeElementDiamond(BasicBlock top,
BasicBlock side,
BasicBlock bottom) |
String |
toString() |
private final BasicBlock top
private final BasicBlock bottom
private final BasicBlock taken
private final BasicBlock notTaken
Diamond(BasicBlock top, BasicBlock taken, BasicBlock notTaken, BasicBlock bottom)
BasicBlock getTop()
BasicBlock getBottom()
BasicBlock getTaken()
null
)BasicBlock getNotTaken()
null
)static Diamond buildDiamond(BasicBlock bb)
bb
- possible root of a diamondnull
if not
applicable.private static Diamond fourElementDiamond(BasicBlock top, BasicBlock left, BasicBlock right, BasicBlock bottom)
private static Diamond threeElementDiamond(BasicBlock top, BasicBlock side, BasicBlock bottom)