Skip to content

Commit

Permalink
cmd/compile: enable lateLower pass on PPC64
Browse files Browse the repository at this point in the history
This allows new rules to be added which would otherwise
greatly overcomplicate the generic rules, like CC opcode
conversion or zero register simplification.

Change-Id: I1533f0fa07815aff99ed8ab890077bd22a3bfbf5
Reviewed-on: https://go-review.googlesource.com/c/go/+/442595
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
  • Loading branch information
pmur authored and pull[bot] committed Jan 28, 2023
1 parent d1bfd25 commit 3478037
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cmd/compile/internal/ssa/_gen/PPC64latelower.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file contains rules used by the laterLower pass.
1 change: 1 addition & 0 deletions src/cmd/compile/internal/ssa/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ func NewConfig(arch string, types Types, ctxt *obj.Link, optimize, softfloat boo
c.RegSize = 8
c.lowerBlock = rewriteBlockPPC64
c.lowerValue = rewriteValuePPC64
c.lateLowerValue = rewriteValuePPC64latelower
c.registers = registersPPC64[:]
c.gpRegMask = gpRegMaskPPC64
c.fpRegMask = fpRegMaskPPC64
Expand Down
11 changes: 11 additions & 0 deletions src/cmd/compile/internal/ssa/rewritePPC64latelower.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3478037

Please sign in to comment.