From a2d12076b9268c11d300bddcbce04675ec2f42d3 Mon Sep 17 00:00:00 2001 From: Xiaodong Liu Date: Thu, 25 Nov 2021 11:41:03 +0800 Subject: [PATCH] cmd/compile/internal/ssa: add support on loong64 for schedule phase Contributors to the loong64 port are: Weining Lu Lei Wang Lingqin Gong Xiaolin Zhao Meidan Li Xiaojuan Zhai Qiyuan Pu Guoqi Chen 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 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: David Chase Auto-Submit: Ian Lance Taylor --- src/cmd/compile/internal/ssa/schedule.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cmd/compile/internal/ssa/schedule.go b/src/cmd/compile/internal/ssa/schedule.go index 9b15f20624..2b74c9e420 100644 --- a/src/cmd/compile/internal/ssa/schedule.go +++ b/src/cmd/compile/internal/ssa/schedule.go @@ -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: