diff options
| author | Michael Matloob <matloob@golang.org> | 2026-01-12 14:37:39 -0500 |
|---|---|---|
| committer | Michael Matloob <matloob@golang.org> | 2026-01-13 09:52:54 -0800 |
| commit | e2fef50def98b87107ab963f657d43d7869b8463 (patch) | |
| tree | 2c8edd92823c378b4030ace74f7455939bc2bfb9 /src/cmd/compile/internal | |
| parent | 7f6418bb4e44b1b11d428d402dd6935a2a1ea335 (diff) | |
| download | go-e2fef50def98b87107ab963f657d43d7869b8463.tar.xz | |
runtime: rename mallocTiny* to mallocgcTinySize*
This makes it easier to identify which functions are used for memory
allocation by looking for functions that start with mallocgc. The Size
suffix is added so that the isSpecializedMalloc function in
cmd/compile/internal/ssa can distinguish between the generated functions
and the mallocgcTiny function called by mallocgc, similar to the SC
suffixes for the mallocgcSmallNoScanSC* and mallocgcSmallScanNoHeaderSC*
functons.
Change-Id: I6ad7f15617bf6f18ae5d1bfa2a0b94e86a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/735780
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/compile/internal')
| -rw-r--r-- | src/cmd/compile/internal/ssa/rewrite.go | 2 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssagen/ssa.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/rewrite.go b/src/cmd/compile/internal/ssa/rewrite.go index af2568ae89..032915f701 100644 --- a/src/cmd/compile/internal/ssa/rewrite.go +++ b/src/cmd/compile/internal/ssa/rewrite.go @@ -480,7 +480,7 @@ func isSpecializedMalloc(aux Aux) bool { name := fn.String() return strings.HasPrefix(name, "runtime.mallocgcSmallNoScanSC") || strings.HasPrefix(name, "runtime.mallocgcSmallScanNoHeaderSC") || - strings.HasPrefix(name, "runtime.mallocTiny") + strings.HasPrefix(name, "runtime.mallocgcTinySize") } // canLoadUnaligned reports if the architecture supports unaligned load operations. diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go index dd5baa0ed5..17feb90df7 100644 --- a/src/cmd/compile/internal/ssagen/ssa.go +++ b/src/cmd/compile/internal/ssagen/ssa.go @@ -140,7 +140,7 @@ func InitConfig() { ir.Syms.MallocGCSmallScanNoHeader[i] = typecheck.LookupRuntimeFunc(fmt.Sprintf("mallocgcSmallScanNoHeaderSC%d", i)) } for i := 1; i < len(ir.Syms.MallocGCTiny); i++ { - ir.Syms.MallocGCTiny[i] = typecheck.LookupRuntimeFunc(fmt.Sprintf("mallocTiny%d", i)) + ir.Syms.MallocGCTiny[i] = typecheck.LookupRuntimeFunc(fmt.Sprintf("mallocgcTinySize%d", i)) } ir.Syms.MallocGC = typecheck.LookupRuntimeFunc("mallocgc") ir.Syms.Memmove = typecheck.LookupRuntimeFunc("memmove") |
