diff options
| author | Ficture Seven <FICTURE7@gmail.com> | 2020-08-05 02:52:33 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-05 08:52:33 +1000 |
| commit | ee22517d92c48eab9643b6fc8ce4dac2b7e95f57 (patch) | |
| tree | 5df92a3e83f9daafba44ad11862683af8185ffaf /ARMeilleure/Diagnostics | |
| parent | a33dc2f4919f7fdc8ea9db41c4c70c38cedfd3df (diff) | |
Improve branch operations (#1442)
* Add Compare instruction
* Add BranchIf instruction
* Use test when BranchIf & Compare against 0
* Propagate Compare into BranchIfTrue/False use
- Propagate Compare operations into their BranchIfTrue/False use and
turn these into a BranchIf.
- Clean up Comparison enum.
* Replace BranchIfTrue/False with BranchIf
* Use BranchIf in EmitPtPointerLoad
- Using BranchIf early instead of BranchIfTrue/False improves LCQ and
reduces the amount of work needed by the Optimizer.
EmitPtPointerLoader was a/the big producer of BranchIfTrue/False.
- Fix asserts firing when assembling BitwiseAnd because of type
mismatch in EmitStoreExclusive. This is harmless and should not
cause any diffs.
* Increment PPTC interval version
* Improve IRDumper for BranchIf & Compare
* Use BranchIf in EmitNativeCall
* Clean up
* Do not emit test when immediately preceded by and
Diffstat (limited to 'ARMeilleure/Diagnostics')
| -rw-r--r-- | ARMeilleure/Diagnostics/IRDumper.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/ARMeilleure/Diagnostics/IRDumper.cs b/ARMeilleure/Diagnostics/IRDumper.cs index 7ff76077..0f0d72c1 100644 --- a/ARMeilleure/Diagnostics/IRDumper.cs +++ b/ARMeilleure/Diagnostics/IRDumper.cs @@ -198,6 +198,8 @@ namespace ARMeilleure.Diagnostics break; case Operation operation: + bool comparison = false; + _builder.Append(operation.Instruction); if (operation.Instruction == Instruction.Extended) @@ -206,17 +208,32 @@ namespace ARMeilleure.Diagnostics _builder.Append('.').Append(intrinOp.Intrinsic); } + else if (operation.Instruction == Instruction.BranchIf || + operation.Instruction == Instruction.Compare) + { + comparison = true; + } _builder.Append(' '); for (int index = 0; index < operation.SourcesCount; index++) { - DumpOperand(operation.GetSource(index)); + Operand source = operation.GetSource(index); if (index < operation.SourcesCount - 1) { + DumpOperand(source); + _builder.Append(", "); } + else if (comparison) + { + _builder.Append((Comparison)source.AsInt32()); + } + else + { + DumpOperand(source); + } } break; } |
