My Project
|
Discover and eliminate split conditions. More...
#include <blockaction.hh>
Public Member Functions | |
ConditionalJoin (Funcdata &fd) | |
Constructor. | |
bool | match (BlockBasic *b1, BlockBasic *b2) |
Test blocks for the merge condition. More... | |
void | execute (void) |
Execute the merge. More... | |
void | clear (void) |
Clear for a new test. | |
Discover and eliminate split conditions.
A split condition is when a conditional expression, resulting in a CBRANCH, is duplicated across two blocks that would otherwise merge. Instead of a single conditional in a merged block, there are two copies of the conditional, two splitting blocks and no direct merge.
void ConditionalJoin::execute | ( | void | ) |
Execute the merge.
All the conditions have been met. Go ahead and do the join.
bool ConditionalJoin::match | ( | BlockBasic * | b1, |
BlockBasic * | b2 | ||
) |
Test blocks for the merge condition.
Given a pair of conditional blocks, make sure that they match the split conditions necessary for merging and set up to do the merge. If the conditions are not met, this method cleans up so that additional calls can be made.
b1 | is the BlockBasic exhibiting one side of the split |
b2 | is the BlockBasic on the other side of the split |