Open pjaaskel opened 3 years ago
The same issue occurs when you map a load/store with state (i.e. post-increment loads/stores) to a specific address space
For example, if you have two address spaces and the loads are to address space 0, and the stores to address space 1, the compiler will add load/store dependencies and first schedule all loads before scheduling the stores.
Right, the selection of AS should cut the state dependency similarly since we support only one AS per FU.
Why this is not trivially fixed in general is that operations usually can be assigned to multiple FUs, but when the user has explicitly set the operation to an FU via the FU operation macro, we should take advantage of this fact in DDG analysis and skip the edge when the operations are in different FUs (check the FU annotation).
The code is in: https://github.com/cpc/tce/blob/e50e8a37419cc962a3736288d5bfcde6ac7aaaf5/tce/src/applibs/Scheduler/ProgramRepresentations/DDG/DataDependenceGraphBuilder.cc#L1645