[PPC64] Define sign conditions for each block#7326
[PPC64] Define sign conditions for each block#7326lbianc wants to merge 1 commit intofacebook:masterfrom
Conversation
|
@mxw this PR has on check pending since I have created it, is there any issue with that? |
|
@lbianc - weird. The internal tool shows all tests passed. @fredemmott any idea why |
|
Bug - we only create/update an 'FB tests' entry if state !== ok |
|
Fix ready, ran for just this PR. Problem will still happen on others or if you update this for a while. |
|
@fredemmott thanks! |
|
Can you check out the comment I left here: #7348 (comment) I feel like exposing the XLS liveness analysis for SF registers would also be something that you could use here. If you agree, let's hold off on this until I refactor that analysis so that you can use it. |
|
Yes, seems something that I can use here. No problem wait for that. One question, with this XLS liveness analysis of SF registers, will I be able to know which instructions use it during the live period? |
On PPC64 there is more than one Condition Register and depending if the operation is signed or unsigned, a different CR is set. After the VASM emission and all optimization phases, the new "Define Conditions" phase is called to check if the block has signed, unsigned, neither or both kind of operations, so based on that, the correct comparing instruction is emitted.
2be0cea to
712834c
Compare
|
Updated to solve conflicts with master. |
|
@lbianc updated the pull request - view changes - changes since last import |
|
@lbianc—Yes, I'll make it so that you can access the use-instructions. |
|
Okay, I spent some time working on a separate pass for this, but ended up just deciding to use I would add an extra data structure to the |
|
Closing this PR in favor of a potential future implementation of a solution like the one described above. |
On PPC64 there is more than one Condition Register and depending if the
operation is signed or unsigned, a different CR is set.
After the VASM emission and all optimization phases, the new "Define
Conditions" phase is called to check if the block has signed, unsigned,
neither or both kind of operations, so based on that, the correct
comparing instruction is emitted.