On Sat, Aug 22, 2020 at 10:31 PM xie cui <cuiwei...@gmail.com> wrote: > > we can find same dynamic programming algorithm(like BURS bottom rewriting > system), to choose instructions in book about compiler technique. but as far > as i know, it seems that golang just transform ast to ssa IR, then lower to > machine instruction. how i find the min cost of instructions?
I believe that instruction cost is implicitly encoded in the rules that appear in the cmd/compile/internal/ssa/gen directory. The rules only list the instruction choices that seem best. As far as I know the gc compiler does not trade off between register allocation and instruction selection, but I don't know everything that it does. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXLda70UR340GWFf3yKn3aZBbv74KR7zhMcbCo7LnfmCA%40mail.gmail.com.