cpc / openasip

Open Application-Specific Instruction Set processor tools (OpenASIP)
http://openasip.org
Other
144 stars 43 forks source link

DDG adds a dep edge due to operation state even though the operations are forced to different FUs #115

Open pjaaskel opened 3 years ago

pjaaskel commented 3 years ago

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

barrydebruin commented 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.

pjaaskel commented 3 years ago

Right, the selection of AS should cut the state dependency similarly since we support only one AS per FU.