Relax block ordering constraints (#1535)
* Relax block ordering constraints Before `block.Next` had to follow `block.ListNext`, now it does not. Instead `CodeGenerator` will now emit the necessary jump instructions to ensure control flow. This makes control flow and block order modifications easier. It also eliminates some simple cases of redundant branches. * Set PPTC version
This commit is contained in:
parent
3d055da5fc
commit
36ec1bc6c0
11 changed files with 164 additions and 174 deletions
|
@ -57,17 +57,20 @@ namespace ARMeilleure.Diagnostics
|
|||
{
|
||||
DumpBlockName(block);
|
||||
|
||||
if (block.Next != null)
|
||||
if (block.SuccessorCount > 0)
|
||||
{
|
||||
_builder.Append(" (next ");
|
||||
DumpBlockName(block.Next);
|
||||
_builder.Append(')');
|
||||
}
|
||||
_builder.Append(" (");
|
||||
|
||||
for (int i = 0; i < block.SuccessorCount; i++)
|
||||
{
|
||||
DumpBlockName(block.GetSuccessor(i));
|
||||
|
||||
if (i < block.SuccessorCount - 1)
|
||||
{
|
||||
_builder.Append(", ");
|
||||
}
|
||||
}
|
||||
|
||||
if (block.Branch != null)
|
||||
{
|
||||
_builder.Append(" (branch ");
|
||||
DumpBlockName(block.Branch);
|
||||
_builder.Append(')');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue