I'm working onaport to a VLIW DSP with anexposed pipeline (i.e., no interlocks). Some operations OPhave as much as 2-cycle latency on values of the call-preserved regs CPR. E.g., if the callee's epiloguerestores a CPR in the delay slot of the return instruction, then any OP with that CPR as input needs to schedule 2 clocks after the call in order to get the expected value. If OP schedules immediately after the call, then it will getthevalue the callee's value prior to the epilogue restore.
The easy, low-performance way to solve the problem is to schedule epilogues to restore CPRs before the return and its delay slot. The harder, usually better performing way is to manage dependences in the caller so that uses of CPRs for OPs that require extra cycles schedule at sufficient distance from the call. How shall I introduce these dependences for only the scheduler? As an experiment, I added CLOBBERs to the call insn, which createdtrue depencences between the call and downstream instructions that read the CPRs, but had the undesired effect of perturbing dataflowacross calls. I'm thinking sched-depsneedsnew code for targets with TARGET_SCHED_EXPOSED_PIPELINE to add dependencesfor call-insn producers and CPR-user consumers. Comments? Greg