Repository navigation
[RyuJIT/ARM32] Select proper temp register when resolving edges - #12185
Conversation
463ce19 to
25e18c3
Compare
For ARM32, we need double temporary register in addition to integer and float temporary register when resolving edges between basic blocks. Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
|
@dotnet/arm32-contrib |
| #endif // !_TARGET_XARCH_ | ||
| regNumber tempRegFlt = REG_NA; | ||
| #ifdef _TARGET_ARM_ | ||
| // ARM32 requires double temp register in addition to interger and float temp registers. |
|
|
||
| #ifdef _TARGET_ARM_ | ||
| // ARM32 requires double temp register in addition to interger and float temp registers. | ||
| tempRegDbl = getTempRegForResolution(fromBlock, toBlock, TYP_DOUBLE); |
There was a problem hiding this comment.
The resolution uses only one register at a time, so it would be better to reserve only a TYP_DOUBLE register on arm, and then its lower half can be used when resolving a TYP_FLOAT.
There was a problem hiding this comment.
The resolution uses only one register at a time, so it would be better to reserve only a TYP_DOUBLE register on arm, and then its lower half can be used when resolving a TYP_FLOAT.
When considering code structure, I also think the suggested approach is better.
However I'm afraid it may affect code quality sometimes when we need TYP_FLOAT temp but there there is a free TYP_FLOAT register and no free TYP_DOUBLE register. I've looked into getTempRegForResolution() and it does not guarantee reserving a temp register.
What do you think of it?
There was a problem hiding this comment.
If you checked for a TYP_DOUBLE first, and it was found, then you could save its lower half as the TYP_FLOAT temp. If not, then you could check for a single register for TYP_FLOAT
There was a problem hiding this comment.
I see. I've updated the PR.
Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
0c04922 to
a0a4799
Compare
…FLOAT First, try to reserve a double temp register for both TYP_DOUBLE and TYP_FLOAT. If fails, try to reserve a float temp register for only TYP_FLOAT. Signed-off-by: Hyung-Kyu Choi <hk0110.choi@samsung.com>
|
@CarolEidt Please take a look. Thanks! |
CarolEidt
left a comment
There was a problem hiding this comment.
LGTM. Thanks for making the changes.
Fix #11851
For ARM32, we need double temporary register in addition to integer
and float temporary register when resolving edges between basic blocks.