0
0
Fork 0

Fix tail merge from block with conditional jump to multiple returns (#3267)

* Fix tail merge from block with conditional jump to multiple returns

* PPTC version bump
This commit is contained in:
gdkchan 2022-04-09 11:56:50 -03:00 committed by GitHub
parent e44a43c7e1
commit 26a881176e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -59,7 +59,7 @@ namespace ARMeilleure.CodeGen.Optimizations
BasicBlock fromPred = from.Predecessors.Count == 1 ? from.Predecessors[0] : null; BasicBlock fromPred = from.Predecessors.Count == 1 ? from.Predecessors[0] : null;
// If the block is empty, we can try to append to the predecessor and avoid unnecessary jumps. // If the block is empty, we can try to append to the predecessor and avoid unnecessary jumps.
if (from.Operations.Count == 0 && fromPred != null) if (from.Operations.Count == 0 && fromPred != null && fromPred.SuccessorsCount == 1)
{ {
for (int i = 0; i < fromPred.SuccessorsCount; i++) for (int i = 0; i < fromPred.SuccessorsCount; i++)
{ {

View file

@ -191,7 +191,7 @@ namespace ARMeilleure.Signal
// Is the fault address within this tracked region? // Is the fault address within this tracked region?
Operand inRange = context.BitwiseAnd( Operand inRange = context.BitwiseAnd(
context.ICompare(faultAddress, rangeAddress, Comparison.GreaterOrEqualUI), context.ICompare(faultAddress, rangeAddress, Comparison.GreaterOrEqualUI),
context.ICompare(faultAddress, rangeEndAddress, Comparison.Less) context.ICompare(faultAddress, rangeEndAddress, Comparison.LessUI)
); );
// Only call tracking if in range. // Only call tracking if in range.

View file

@ -27,7 +27,7 @@ namespace ARMeilleure.Translation.PTC
private const string OuterHeaderMagicString = "PTCohd\0\0"; private const string OuterHeaderMagicString = "PTCohd\0\0";
private const string InnerHeaderMagicString = "PTCihd\0\0"; private const string InnerHeaderMagicString = "PTCihd\0\0";
private const uint InternalVersion = 3193; //! To be incremented manually for each change to the ARMeilleure project. private const uint InternalVersion = 3267; //! To be incremented manually for each change to the ARMeilleure project.
private const string ActualDir = "0"; private const string ActualDir = "0";
private const string BackupDir = "1"; private const string BackupDir = "1";