Overview
OpBranchConditional instruction is used to decide which basic block will be executed next based on the boolean value (i.e. true or false). This transformation will swap the operands to this instruction as well as invert the logical value that determines the execution.
Implementation
The implementation is similar to #3415. Additionally, we have to introduce an OpLogicalNot to flip the condition operand. We can also flip the weights if they are specified. We should also be careful about position-dependent instructions (e.g. OpLoopMerge, OpSelectionMerge) when inserting OpLogicalNot.