Jojo 在 2020年11月6日 +0800 AM11:18,Jeff Law <l...@redhat.com>,写道:
On 11/5/20 7:50 PM, Jim Wilson wrote: On Thu, Nov 5, 2020 at 6:03 PM Jojo R <jiejie_r...@c-sky.com> wrote: > > gcc/ > > * haifa-sched.c (dep_list_costs): New. > > (rank_for_schedule): Use dep_list_costs. > > When you post a patch, you should explain what the patch is doing and why > this is better than the code that was there before. It is helpful if you can > show results that demonstrate that it is better, e.g. give a small example > and show some scheduler or assembly output to show what it does. > > You should also consider that when you modify target independent code then > you are affecting every target. This change may work well for your target, > but does it also work for x86, arm, ppc, etc? This probably requires some > testing to see if it works for other targets. If not, then maybe it needs to > be conditional on a target hook. > > The patch does seem to make some sense though. When choosing the instruction > that has the most dependent instructions to schedule next, you want to ignore > the ones that have a 0 cost dependency due to a bypass. Agreed. It looks pretty reasonable, but a bit more background would be helpful. Ok & Thanks, It’s fixed in patch v3. jeff