Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[RyuJIT/ARM32] Update LinearScan::resolveLocalRef() for ARM32 - #12194

Merged
BruceForstall merged 4 commits into
dotnet:masterfrom
hqueue:arm/ryujit/lsra_11847
Jun 19, 2017
Merged

BruceForstall merged 4 commits into
dotnet:masterfrom
hqueue:arm/ryujit/lsra_11847

Conversation

@hqueue

@hqueue hqueue commented Jun 9, 2017

Copy link
Copy Markdown
Member

Fix #11847

Update LinearScan::resolveLocalRef()

  • Always update two float register consisting a double register
  • Use helper function for ARM32 double register
  • Use stronger assertion condition

@hqueue

hqueue commented Jun 9, 2017

Copy link
Copy Markdown
Member Author

@dotnet-bot test Windows_NT x64 Debug Build and Test

@BruceForstall

Copy link
Copy Markdown

cc @dotnet/arm32-contrib

@BruceForstall
BruceForstall requested a review from CarolEidt June 13, 2017 17:22

@CarolEidt CarolEidt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though it would be nice to extract the duplicate code

Comment thread src/jit/lsra.cpp

nextPhysRegRecord->assignedInterval = nullptr;
}
#endif

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to extract this, perhaps into a method called ResetAssignedReg(RegRecord, RegisterType). With a bit of refactoring it could also be used in unassignPhysReg()

@hqueue hqueue Jun 14, 2017 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CarolEidt You are right and I'm planning to do some refactoring for lsra.cpp.

For example, we can reuse part of checkAndClearInterval and checkAndAssignInterval when updating assignedInterval in RegRecord.
If you don't mind I will make another PR for refactoring after remaining bugs in register allocation for ryujit/arm32 are fixed.

@hqueue
hqueue force-pushed the arm/ryujit/lsra_11847 branch 7 times, most recently from d30cff6 to d36e4d2 Compare June 15, 2017 07:43
@hqueue

hqueue commented Jun 15, 2017

Copy link
Copy Markdown
Member Author

@CarolEidt PTAL. I've update the PR with refactoring resolveLocalRef() using a new helper function.

I'm going to apply similar refactoring to whole lsra.cpp by extending a helper function in the next PR.

@CarolEidt CarolEidt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with just some typos in the comments.

Comment thread src/jit/lsra.cpp Outdated
#ifdef _TARGET_ARM_
//-----------------------------------------------------------------------------
// updateAssignedInterval: Update assigned interval of register for ARM32
// considering reigster type. When reigster type is TYP_DOUBLE, update

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "reigster" -> "register" also a couple of places below.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I found same typo across lsra.cpp.

@BruceForstall

Copy link
Copy Markdown

@hqueue Can you fix the formatting?

@hqueue

hqueue commented Jun 19, 2017

Copy link
Copy Markdown
Member Author

@dotnet-bot please test Ubuntu x64 Formatting

@hqueue

hqueue commented Jun 19, 2017 •

Copy link
Copy Markdown
Member Author

@hqueue Can you fix the formatting?

@BruceForstall It's weird, because the formatting error is from code in master branch (which I've submitted before and already merged without formatting error #12185.). There is no code related to formatting error in this PR.

I will rebase this PR to fix the formatting.

hqueue added 4 commits June 19, 2017 12:50
Update LinearScan::resolveLocalRef()
- Always update two float register consisting a double register
- Use helper function for ARM32 double register
- Use stronger assertion condition

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Introduce updateAssignedInterval() to update assigned interval
of ARM32 register considering register type.

Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
@hqueue
hqueue force-pushed the arm/ryujit/lsra_11847 branch from ba071fa to 47cd5cb Compare June 19, 2017 03:52
@BruceForstall
BruceForstall merged commit f6ce70e into dotnet:master Jun 19, 2017
@karelz karelz modified the milestone: 2.1.0 Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RyuJIT/arm32] Assertion failed '!assignedInterval->isActive || isSecondHalfReg(physRegRecord, assignedInterval)'

5 participants