ssa: compile go string constant without alloca

This commit is contained in:
Li Jie
2024-11-24 15:19:16 +08:00
parent 17832fe18c
commit 43c1bc8d5f
73 changed files with 9742 additions and 21877 deletions

View File

@@ -0,0 +1,17 @@
package main
func Foo(s string) int {
return len(s)
}
func Test() {
j := 0
for i := 0; i < 10000000; i++ {
j += Foo("hello")
}
println(j)
}
func main() {
Test()
}