The API seems okay as-is, but maybe it could be improved a little. Maybe it makes sense to loosen the mayStore requirement?
Details
Diff Detail
Event Timeline
One thing I found kind of confusing was that I'm not sure what the rules for areMemAccessesTriviallyDisjoint are supposed to be. It looks like a lot of targets assume that the function is in SSA form (checking equality between two registers without checking whether the value of that register is modified), but we call it after register allocation. How is this supposed to work?
I'm no expert here but I think the areMemAccessesTriviallyDisjoint() works because it is only used for scheduling where a change in the value of the register would inhibit reordering anyway.
lib/CodeGen/MachineInstr.cpp | ||
---|---|---|
1574 | Use a reference for Other as that must not be a nullptr. |
Yes, I believe this is the same conclusion @gberry and I arrived at in the recent past.
lib/CodeGen/MachineInstr.cpp | ||
---|---|---|
1579 | I think it makes sense to relax this constraint, as you suggest Eli. |
Use a reference for Other as that must not be a nullptr.