diff options
| author | FICTURE7 <FICTURE7@gmail.com> | 2020-09-12 19:32:53 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-12 12:32:53 -0300 |
| commit | 36ec1bc6c023811235d9f5fb664feff09bc7b4f7 (patch) | |
| tree | 98d74ad92cdce8294bb5116bf7cd06acb55ff9da /ARMeilleure/Diagnostics | |
| parent | 3d055da5fc77f462e9c7099e08570213c0220cd4 (diff) | |
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
Diffstat (limited to 'ARMeilleure/Diagnostics')
| -rw-r--r-- | ARMeilleure/Diagnostics/IRDumper.cs | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/ARMeilleure/Diagnostics/IRDumper.cs b/ARMeilleure/Diagnostics/IRDumper.cs index 0f0d72c1..90eb2300 100644 --- a/ARMeilleure/Diagnostics/IRDumper.cs +++ b/ARMeilleure/Diagnostics/IRDumper.cs @@ -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(')'); } |
