-
Couldn't load subscription status.
- Fork 29
[AIE2P] Add SingletonCopyEdges dag mutator in pre-scheduler #469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: aie-public
Are you sure you want to change the base?
Conversation
| continue; | ||
|
|
||
| auto MO = MI.getOperand(1); | ||
| if (!(MO.isReg() && MO.getReg().isPhysical())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
if (!MO.isReg() || !MO.getReg().isPhysical())
continue;
| if (!MBB->isLiveIn(PhysReg)) | ||
| continue; | ||
|
|
||
| SDep SingletonCopyEdge(&SU, SDep::Artificial); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about moving this into the scope of the if below?
|
|
||
| for (SUnit &SU2 : DAG->SUnits) { | ||
| MachineInstr &MI = *SU2.getInstr(); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we creating an Edge from SU to itself?
|
Can we have a test that runs only premisched? |
[AutoBump] Merge with ceeb08b (Nov 18) (9)
Some instructions take a singleton register class in their operands. If a copy of that same physical register from the function arguments is moved closer to its user by the pre-scheduler and it happens to move past an instruction requiring that singleton register class, a live range interference is created which the register allocator cannot resolve by evicting the function argument physical register, leading to a "ran out of registers" error.
To solve this, this introduces DAG mutator in the pre-scheduler with zero latency edge between such copies and such instructions, thus preventing the scheduler from creating the undesired interference.