]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/ssa: add support on loong64 for schedule phase
authorXiaodong Liu <liuxiaodong@loongson.cn>
Thu, 25 Nov 2021 03:41:03 +0000 (11:41 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 12 May 2022 00:24:40 +0000 (00:24 +0000)
Contributors to the loong64 port are:
  Weining Lu <luweining@loongson.cn>
  Lei Wang <wanglei@loongson.cn>
  Lingqin Gong <gonglingqin@loongson.cn>
  Xiaolin Zhao <zhaoxiaolin@loongson.cn>
  Meidan Li <limeidan@loongson.cn>
  Xiaojuan Zhai <zhaixiaojuan@loongson.cn>
  Qiyuan Pu <puqiyuan@loongson.cn>
  Guoqi Chen <chenguoqi@loongson.cn>

This port has been updated to Go 1.15.6:
  https://github.com/loongson/go

Updates #46229

Change-Id: Id533912c62d8c4e2aa3c124561772b543d685d7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/367041
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/cmd/compile/internal/ssa/schedule.go

index 9b15f2062472a7481d83aaa19aad6581a9a3c5a3..2b74c9e42042e9e107421491834bb16e0bbb9c34 100644 (file)
@@ -79,7 +79,7 @@ func (h ValHeap) Less(i, j int) bool {
 func (op Op) isLoweredGetClosurePtr() bool {
        switch op {
        case OpAMD64LoweredGetClosurePtr, OpPPC64LoweredGetClosurePtr, OpARMLoweredGetClosurePtr, OpARM64LoweredGetClosurePtr,
-               Op386LoweredGetClosurePtr, OpMIPS64LoweredGetClosurePtr, OpS390XLoweredGetClosurePtr, OpMIPSLoweredGetClosurePtr,
+               Op386LoweredGetClosurePtr, OpMIPS64LoweredGetClosurePtr, OpLOONG64LoweredGetClosurePtr, OpS390XLoweredGetClosurePtr, OpMIPSLoweredGetClosurePtr,
                OpRISCV64LoweredGetClosurePtr, OpWasmLoweredGetClosurePtr:
                return true
        }
@@ -129,7 +129,8 @@ func schedule(f *Func) {
                                v.Op == OpARMLoweredNilCheck || v.Op == OpARM64LoweredNilCheck ||
                                v.Op == Op386LoweredNilCheck || v.Op == OpMIPS64LoweredNilCheck ||
                                v.Op == OpS390XLoweredNilCheck || v.Op == OpMIPSLoweredNilCheck ||
-                               v.Op == OpRISCV64LoweredNilCheck || v.Op == OpWasmLoweredNilCheck:
+                               v.Op == OpRISCV64LoweredNilCheck || v.Op == OpWasmLoweredNilCheck ||
+                               v.Op == OpLOONG64LoweredNilCheck:
                                // Nil checks must come before loads from the same address.
                                score[v.ID] = ScoreNilCheck
                        case v.Op == OpPhi: