Merge pull request #929 from cpunion/go123
Separate compiler, runtime and llgo library
This commit is contained in:
48
.github/actions/setup-deps/action.yml
vendored
Normal file
48
.github/actions/setup-deps/action.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: "Setup LLGO Dependencies"
|
||||
description: "Install all required dependencies for LLGO"
|
||||
inputs:
|
||||
llvm-version:
|
||||
description: "LLVM version to install"
|
||||
required: true
|
||||
default: "18"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install macOS dependencies
|
||||
if: runner.os == 'macOS'
|
||||
shell: bash
|
||||
run: |
|
||||
brew update
|
||||
brew install llvm@${{inputs.llvm-version}} bdw-gc openssl libffi
|
||||
brew link --force libffi
|
||||
echo "$(brew --prefix llvm@${{inputs.llvm-version}})/bin" >> $GITHUB_PATH
|
||||
|
||||
# Install optional deps for demos.
|
||||
#
|
||||
# NOTE: Keep this list updated as new deps are introduced.
|
||||
opt_deps=(
|
||||
cjson # for github.com/goplus/llgo/c/cjson
|
||||
sqlite # for github.com/goplus/llgo/c/sqlite
|
||||
python@3.12 # for github.com/goplus/llgo/py
|
||||
)
|
||||
brew install "${opt_deps[@]}"
|
||||
- name: Install Ubuntu dependencies
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |
|
||||
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{inputs.llvm-version}} main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y llvm-${{inputs.llvm-version}}-dev clang-${{inputs.llvm-version}} libclang-${{inputs.llvm-version}}-dev lld-${{inputs.llvm-version}} pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libcjson-dev libunwind-dev
|
||||
echo "/usr/lib/llvm-${{inputs.llvm-version}}/bin" >> $GITHUB_PATH
|
||||
|
||||
# Install optional deps for demos.
|
||||
#
|
||||
# NOTE: Keep this list updated as new deps are introduced.
|
||||
opt_deps=(
|
||||
libcjson-dev # for github.com/goplus/llgo/c/cjson
|
||||
libsqlite3-dev # for github.com/goplus/llgo/c/sqlite
|
||||
python3.12-dev # for github.com/goplus/llgo/py
|
||||
)
|
||||
sudo apt-get install -y "${opt_deps[@]}"
|
||||
35
.github/actions/test-helloworld/action.yml
vendored
Normal file
35
.github/actions/test-helloworld/action.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: 'Test Hello World'
|
||||
description: 'Test Hello World with specific Go and module versions'
|
||||
inputs:
|
||||
go-version:
|
||||
description: 'Go version being tested'
|
||||
required: true
|
||||
mod-version:
|
||||
description: 'Go module version to use'
|
||||
required: true
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Test Hello World
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Testing with Go ${{ inputs.go-version }} and go.mod ${{ inputs.mod-version }}"
|
||||
mkdir -p _test/helloworld && cd _test/helloworld
|
||||
cat > go.mod << 'EOL'
|
||||
module hello
|
||||
go ${{ inputs.mod-version }}
|
||||
EOL
|
||||
cat > main.go << 'EOL'
|
||||
package main
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/goplus/llgo/c"
|
||||
)
|
||||
func main() {
|
||||
fmt.Println("Hello, LLGo!")
|
||||
println("Hello, LLGo!")
|
||||
c.Printf(c.Str("Hello, LLGo!\n"))
|
||||
}
|
||||
EOL
|
||||
go mod tidy
|
||||
llgo run .
|
||||
8
.github/ci-config/codecov.yml
vendored
Normal file
8
.github/ci-config/codecov.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
coverage:
|
||||
ignore:
|
||||
- "compiler/chore"
|
||||
- "chore"
|
||||
- "py"
|
||||
- "x"
|
||||
- "cpp"
|
||||
- "runtime"
|
||||
3
.github/workflows/doc.yml
vendored
3
.github/workflows/doc.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.20'
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Install dependencies on macOS
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
@@ -65,6 +65,7 @@ jobs:
|
||||
fi
|
||||
}
|
||||
source doc/_readme/scripts/install_llgo.sh
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Test doc code blocks
|
||||
run: |
|
||||
|
||||
30
.github/workflows/fmt.yml
vendored
Normal file
30
.github/workflows/fmt.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Format Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "**" ]
|
||||
pull_request:
|
||||
branches: [ "**" ]
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
for dir in . compiler runtime; do
|
||||
pushd $dir
|
||||
if [ -n "$(go fmt ./...)" ]; then
|
||||
echo "Some files are not properly formatted. Please run 'go fmt ./...'"
|
||||
exit 1
|
||||
fi
|
||||
popd
|
||||
done
|
||||
echo "All files are properly formatted."
|
||||
114
.github/workflows/go.yml
vendored
114
.github/workflows/go.yml
vendored
@@ -10,23 +10,6 @@ on:
|
||||
branches: [ "**" ]
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.20'
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
if [ -n "$(go fmt ./...)" ]; then
|
||||
echo "Some files are not properly formatted. Please run 'go fmt ./...'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -35,54 +18,15 @@ jobs:
|
||||
- ubuntu-24.04
|
||||
llvm: [18]
|
||||
runs-on: ${{matrix.os}}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: compiler
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
run: |
|
||||
brew update
|
||||
brew install llvm@${{matrix.llvm}} bdw-gc openssl libffi
|
||||
brew link --force libffi
|
||||
echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH
|
||||
|
||||
# Install optional deps for demos.
|
||||
#
|
||||
# NOTE: Keep this list updated as new deps are introduced.
|
||||
opt_deps=(
|
||||
cjson # for github.com/goplus/llgo/c/cjson
|
||||
sqlite # for github.com/goplus/llgo/c/sqlite
|
||||
python@3.12 # for github.com/goplus/llgo/py
|
||||
)
|
||||
brew install "${opt_deps[@]}"
|
||||
|
||||
- name: Install dependencies
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: |
|
||||
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{matrix.llvm}} main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y llvm-${{matrix.llvm}}-dev clang-${{matrix.llvm}} libclang-${{matrix.llvm}}-dev lld-${{matrix.llvm}} pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libcjson-dev libunwind-dev
|
||||
echo "/usr/lib/llvm-${{matrix.llvm}}/bin" >> $GITHUB_PATH
|
||||
|
||||
# Install optional deps for demos.
|
||||
#
|
||||
# NOTE: Keep this list updated as new deps are introduced.
|
||||
opt_deps=(
|
||||
libcjson-dev # for github.com/goplus/llgo/c/cjson
|
||||
libsqlite3-dev # for github.com/goplus/llgo/c/sqlite
|
||||
python3.12-dev # for github.com/goplus/llgo/py
|
||||
)
|
||||
sudo apt-get install -y "${opt_deps[@]}"
|
||||
|
||||
- name: Install further optional dependencies for demos
|
||||
run: |
|
||||
wget -P ./_demo/llama2-c https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin
|
||||
py_deps=(
|
||||
numpy # for github.com/goplus/llgo/py/numpy
|
||||
torch # for github.com/goplus/llgo/py/torch
|
||||
)
|
||||
pip3.12 install --break-system-packages "${py_deps[@]}"
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
|
||||
- name: Clang information
|
||||
run: |
|
||||
@@ -93,14 +37,11 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.20'
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
|
||||
- name: Install
|
||||
run: go install ./...
|
||||
|
||||
- name: Test
|
||||
if: ${{!startsWith(matrix.os, 'macos')}}
|
||||
run: go test -v ./...
|
||||
@@ -109,48 +50,9 @@ jobs:
|
||||
if: startsWith(matrix.os, 'macos')
|
||||
run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
|
||||
|
||||
- name: LLGO tests
|
||||
if: ${{!startsWith(matrix.os, 'ubuntu')}}
|
||||
run: |
|
||||
echo "Test result on ${{matrix.os}} with LLVM ${{matrix.llvm}}" > result.md
|
||||
bash .github/workflows/test_llgo.sh
|
||||
|
||||
- name: chore/_xtool build tests
|
||||
run: |
|
||||
cd chore/_xtool
|
||||
llgo build -v ./...
|
||||
|
||||
- name: LLDB tests
|
||||
if: ${{startsWith(matrix.os, 'macos')}}
|
||||
run: |
|
||||
echo "Test lldb with llgo plugin on ${{matrix.os}} with LLVM ${{matrix.llvm}}"
|
||||
bash _lldb/runtest.sh -v
|
||||
|
||||
- name: Test demos
|
||||
run: |
|
||||
# TODO(lijie): force python3-embed to be linked with python-3.12-embed
|
||||
# Currently, python3-embed is python-3.13-embed, doesn't work with pytorch
|
||||
# Will remove this after pytorch is fixed.
|
||||
pcdir=$HOME/pc
|
||||
mkdir -p $pcdir
|
||||
libdir=$(pkg-config --variable=libdir python-3.12-embed)
|
||||
echo "libdir: $libdir"
|
||||
ln -s $libdir/pkgconfig/python-3.12-embed.pc $pcdir/python3-embed.pc
|
||||
export PKG_CONFIG_PATH=$pcdir
|
||||
bash .github/workflows/test_demo.sh
|
||||
|
||||
- name: Show test result
|
||||
run: cat result.md
|
||||
|
||||
- name: PR comment with test result
|
||||
uses: thollander/actions-comment-pull-request@v3
|
||||
if: false
|
||||
with:
|
||||
filePath: result.md
|
||||
comment_tag: test-result-on-${{matrix.os}}-with-llvm-${{matrix.llvm}}
|
||||
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
token: ${{secrets.CODECOV_TOKEN}}
|
||||
slug: goplus/llgo
|
||||
codecov_yml_path: .github/ci-config/codecov.yml
|
||||
|
||||
145
.github/workflows/llgo.yml
vendored
Normal file
145
.github/workflows/llgo.yml
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
# This workflow will build a golang project
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
|
||||
|
||||
name: LLGo
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "**" ]
|
||||
pull_request:
|
||||
branches: [ "**" ]
|
||||
|
||||
jobs:
|
||||
llgo-test:
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-24.04
|
||||
llvm: [18]
|
||||
go: ['1.20', '1.21', '1.22', '1.23']
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
- name: Install further optional dependencies for demos
|
||||
run: |
|
||||
wget -P ./_demo/llama2-c https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin
|
||||
py_deps=(
|
||||
numpy # for github.com/goplus/llgo/py/numpy
|
||||
torch # for github.com/goplus/llgo/py/torch
|
||||
)
|
||||
pip3.12 install --break-system-packages "${py_deps[@]}"
|
||||
|
||||
- name: Set up Go for build
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Install
|
||||
working-directory: compiler
|
||||
run: |
|
||||
go install ./...
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Go for testing
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
|
||||
- name: Verify Go version
|
||||
run: |
|
||||
go_version=$(go version | cut -d' ' -f3 | sed 's/go//')
|
||||
if [[ "$go_version" != "${{matrix.go}}"* ]]; then
|
||||
echo "Expected Go version ${{matrix.go}}, but got $go_version"
|
||||
exit 1
|
||||
fi
|
||||
echo "Using Go version: $go_version"
|
||||
|
||||
- name: _xtool build tests
|
||||
run: |
|
||||
cd _xtool
|
||||
llgo build -v ./...
|
||||
|
||||
- name: LLGO tests
|
||||
if: ${{!startsWith(matrix.os, 'ubuntu')}}
|
||||
run: |
|
||||
echo "Test result on ${{matrix.os}} with LLVM ${{matrix.llvm}}" > result.md
|
||||
bash ./.github/workflows/test_llgo.sh
|
||||
|
||||
- name: Test demos
|
||||
run: |
|
||||
# TODO(lijie): force python3-embed to be linked with python-3.12-embed
|
||||
# Currently, python3-embed is python-3.13-embed, doesn't work with pytorch
|
||||
# Will remove this after pytorch is fixed.
|
||||
pcdir=$HOME/pc
|
||||
mkdir -p $pcdir
|
||||
libdir=$(pkg-config --variable=libdir python-3.12-embed)
|
||||
echo "libdir: $libdir"
|
||||
ln -s $libdir/pkgconfig/python-3.12-embed.pc $pcdir/python3-embed.pc
|
||||
export PKG_CONFIG_PATH=$pcdir
|
||||
bash .github/workflows/test_demo.sh
|
||||
|
||||
- name: Show test result
|
||||
run: cat result.md
|
||||
|
||||
- name: LLDB tests
|
||||
if: ${{startsWith(matrix.os, 'macos')}}
|
||||
working-directory: compiler
|
||||
run: |
|
||||
echo "Test lldb with llgo plugin on ${{matrix.os}} with LLVM ${{matrix.llvm}}"
|
||||
bash _lldb/runtest.sh -v
|
||||
|
||||
helloworld-test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-24.04, macos-latest]
|
||||
llvm: [18]
|
||||
go: ['1.20', '1.21', '1.22', '1.23']
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
uses: ./.github/actions/setup-deps
|
||||
with:
|
||||
llvm-version: ${{matrix.llvm}}
|
||||
|
||||
- name: Set up Go 1.23 for building llgo
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Install llgo
|
||||
working-directory: compiler
|
||||
run: |
|
||||
go install ./...
|
||||
echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up Go for testing
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
|
||||
- name: Test Hello World with go.mod 1.20
|
||||
if: matrix.go == '1.20' || matrix.go == '1.21' || matrix.go == '1.22' || matrix.go == '1.23'
|
||||
uses: ./.github/actions/test-helloworld
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
mod-version: '1.20'
|
||||
|
||||
- name: Test Hello World with go.mod 1.21
|
||||
if: matrix.go == '1.21' || matrix.go == '1.22' || matrix.go == '1.23'
|
||||
uses: ./.github/actions/test-helloworld
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
mod-version: '1.21'
|
||||
|
||||
- name: Test Hello World with go.mod 1.22
|
||||
if: matrix.go == '1.22' || matrix.go == '1.23'
|
||||
uses: ./.github/actions/test-helloworld
|
||||
with:
|
||||
go-version: ${{matrix.go}}
|
||||
mod-version: '1.22'
|
||||
11
.github/workflows/release-build.yml
vendored
11
.github/workflows/release-build.yml
vendored
@@ -11,9 +11,18 @@ jobs:
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache Darwin sysroot
|
||||
id: cache-sysroot
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
.sysroot/darwin.tar.gz
|
||||
key: darwin-sysroot-${{ runner.os }}-${{ hashFiles('.github/workflows/populate_darwin_sysroot.sh') }}
|
||||
- name: Populate Darwin sysroot
|
||||
if: steps.cache-sysroot.outputs.cache-hit != 'true'
|
||||
run: bash .github/workflows/populate_darwin_sysroot.sh
|
||||
- name: Create Darwin sysroot tarball
|
||||
if: steps.cache-sysroot.outputs.cache-hit != 'true'
|
||||
run: tar -czvf .sysroot/darwin.tar.gz -C .sysroot darwin
|
||||
- name: Upload Darwin sysroot tarball
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -32,7 +41,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.20.x
|
||||
go-version: 1.23.x
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Download Darwin sysroot tarball
|
||||
|
||||
@@ -16,7 +16,9 @@ before:
|
||||
|
||||
builds:
|
||||
- id: llgo-darwin-amd64
|
||||
dir: compiler
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=darwin,amd64,byollvm
|
||||
ldflags:
|
||||
@@ -32,7 +34,9 @@ builds:
|
||||
- darwin_amd64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
- id: llgo-darwin-arm64
|
||||
dir: compiler
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=darwin,arm64,byollvm
|
||||
ldflags:
|
||||
@@ -48,7 +52,9 @@ builds:
|
||||
- darwin_arm64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
- id: llgo-linux-amd64
|
||||
dir: compiler
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=linux,amd64,byollvm
|
||||
ldflags:
|
||||
@@ -64,7 +70,9 @@ builds:
|
||||
- linux_amd64
|
||||
mod_timestamp: "{{.CommitTimestamp}}"
|
||||
- id: llgo-linux-arm64
|
||||
dir: compiler
|
||||
main: ./cmd/llgo
|
||||
binary: bin/llgo
|
||||
flags:
|
||||
- -tags=linux,arm64,byollvm
|
||||
ldflags:
|
||||
@@ -88,6 +96,7 @@ archives:
|
||||
files:
|
||||
- LICENSE
|
||||
- README.md
|
||||
- runtime
|
||||
|
||||
checksum:
|
||||
name_template: "{{.ProjectName}}{{.Version}}.checksums.txt"
|
||||
|
||||
@@ -413,10 +413,11 @@ How do I generate these tools?
|
||||
|
||||
```sh
|
||||
git clone https://github.com/goplus/llgo.git
|
||||
cd llgo
|
||||
cd llgo/compiler
|
||||
go install -v ./cmd/...
|
||||
go install -v ./chore/... # compile all tools except pydump
|
||||
cd chore/_xtool
|
||||
export LLGO_ROOT=$PWD/..
|
||||
cd ../_xtool
|
||||
llgo install ./... # compile pydump
|
||||
go install github.com/goplus/hdq/chore/pysigfetch@v0.8.1 # compile pysigfetch
|
||||
```
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../cl/_testgo/cgobasic
|
||||
@@ -1 +0,0 @@
|
||||
../cl/_testgo/cgocfiles
|
||||
@@ -1 +0,0 @@
|
||||
../cl/_testgo/cgodefer
|
||||
@@ -1 +0,0 @@
|
||||
../cl/_testgo/cgofull
|
||||
@@ -106,8 +106,8 @@ import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
|
||||
"github.com/goplus/llgo/cl/_testgo/cgofull/pymod1"
|
||||
"github.com/goplus/llgo/cl/_testgo/cgofull/pymod2"
|
||||
"github.com/goplus/llgo/_demo/cgofull/pymod1"
|
||||
"github.com/goplus/llgo/_demo/cgofull/pymod2"
|
||||
)
|
||||
|
||||
//export go_callback_not_use_in_go
|
||||
@@ -1 +0,0 @@
|
||||
../cl/_testgo/cgomacro
|
||||
@@ -1 +0,0 @@
|
||||
../cl/_testgo/cgopython
|
||||
@@ -22,6 +22,8 @@ func main() {
|
||||
println("closure", i)
|
||||
}
|
||||
}
|
||||
// TODO(lijie): WORKAROUND for reflect problem on go1.23
|
||||
_ = any(reflect.Value{})
|
||||
fns := []any{add, fn, fn1, fn2}
|
||||
for _, fn := range fns {
|
||||
v := reflect.ValueOf(fn)
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/goplus/llgo/c"
|
||||
"github.com/goplus/llgo/c/clang"
|
||||
"github.com/goplus/llgo/chore/_xtool/llcppsymg/clangutils"
|
||||
"github.com/goplus/llgo/compiler/chore/_xtool/llcppsymg/clangutils"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
; ModuleID = 'github.com/goplus/llgo/cl/_testdata/apkg'
|
||||
source_filename = "github.com/goplus/llgo/cl/_testdata/apkg"
|
||||
|
||||
@"github.com/goplus/llgo/cl/_testdata/apkg.init$guard" = global i1 false, align 1
|
||||
|
||||
define double @"github.com/goplus/llgo/cl/_testdata/apkg.Max"(double %0, double %1) {
|
||||
_llgo_0:
|
||||
%2 = fcmp ogt double %0, %1
|
||||
br i1 %2, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
ret double %0
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
ret double %1
|
||||
}
|
||||
|
||||
define void @"github.com/goplus/llgo/cl/_testdata/apkg.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/apkg.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/apkg.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
; ModuleID = 'github.com/goplus/llgo/cl/_testdata/llgotag'
|
||||
source_filename = "github.com/goplus/llgo/cl/_testdata/llgotag"
|
||||
|
||||
@"github.com/goplus/llgo/cl/_testdata/llgotag.init$guard" = global i1 false, align 1
|
||||
|
||||
define void @"github.com/goplus/llgo/cl/_testdata/llgotag.Foo"() {
|
||||
_llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"github.com/goplus/llgo/cl/_testdata/llgotag.init"() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/llgotag.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/llgotag.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1
|
||||
@1 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 48)
|
||||
%3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 0
|
||||
%4 = load ptr, ptr @_llgo_int, align 8
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %4, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, ptr inttoptr (i64 1 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %6, ptr %3, align 8
|
||||
%7 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 1
|
||||
%8 = load ptr, ptr @_llgo_int, align 8
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %8, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %9, ptr inttoptr (i64 2 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %10, ptr %7, align 8
|
||||
%11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i64 2
|
||||
%12 = load ptr, ptr @_llgo_int, align 8
|
||||
%13 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %12, 0
|
||||
%14 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %13, ptr inttoptr (i64 3 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %14, ptr %11, align 8
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %2, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %15, i64 3, 1
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %16, i64 3, 2
|
||||
call void @main.test(%"github.com/goplus/llgo/internal/runtime.Slice" %17)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @main.test(%"github.com/goplus/llgo/internal/runtime.Slice" %0) {
|
||||
_llgo_0:
|
||||
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 1
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_4, %_llgo_0
|
||||
%2 = phi i64 [ -1, %_llgo_0 ], [ %3, %_llgo_4 ]
|
||||
%3 = add i64 %2, 1
|
||||
%4 = icmp slt i64 %3, %1
|
||||
br i1 %4, label %_llgo_2, label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1
|
||||
%5 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 0
|
||||
%6 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 1
|
||||
%7 = icmp slt i64 %3, 0
|
||||
%8 = icmp sge i64 %3, %6
|
||||
%9 = or i1 %8, %7
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %9)
|
||||
%10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %5, i64 %3
|
||||
%11 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %10, align 8
|
||||
%12 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %11, 0
|
||||
%13 = load ptr, ptr @_llgo_int, align 8
|
||||
%14 = icmp eq ptr %12, %13
|
||||
br i1 %14, label %_llgo_4, label %_llgo_5
|
||||
|
||||
_llgo_3: ; preds = %_llgo_1
|
||||
ret void
|
||||
|
||||
_llgo_4: ; preds = %_llgo_2
|
||||
%15 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %11, 1
|
||||
%16 = ptrtoint ptr %15 to i64
|
||||
%17 = call i32 (ptr, ...) @printf(ptr @0, i64 %16)
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_5: ; preds = %_llgo_2
|
||||
%18 = load ptr, ptr @_llgo_string, align 8
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 21 }, ptr %19, align 8
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %18, 0
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %20, ptr %19, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %21)
|
||||
unreachable
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_int, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %2, ptr @_llgo_int, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @_llgo_string, align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %5, ptr @_llgo_string, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare i32 @printf(ptr, ...)
|
||||
@@ -1,66 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define i64 @main.Foo(%"github.com/goplus/llgo/internal/runtime.String" %0) {
|
||||
_llgo_0:
|
||||
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %0, 1
|
||||
ret i64 %1
|
||||
}
|
||||
|
||||
define void @main.Test() {
|
||||
_llgo_0:
|
||||
br label %_llgo_3
|
||||
|
||||
_llgo_1: ; preds = %_llgo_3
|
||||
%0 = call i64 @main.Foo(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 })
|
||||
%1 = add i64 %3, %0
|
||||
%2 = add i64 %4, 1
|
||||
br label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_3
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
|
||||
_llgo_3: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = phi i64 [ 0, %_llgo_0 ], [ %1, %_llgo_1 ]
|
||||
%4 = phi i64 [ 0, %_llgo_0 ], [ %2, %_llgo_1 ]
|
||||
%5 = icmp slt i64 %4, 10000000
|
||||
br i1 %5, label %_llgo_1, label %_llgo_2
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @main.Test()
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
@@ -1,404 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
|
||||
@"github.com/goplus/llgo/internal/runtime.cgoAlwaysFalse" = external global i1, align 1
|
||||
@_cgo_62905c3ec377_Cfunc__Cmalloc = external global i8, align 1
|
||||
@_cgo_62905c3ec377_Cfunc_cos = external global i8, align 1
|
||||
@_cgo_62905c3ec377_Cfunc_free = external global i8, align 1
|
||||
@_cgo_62905c3ec377_Cfunc_log = external global i8, align 1
|
||||
@_cgo_62905c3ec377_Cfunc_puts = external global i8, align 1
|
||||
@_cgo_62905c3ec377_Cfunc_sin = external global i8, align 1
|
||||
@_cgo_62905c3ec377_Cfunc_sqrt = external global i8, align 1
|
||||
@main._cgo_62905c3ec377_Cfunc__Cmalloc = global ptr null, align 8
|
||||
@main._cgo_62905c3ec377_Cfunc_cos = global ptr null, align 8
|
||||
@main._cgo_62905c3ec377_Cfunc_free = global ptr null, align 8
|
||||
@main._cgo_62905c3ec377_Cfunc_log = global ptr null, align 8
|
||||
@main._cgo_62905c3ec377_Cfunc_puts = global ptr null, align 8
|
||||
@main._cgo_62905c3ec377_Cfunc_sin = global ptr null, align 8
|
||||
@main._cgo_62905c3ec377_Cfunc_sqrt = global ptr null, align 8
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [13 x i8] c"Hello, World!", align 1
|
||||
@1 = private unnamed_addr constant [29 x i8] c"Converted back to Go string: ", align 1
|
||||
@2 = private unnamed_addr constant [23 x i8] c"Length-limited string: ", align 1
|
||||
@3 = private unnamed_addr constant [33 x i8] c"Converted back to Go byte slice: ", align 1
|
||||
@_llgo_float64 = linkonce global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [14 x i8] c"sqrt(%v) = %v\0A", align 1
|
||||
@5 = private unnamed_addr constant [13 x i8] c"sin(%v) = %v\0A", align 1
|
||||
@6 = private unnamed_addr constant [13 x i8] c"cos(%v) = %v\0A", align 1
|
||||
@7 = private unnamed_addr constant [13 x i8] c"log(%v) = %v\0A", align 1
|
||||
@_llgo_byte = linkonce global ptr null, align 8
|
||||
@"[]_llgo_byte" = linkonce global ptr null, align 8
|
||||
@_llgo_Pointer = linkonce global ptr null, align 8
|
||||
|
||||
define double @main._Cfunc_cos(double %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%2 = load ptr, ptr @main._cgo_62905c3ec377_Cfunc_cos, align 8
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = call double %3(double %0)
|
||||
ret double %4
|
||||
}
|
||||
|
||||
define [0 x i8] @main._Cfunc_free(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%2 = load ptr, ptr @main._cgo_62905c3ec377_Cfunc_free, align 8
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = call [0 x i8] %3(ptr %0)
|
||||
ret [0 x i8] %4
|
||||
}
|
||||
|
||||
define double @main._Cfunc_log(double %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%2 = load ptr, ptr @main._cgo_62905c3ec377_Cfunc_log, align 8
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = call double %3(double %0)
|
||||
ret double %4
|
||||
}
|
||||
|
||||
define i32 @main._Cfunc_puts(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%2 = load ptr, ptr @main._cgo_62905c3ec377_Cfunc_puts, align 8
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = call i32 %3(ptr %0)
|
||||
ret i32 %4
|
||||
}
|
||||
|
||||
define double @main._Cfunc_sin(double %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%2 = load ptr, ptr @main._cgo_62905c3ec377_Cfunc_sin, align 8
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = call double %3(double %0)
|
||||
ret double %4
|
||||
}
|
||||
|
||||
define double @main._Cfunc_sqrt(double %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%2 = load ptr, ptr @main._cgo_62905c3ec377_Cfunc_sqrt, align 8
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = call double %3(double %0)
|
||||
ret double %4
|
||||
}
|
||||
|
||||
define ptr @main._Cgo_ptr(ptr %0) {
|
||||
_llgo_0:
|
||||
ret ptr %0
|
||||
}
|
||||
|
||||
declare void @runtime.cgoUse(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @runtime.cgoCheckResult(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @syscall.init()
|
||||
call void @fmt.init()
|
||||
call void @"main.init$after"()
|
||||
store ptr @_cgo_62905c3ec377_Cfunc_cos, ptr @main._cgo_62905c3ec377_Cfunc_cos, align 8
|
||||
store ptr @_cgo_62905c3ec377_Cfunc_free, ptr @main._cgo_62905c3ec377_Cfunc_free, align 8
|
||||
store ptr @_cgo_62905c3ec377_Cfunc_log, ptr @main._cgo_62905c3ec377_Cfunc_log, align 8
|
||||
store ptr @_cgo_62905c3ec377_Cfunc_puts, ptr @main._cgo_62905c3ec377_Cfunc_puts, align 8
|
||||
store ptr @_cgo_62905c3ec377_Cfunc_sin, ptr @main._cgo_62905c3ec377_Cfunc_sin, align 8
|
||||
store ptr @_cgo_62905c3ec377_Cfunc_sqrt, ptr @main._cgo_62905c3ec377_Cfunc_sqrt, align 8
|
||||
store ptr @_cgo_62905c3ec377_Cfunc__Cmalloc, ptr @main._cgo_62905c3ec377_Cfunc__Cmalloc, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.CString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 13 })
|
||||
store ptr %3, ptr %2, align 8
|
||||
%4 = load ptr, ptr %2, align 8
|
||||
%5 = call i32 @main._Cfunc_puts(ptr %4)
|
||||
%6 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 24)
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 4)
|
||||
%8 = getelementptr inbounds i8, ptr %7, i64 0
|
||||
store i8 65, ptr %8, align 1
|
||||
%9 = getelementptr inbounds i8, ptr %7, i64 1
|
||||
store i8 66, ptr %9, align 1
|
||||
%10 = getelementptr inbounds i8, ptr %7, i64 2
|
||||
store i8 67, ptr %10, align 1
|
||||
%11 = getelementptr inbounds i8, ptr %7, i64 3
|
||||
store i8 68, ptr %11, align 1
|
||||
%12 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %7, 0
|
||||
%13 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %12, i64 4, 1
|
||||
%14 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %13, i64 4, 2
|
||||
store %"github.com/goplus/llgo/internal/runtime.Slice" %14, ptr %6, align 8
|
||||
%15 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%16 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%17 = getelementptr inbounds { ptr }, ptr %16, i32 0, i32 0
|
||||
store ptr %6, ptr %17, align 8
|
||||
%18 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %16, 1
|
||||
%19 = extractvalue { ptr, ptr } %18, 1
|
||||
%20 = extractvalue { ptr, ptr } %18, 0
|
||||
%21 = call ptr %20(ptr %19)
|
||||
store ptr %21, ptr %15, align 8
|
||||
%22 = load ptr, ptr %2, align 8
|
||||
%23 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.GoString"(ptr %22)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 29 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %23)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%24 = load ptr, ptr %2, align 8
|
||||
%25 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.GoStringN"(ptr %24, i32 5)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 23 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %25)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%27 = getelementptr inbounds { ptr }, ptr %26, i32 0, i32 0
|
||||
store ptr %15, ptr %27, align 8
|
||||
%28 = insertvalue { ptr, ptr } { ptr @"main.main$2", ptr undef }, ptr %26, 1
|
||||
%29 = extractvalue { ptr, ptr } %28, 1
|
||||
%30 = extractvalue { ptr, ptr } %28, 0
|
||||
%31 = call %"github.com/goplus/llgo/internal/runtime.Slice" %30(ptr %29)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 33 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %31)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%32 = call double @main._Cfunc_sqrt(double 2.000000e+00)
|
||||
%33 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%34 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %33, i64 0
|
||||
%35 = load ptr, ptr @_llgo_float64, align 8
|
||||
%36 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %35, 0
|
||||
%37 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %36, ptr inttoptr (i64 4611686018427387904 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %37, ptr %34, align 8
|
||||
%38 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %33, i64 1
|
||||
%39 = load ptr, ptr @_llgo_float64, align 8
|
||||
%40 = bitcast double %32 to i64
|
||||
%41 = inttoptr i64 %40 to ptr
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %39, 0
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %42, ptr %41, 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %43, ptr %38, align 8
|
||||
%44 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %33, 0
|
||||
%45 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %44, i64 2, 1
|
||||
%46 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %45, i64 2, 2
|
||||
%47 = call { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 14 }, %"github.com/goplus/llgo/internal/runtime.Slice" %46)
|
||||
%48 = call double @main._Cfunc_sin(double 2.000000e+00)
|
||||
%49 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%50 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %49, i64 0
|
||||
%51 = load ptr, ptr @_llgo_float64, align 8
|
||||
%52 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %51, 0
|
||||
%53 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %52, ptr inttoptr (i64 4611686018427387904 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %53, ptr %50, align 8
|
||||
%54 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %49, i64 1
|
||||
%55 = load ptr, ptr @_llgo_float64, align 8
|
||||
%56 = bitcast double %48 to i64
|
||||
%57 = inttoptr i64 %56 to ptr
|
||||
%58 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %55, 0
|
||||
%59 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %58, ptr %57, 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %59, ptr %54, align 8
|
||||
%60 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %49, 0
|
||||
%61 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %60, i64 2, 1
|
||||
%62 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %61, i64 2, 2
|
||||
%63 = call { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 13 }, %"github.com/goplus/llgo/internal/runtime.Slice" %62)
|
||||
%64 = call double @main._Cfunc_cos(double 2.000000e+00)
|
||||
%65 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%66 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %65, i64 0
|
||||
%67 = load ptr, ptr @_llgo_float64, align 8
|
||||
%68 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %67, 0
|
||||
%69 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %68, ptr inttoptr (i64 4611686018427387904 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %69, ptr %66, align 8
|
||||
%70 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %65, i64 1
|
||||
%71 = load ptr, ptr @_llgo_float64, align 8
|
||||
%72 = bitcast double %64 to i64
|
||||
%73 = inttoptr i64 %72 to ptr
|
||||
%74 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %71, 0
|
||||
%75 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %74, ptr %73, 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %75, ptr %70, align 8
|
||||
%76 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %65, 0
|
||||
%77 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %76, i64 2, 1
|
||||
%78 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %77, i64 2, 2
|
||||
%79 = call { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 13 }, %"github.com/goplus/llgo/internal/runtime.Slice" %78)
|
||||
%80 = call double @main._Cfunc_log(double 2.000000e+00)
|
||||
%81 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%82 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %81, i64 0
|
||||
%83 = load ptr, ptr @_llgo_float64, align 8
|
||||
%84 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %83, 0
|
||||
%85 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %84, ptr inttoptr (i64 4611686018427387904 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %85, ptr %82, align 8
|
||||
%86 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %81, i64 1
|
||||
%87 = load ptr, ptr @_llgo_float64, align 8
|
||||
%88 = bitcast double %80 to i64
|
||||
%89 = inttoptr i64 %88 to ptr
|
||||
%90 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %87, 0
|
||||
%91 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %90, ptr %89, 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %91, ptr %86, align 8
|
||||
%92 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %81, 0
|
||||
%93 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %92, i64 2, 1
|
||||
%94 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %93, i64 2, 2
|
||||
%95 = call { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 13 }, %"github.com/goplus/llgo/internal/runtime.Slice" %94)
|
||||
%96 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%97 = getelementptr inbounds { ptr }, ptr %96, i32 0, i32 0
|
||||
store ptr %2, ptr %97, align 8
|
||||
%98 = insertvalue { ptr, ptr } { ptr @"main.main$3", ptr undef }, ptr %96, 1
|
||||
%99 = extractvalue { ptr, ptr } %98, 1
|
||||
%100 = extractvalue { ptr, ptr } %98, 0
|
||||
call void %100(ptr %99)
|
||||
%101 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%102 = getelementptr inbounds { ptr }, ptr %101, i32 0, i32 0
|
||||
store ptr %15, ptr %102, align 8
|
||||
%103 = insertvalue { ptr, ptr } { ptr @"main.main$4", ptr undef }, ptr %101, 1
|
||||
%104 = extractvalue { ptr, ptr } %103, 1
|
||||
%105 = extractvalue { ptr, ptr } %103, 0
|
||||
call void %105(ptr %104)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define ptr @"main.main$1"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { ptr }, ptr %0, align 8
|
||||
%2 = extractvalue { ptr } %1, 0
|
||||
%3 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %2, align 8
|
||||
%4 = load ptr, ptr @_llgo_byte, align 8
|
||||
%5 = load ptr, ptr @"[]_llgo_byte", align 8
|
||||
%6 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
store %"github.com/goplus/llgo/internal/runtime.Slice" %3, ptr %6, align 8
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %5, 0
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %7, ptr %6, 1
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.CBytes"(%"github.com/goplus/llgo/internal/runtime.Slice" %3)
|
||||
ret ptr %9
|
||||
}
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.Slice" @"main.main$2"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { ptr }, ptr %0, align 8
|
||||
%2 = extractvalue { ptr } %1, 0
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %4, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, ptr %3, 1
|
||||
%7 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.GoBytes"(ptr %3, i32 4)
|
||||
ret %"github.com/goplus/llgo/internal/runtime.Slice" %7
|
||||
}
|
||||
|
||||
define void @"main.main$3"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { ptr }, ptr %0, align 8
|
||||
%2 = extractvalue { ptr } %1, 0
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %4, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, ptr %3, 1
|
||||
%7 = call [0 x i8] @main._Cfunc_free(ptr %3)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.main$4"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { ptr }, ptr %0, align 8
|
||||
%2 = extractvalue { ptr } %1, 0
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %4, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, ptr %3, 1
|
||||
%7 = call [0 x i8] @main._Cfunc_free(ptr %3)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @runtime.throw(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @syscall.init()
|
||||
|
||||
declare void @fmt.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.CString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.GoString"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.GoStringN"(ptr, i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_float64, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 46)
|
||||
store ptr %2, ptr @_llgo_float64, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @_llgo_byte, align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
store ptr %5, ptr @_llgo_byte, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @"[]_llgo_byte", align 8
|
||||
%7 = icmp eq ptr %6, null
|
||||
br i1 %7, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr %8)
|
||||
store ptr %9, ptr @"[]_llgo_byte", align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%10 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%11 = icmp eq ptr %10, null
|
||||
br i1 %11, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%12 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %12)
|
||||
store ptr %12, ptr @_llgo_Pointer, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @fmt.Printf(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.CBytes"(%"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.GoBytes"(ptr, i64)
|
||||
@@ -1,88 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%main.T = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [3 x i8] c"env", align 1
|
||||
@1 = private unnamed_addr constant [4 x i8] c"func", align 1
|
||||
@2 = private unnamed_addr constant [7 x i8] c"closure", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 3 }, ptr %2, align 8
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%4 = getelementptr inbounds { ptr }, ptr %3, i32 0, i32 0
|
||||
store ptr %2, ptr %4, align 8
|
||||
%5 = insertvalue { ptr, ptr } { ptr @"main.main$2", ptr undef }, ptr %3, 1
|
||||
%6 = alloca %main.T, align 8
|
||||
store { ptr, ptr } %5, ptr %6, align 8
|
||||
%7 = load %main.T, ptr %6, align 8
|
||||
call void @"__llgo_stub.main.main$1"(ptr null, i64 100)
|
||||
%8 = extractvalue %main.T %7, 1
|
||||
%9 = extractvalue %main.T %7, 0
|
||||
call void %9(ptr %8, i64 200)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @"main.main$1"(i64 %0) {
|
||||
_llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %0)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.main$2"(ptr %0, i64 %1) {
|
||||
_llgo_0:
|
||||
%2 = load { ptr }, ptr %0, align 8
|
||||
%3 = extractvalue { ptr } %2, 0
|
||||
%4 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %3, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 7 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %1)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
define linkonce void @"__llgo_stub.main.main$1"(ptr %0, i64 %1) {
|
||||
_llgo_0:
|
||||
tail call void @"main.main$1"(i64 %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
@@ -1,44 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 1)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 1)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 11)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 11)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
@@ -1,649 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%main.T = type { i64, i64, %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.eface" }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%main.N = type {}
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [6 x i8] c"failed", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@1 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@2 = private unnamed_addr constant [2 x i8] c"ok", align 1
|
||||
@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8
|
||||
@3 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@_llgo_main.T = linkonce global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [1 x i8] c"T", align 1
|
||||
@_llgo_any = linkonce global ptr null, align 8
|
||||
@"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk" = linkonce global ptr null, align 8
|
||||
@5 = private unnamed_addr constant [1 x i8] c"X", align 1
|
||||
@6 = private unnamed_addr constant [1 x i8] c"Y", align 1
|
||||
@7 = private unnamed_addr constant [1 x i8] c"Z", align 1
|
||||
@8 = private unnamed_addr constant [1 x i8] c"V", align 1
|
||||
@_llgo_main.N = linkonce global ptr null, align 8
|
||||
@9 = private unnamed_addr constant [1 x i8] c"N", align 1
|
||||
@"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8
|
||||
@10 = private unnamed_addr constant [7 x i8] c"topbits", align 1
|
||||
@11 = private unnamed_addr constant [4 x i8] c"keys", align 1
|
||||
@12 = private unnamed_addr constant [5 x i8] c"elems", align 1
|
||||
@13 = private unnamed_addr constant [8 x i8] c"overflow", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define void @main.assert(i1 %0) {
|
||||
_llgo_0:
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%1 = load ptr, ptr @_llgo_string, align 8
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 6 }, ptr %2, align 8
|
||||
%3 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %1, 0
|
||||
%4 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %3, ptr %2, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %4)
|
||||
unreachable
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
call void @"main.init#1"()
|
||||
call void @"main.init#2"()
|
||||
call void @"main.init#3"()
|
||||
call void @"main.init#4"()
|
||||
call void @"main.init#5"()
|
||||
call void @"main.init#6"()
|
||||
call void @"main.init#7"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.init#1"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0
|
||||
store ptr %0, ptr %2, align 8
|
||||
%3 = insertvalue { ptr, ptr } { ptr @"main.init#1$2", ptr undef }, ptr %1, 1
|
||||
call void @main.assert(i1 true)
|
||||
call void @main.assert(i1 true)
|
||||
call void @main.assert(i1 true)
|
||||
call void @main.assert(i1 true)
|
||||
call void @main.assert(i1 true)
|
||||
call void @main.assert(i1 true)
|
||||
%4 = extractvalue { ptr, ptr } %3, 0
|
||||
%5 = icmp ne ptr %4, null
|
||||
call void @main.assert(i1 %5)
|
||||
%6 = extractvalue { ptr, ptr } %3, 0
|
||||
%7 = icmp ne ptr null, %6
|
||||
call void @main.assert(i1 %7)
|
||||
call void @main.assert(i1 true)
|
||||
call void @main.assert(i1 true)
|
||||
ret void
|
||||
}
|
||||
|
||||
define i64 @"main.init#1$1"(i64 %0, i64 %1) {
|
||||
_llgo_0:
|
||||
%2 = add i64 %0, %1
|
||||
ret i64 %2
|
||||
}
|
||||
|
||||
define void @"main.init#1$2"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { ptr }, ptr %0, align 8
|
||||
%2 = extractvalue { ptr } %1, 0
|
||||
%3 = load i64, ptr %2, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.init#2"() {
|
||||
_llgo_0:
|
||||
call void @main.assert(i1 true)
|
||||
%0 = alloca [3 x i64], align 8
|
||||
call void @llvm.memset(ptr %0, i8 0, i64 24, i1 false)
|
||||
%1 = getelementptr inbounds i64, ptr %0, i64 0
|
||||
%2 = getelementptr inbounds i64, ptr %0, i64 1
|
||||
%3 = getelementptr inbounds i64, ptr %0, i64 2
|
||||
store i64 1, ptr %1, align 4
|
||||
store i64 2, ptr %2, align 4
|
||||
store i64 3, ptr %3, align 4
|
||||
%4 = alloca [3 x i64], align 8
|
||||
call void @llvm.memset(ptr %4, i8 0, i64 24, i1 false)
|
||||
%5 = getelementptr inbounds i64, ptr %4, i64 0
|
||||
%6 = getelementptr inbounds i64, ptr %4, i64 1
|
||||
%7 = getelementptr inbounds i64, ptr %4, i64 2
|
||||
store i64 1, ptr %5, align 4
|
||||
store i64 2, ptr %6, align 4
|
||||
store i64 3, ptr %7, align 4
|
||||
%8 = load [3 x i64], ptr %0, align 4
|
||||
%9 = load [3 x i64], ptr %4, align 4
|
||||
%10 = extractvalue [3 x i64] %8, 0
|
||||
%11 = extractvalue [3 x i64] %9, 0
|
||||
%12 = icmp eq i64 %10, %11
|
||||
%13 = and i1 true, %12
|
||||
%14 = extractvalue [3 x i64] %8, 1
|
||||
%15 = extractvalue [3 x i64] %9, 1
|
||||
%16 = icmp eq i64 %14, %15
|
||||
%17 = and i1 %13, %16
|
||||
%18 = extractvalue [3 x i64] %8, 2
|
||||
%19 = extractvalue [3 x i64] %9, 2
|
||||
%20 = icmp eq i64 %18, %19
|
||||
%21 = and i1 %17, %20
|
||||
call void @main.assert(i1 %21)
|
||||
%22 = getelementptr inbounds i64, ptr %4, i64 1
|
||||
store i64 1, ptr %22, align 4
|
||||
%23 = load [3 x i64], ptr %0, align 4
|
||||
%24 = load [3 x i64], ptr %4, align 4
|
||||
%25 = extractvalue [3 x i64] %23, 0
|
||||
%26 = extractvalue [3 x i64] %24, 0
|
||||
%27 = icmp eq i64 %25, %26
|
||||
%28 = and i1 true, %27
|
||||
%29 = extractvalue [3 x i64] %23, 1
|
||||
%30 = extractvalue [3 x i64] %24, 1
|
||||
%31 = icmp eq i64 %29, %30
|
||||
%32 = and i1 %28, %31
|
||||
%33 = extractvalue [3 x i64] %23, 2
|
||||
%34 = extractvalue [3 x i64] %24, 2
|
||||
%35 = icmp eq i64 %33, %34
|
||||
%36 = and i1 %32, %35
|
||||
%37 = xor i1 %36, true
|
||||
call void @main.assert(i1 %37)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.init#3"() {
|
||||
_llgo_0:
|
||||
%0 = alloca %main.T, align 8
|
||||
call void @llvm.memset(ptr %0, i8 0, i64 48, i1 false)
|
||||
%1 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 0
|
||||
%2 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 1
|
||||
%3 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 2
|
||||
%4 = getelementptr inbounds %main.T, ptr %0, i32 0, i32 3
|
||||
store i64 10, ptr %1, align 4
|
||||
store i64 20, ptr %2, align 4
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, ptr %3, align 8
|
||||
%5 = load ptr, ptr @_llgo_int, align 8
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %5, 0
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %6, ptr inttoptr (i64 1 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %7, ptr %4, align 8
|
||||
%8 = alloca %main.T, align 8
|
||||
call void @llvm.memset(ptr %8, i8 0, i64 48, i1 false)
|
||||
%9 = getelementptr inbounds %main.T, ptr %8, i32 0, i32 0
|
||||
%10 = getelementptr inbounds %main.T, ptr %8, i32 0, i32 1
|
||||
%11 = getelementptr inbounds %main.T, ptr %8, i32 0, i32 2
|
||||
%12 = getelementptr inbounds %main.T, ptr %8, i32 0, i32 3
|
||||
store i64 10, ptr %9, align 4
|
||||
store i64 20, ptr %10, align 4
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, ptr %11, align 8
|
||||
%13 = load ptr, ptr @_llgo_int, align 8
|
||||
%14 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %13, 0
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %14, ptr inttoptr (i64 1 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %15, ptr %12, align 8
|
||||
%16 = alloca %main.T, align 8
|
||||
call void @llvm.memset(ptr %16, i8 0, i64 48, i1 false)
|
||||
%17 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 0
|
||||
%18 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 1
|
||||
%19 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 2
|
||||
%20 = getelementptr inbounds %main.T, ptr %16, i32 0, i32 3
|
||||
store i64 10, ptr %17, align 4
|
||||
store i64 20, ptr %18, align 4
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, ptr %19, align 8
|
||||
%21 = load ptr, ptr @_llgo_string, align 8
|
||||
%22 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 }, ptr %22, align 8
|
||||
%23 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %21, 0
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %23, ptr %22, 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %24, ptr %20, align 8
|
||||
call void @main.assert(i1 true)
|
||||
%25 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer)
|
||||
%26 = and i1 true, %25
|
||||
%27 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer)
|
||||
%28 = and i1 %26, %27
|
||||
call void @main.assert(i1 %28)
|
||||
%29 = load %main.T, ptr %0, align 8
|
||||
%30 = load %main.T, ptr %8, align 8
|
||||
%31 = extractvalue %main.T %29, 0
|
||||
%32 = extractvalue %main.T %30, 0
|
||||
%33 = icmp eq i64 %31, %32
|
||||
%34 = and i1 true, %33
|
||||
%35 = extractvalue %main.T %29, 1
|
||||
%36 = extractvalue %main.T %30, 1
|
||||
%37 = icmp eq i64 %35, %36
|
||||
%38 = and i1 %34, %37
|
||||
%39 = extractvalue %main.T %29, 2
|
||||
%40 = extractvalue %main.T %30, 2
|
||||
%41 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %39, %"github.com/goplus/llgo/internal/runtime.String" %40)
|
||||
%42 = and i1 %38, %41
|
||||
%43 = extractvalue %main.T %29, 3
|
||||
%44 = extractvalue %main.T %30, 3
|
||||
%45 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %43, %"github.com/goplus/llgo/internal/runtime.eface" %44)
|
||||
%46 = and i1 %42, %45
|
||||
call void @main.assert(i1 %46)
|
||||
%47 = load %main.T, ptr %0, align 8
|
||||
%48 = load %main.T, ptr %16, align 8
|
||||
%49 = extractvalue %main.T %47, 0
|
||||
%50 = extractvalue %main.T %48, 0
|
||||
%51 = icmp eq i64 %49, %50
|
||||
%52 = and i1 true, %51
|
||||
%53 = extractvalue %main.T %47, 1
|
||||
%54 = extractvalue %main.T %48, 1
|
||||
%55 = icmp eq i64 %53, %54
|
||||
%56 = and i1 %52, %55
|
||||
%57 = extractvalue %main.T %47, 2
|
||||
%58 = extractvalue %main.T %48, 2
|
||||
%59 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %57, %"github.com/goplus/llgo/internal/runtime.String" %58)
|
||||
%60 = and i1 %56, %59
|
||||
%61 = extractvalue %main.T %47, 3
|
||||
%62 = extractvalue %main.T %48, 3
|
||||
%63 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %61, %"github.com/goplus/llgo/internal/runtime.eface" %62)
|
||||
%64 = and i1 %60, %63
|
||||
%65 = xor i1 %64, true
|
||||
call void @main.assert(i1 %65)
|
||||
%66 = load %main.T, ptr %8, align 8
|
||||
%67 = load %main.T, ptr %16, align 8
|
||||
%68 = extractvalue %main.T %66, 0
|
||||
%69 = extractvalue %main.T %67, 0
|
||||
%70 = icmp eq i64 %68, %69
|
||||
%71 = and i1 true, %70
|
||||
%72 = extractvalue %main.T %66, 1
|
||||
%73 = extractvalue %main.T %67, 1
|
||||
%74 = icmp eq i64 %72, %73
|
||||
%75 = and i1 %71, %74
|
||||
%76 = extractvalue %main.T %66, 2
|
||||
%77 = extractvalue %main.T %67, 2
|
||||
%78 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %76, %"github.com/goplus/llgo/internal/runtime.String" %77)
|
||||
%79 = and i1 %75, %78
|
||||
%80 = extractvalue %main.T %66, 3
|
||||
%81 = extractvalue %main.T %67, 3
|
||||
%82 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %80, %"github.com/goplus/llgo/internal/runtime.eface" %81)
|
||||
%83 = and i1 %79, %82
|
||||
%84 = xor i1 %83, true
|
||||
call void @main.assert(i1 %84)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.init#4"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 24)
|
||||
%1 = getelementptr inbounds i64, ptr %0, i64 0
|
||||
store i64 1, ptr %1, align 4
|
||||
%2 = getelementptr inbounds i64, ptr %0, i64 1
|
||||
store i64 2, ptr %2, align 4
|
||||
%3 = getelementptr inbounds i64, ptr %0, i64 2
|
||||
store i64 3, ptr %3, align 4
|
||||
%4 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %0, 0
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %4, i64 3, 1
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %5, i64 3, 2
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
%8 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %7, i64 8, i64 2, i64 0, i64 2, i64 2)
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
%10 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %9, i64 8, i64 2, i64 0, i64 0, i64 2)
|
||||
call void @main.assert(i1 true)
|
||||
%11 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %6, 0
|
||||
%12 = icmp ne ptr %11, null
|
||||
call void @main.assert(i1 %12)
|
||||
%13 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, 0
|
||||
%14 = icmp ne ptr %13, null
|
||||
call void @main.assert(i1 %14)
|
||||
%15 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %10, 0
|
||||
%16 = icmp ne ptr %15, null
|
||||
call void @main.assert(i1 %16)
|
||||
call void @main.assert(i1 true)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.init#5"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_int, align 8
|
||||
%1 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %0, 0
|
||||
%2 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %1, ptr inttoptr (i64 100 to ptr), 1
|
||||
%3 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%4 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
store {} zeroinitializer, ptr %4, align 1
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %3, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, ptr %4, 1
|
||||
%7 = alloca %main.T, align 8
|
||||
call void @llvm.memset(ptr %7, i8 0, i64 48, i1 false)
|
||||
%8 = getelementptr inbounds %main.T, ptr %7, i32 0, i32 0
|
||||
%9 = getelementptr inbounds %main.T, ptr %7, i32 0, i32 1
|
||||
%10 = getelementptr inbounds %main.T, ptr %7, i32 0, i32 2
|
||||
%11 = getelementptr inbounds %main.T, ptr %7, i32 0, i32 3
|
||||
store i64 10, ptr %8, align 4
|
||||
store i64 20, ptr %9, align 4
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, ptr %10, align 8
|
||||
%12 = load ptr, ptr @_llgo_int, align 8
|
||||
%13 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %12, 0
|
||||
%14 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %13, ptr inttoptr (i64 1 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %14, ptr %11, align 8
|
||||
%15 = load %main.T, ptr %7, align 8
|
||||
%16 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
store %main.T %15, ptr %17, align 8
|
||||
%18 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %16, 0
|
||||
%19 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %18, ptr %17, 1
|
||||
%20 = alloca %main.T, align 8
|
||||
call void @llvm.memset(ptr %20, i8 0, i64 48, i1 false)
|
||||
%21 = getelementptr inbounds %main.T, ptr %20, i32 0, i32 0
|
||||
%22 = getelementptr inbounds %main.T, ptr %20, i32 0, i32 1
|
||||
%23 = getelementptr inbounds %main.T, ptr %20, i32 0, i32 2
|
||||
%24 = getelementptr inbounds %main.T, ptr %20, i32 0, i32 3
|
||||
store i64 10, ptr %21, align 4
|
||||
store i64 20, ptr %22, align 4
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, ptr %23, align 8
|
||||
%25 = load ptr, ptr @_llgo_int, align 8
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %25, 0
|
||||
%27 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %26, ptr inttoptr (i64 1 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %27, ptr %24, align 8
|
||||
%28 = alloca %main.T, align 8
|
||||
call void @llvm.memset(ptr %28, i8 0, i64 48, i1 false)
|
||||
%29 = getelementptr inbounds %main.T, ptr %28, i32 0, i32 0
|
||||
%30 = getelementptr inbounds %main.T, ptr %28, i32 0, i32 1
|
||||
%31 = getelementptr inbounds %main.T, ptr %28, i32 0, i32 2
|
||||
%32 = getelementptr inbounds %main.T, ptr %28, i32 0, i32 3
|
||||
store i64 10, ptr %29, align 4
|
||||
store i64 20, ptr %30, align 4
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, ptr %31, align 8
|
||||
%33 = load ptr, ptr @_llgo_string, align 8
|
||||
%34 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 }, ptr %34, align 8
|
||||
%35 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %33, 0
|
||||
%36 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %35, ptr %34, 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %36, ptr %32, align 8
|
||||
%37 = load ptr, ptr @_llgo_int, align 8
|
||||
%38 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %37, 0
|
||||
%39 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %38, ptr inttoptr (i64 100 to ptr), 1
|
||||
%40 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %2, %"github.com/goplus/llgo/internal/runtime.eface" %39)
|
||||
call void @main.assert(i1 %40)
|
||||
%41 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%42 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
store {} zeroinitializer, ptr %42, align 1
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %41, 0
|
||||
%44 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %43, ptr %42, 1
|
||||
%45 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %6, %"github.com/goplus/llgo/internal/runtime.eface" %44)
|
||||
call void @main.assert(i1 %45)
|
||||
%46 = load ptr, ptr @_llgo_main.N, align 8
|
||||
%47 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
store %main.N zeroinitializer, ptr %47, align 1
|
||||
%48 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %46, 0
|
||||
%49 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %48, ptr %47, 1
|
||||
%50 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %6, %"github.com/goplus/llgo/internal/runtime.eface" %49)
|
||||
%51 = xor i1 %50, true
|
||||
call void @main.assert(i1 %51)
|
||||
%52 = load %main.T, ptr %20, align 8
|
||||
%53 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%54 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
store %main.T %52, ptr %54, align 8
|
||||
%55 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %53, 0
|
||||
%56 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %55, ptr %54, 1
|
||||
%57 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %19, %"github.com/goplus/llgo/internal/runtime.eface" %56)
|
||||
call void @main.assert(i1 %57)
|
||||
%58 = load %main.T, ptr %28, align 8
|
||||
%59 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%60 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
store %main.T %58, ptr %60, align 8
|
||||
%61 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %59, 0
|
||||
%62 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %61, ptr %60, 1
|
||||
%63 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %19, %"github.com/goplus/llgo/internal/runtime.eface" %62)
|
||||
%64 = xor i1 %63, true
|
||||
call void @main.assert(i1 %64)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.init#6"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64 8, i64 0)
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64 8, i64 0)
|
||||
%2 = icmp eq ptr %0, %0
|
||||
call void @main.assert(i1 %2)
|
||||
%3 = icmp ne ptr %0, %1
|
||||
call void @main.assert(i1 %3)
|
||||
%4 = icmp ne ptr %0, null
|
||||
call void @main.assert(i1 %4)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.init#7"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.MakeMap"(ptr %0, i64 0)
|
||||
%2 = icmp ne ptr %1, null
|
||||
call void @main.assert(i1 %2)
|
||||
call void @main.assert(i1 true)
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @main.test() {
|
||||
_llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_string, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %2, ptr @_llgo_string, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @_llgo_int, align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %5, ptr @_llgo_int, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%7 = icmp eq ptr %6, null
|
||||
br i1 %7, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %8, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, i64 0, 1
|
||||
%11 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %10, i64 0, 2
|
||||
%12 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, i64 0, %"github.com/goplus/llgo/internal/runtime.Slice" %11)
|
||||
store ptr %12, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%13 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 1 }, i64 25, i64 48, i64 0, i64 0)
|
||||
%14 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%15 = icmp eq ptr %14, null
|
||||
br i1 %15, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
store ptr %13, ptr @_llgo_main.T, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%16 = load ptr, ptr @_llgo_any, align 8
|
||||
%17 = icmp eq ptr %16, null
|
||||
br i1 %17, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%18 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%19 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %18, 0
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %19, i64 0, 1
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %20, i64 0, 2
|
||||
%22 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %21)
|
||||
store ptr %22, ptr @_llgo_any, align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
||||
%23 = load ptr, ptr @_llgo_any, align 8
|
||||
%24 = load ptr, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
|
||||
%25 = icmp eq ptr %24, null
|
||||
br i1 %25, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%27 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 1 }, ptr %26, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%28 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%29 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 1 }, ptr %28, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%30 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%31 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 1 }, ptr %30, i64 16, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%33 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %32, 0
|
||||
%34 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %33, i64 0, 1
|
||||
%35 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %34, i64 0, 2
|
||||
%36 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %35)
|
||||
%37 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 1 }, ptr %36, i64 32, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%38 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 224)
|
||||
%39 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %38, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %27, ptr %39, align 8
|
||||
%40 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %38, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %29, ptr %40, align 8
|
||||
%41 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %38, i64 2
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %31, ptr %41, align 8
|
||||
%42 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %38, i64 3
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %37, ptr %42, align 8
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %38, 0
|
||||
%44 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %43, i64 4, 1
|
||||
%45 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %44, i64 4, 2
|
||||
%46 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, i64 48, %"github.com/goplus/llgo/internal/runtime.Slice" %45)
|
||||
store ptr %46, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
||||
%47 = load ptr, ptr @"_llgo_struct$5D_KhR3tDEp-wpx9caTiVZca43wS-XW6slE9Bsr8rsk", align 8
|
||||
br i1 %15, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %13, ptr %47, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
%48 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @9, i64 1 }, i64 25, i64 0, i64 0, i64 0)
|
||||
%49 = load ptr, ptr @_llgo_main.N, align 8
|
||||
%50 = icmp eq ptr %49, null
|
||||
br i1 %50, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_15: ; preds = %_llgo_14
|
||||
store ptr %48, ptr @_llgo_main.N, align 8
|
||||
br label %_llgo_16
|
||||
|
||||
_llgo_16: ; preds = %_llgo_15, %_llgo_14
|
||||
%51 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %50, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_17: ; preds = %_llgo_16
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %48, ptr %51, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_18
|
||||
|
||||
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
||||
%52 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
%53 = icmp eq ptr %52, null
|
||||
br i1 %53, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
%54 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%55 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%56 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
%57 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %56)
|
||||
%58 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @10, i64 7 }, ptr %57, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%59 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%60 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %59)
|
||||
%61 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @11, i64 4 }, ptr %60, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%62 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%63 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %62)
|
||||
%64 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @12, i64 5 }, ptr %63, i64 72, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%65 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
%66 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @13, i64 8 }, ptr %65, i64 200, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%67 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 224)
|
||||
%68 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %67, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %58, ptr %68, align 8
|
||||
%69 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %67, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %61, ptr %69, align 8
|
||||
%70 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %67, i64 2
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %64, ptr %70, align 8
|
||||
%71 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %67, i64 3
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %66, ptr %71, align 8
|
||||
%72 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %67, 0
|
||||
%73 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %72, i64 4, 1
|
||||
%74 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %73, i64 4, 2
|
||||
%75 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, i64 208, %"github.com/goplus/llgo/internal/runtime.Slice" %74)
|
||||
%76 = call ptr @"github.com/goplus/llgo/internal/runtime.MapOf"(ptr %54, ptr %55, ptr %75, i64 4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %76)
|
||||
store ptr %76, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
br label %_llgo_20
|
||||
|
||||
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface", %"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr, i64, i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MapOf"(ptr, ptr, ptr, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64, ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MakeMap"(ptr, i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
@@ -1,202 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%main.errorString = type { %"github.com/goplus/llgo/internal/runtime.String" }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@_llgo_main.errorString = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@1 = private unnamed_addr constant [11 x i8] c"errorString", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ" = linkonce global ptr null, align 8
|
||||
@2 = private unnamed_addr constant [1 x i8] c"s", align 1
|
||||
@3 = private unnamed_addr constant [5 x i8] c"Error", align 1
|
||||
@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8
|
||||
@"*_llgo_main.errorString" = linkonce global ptr null, align 8
|
||||
@"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU" = linkonce global ptr null, align 8
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [8 x i8] c"an error", align 1
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.iface" @main.New(%"github.com/goplus/llgo/internal/runtime.String" %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
%2 = getelementptr inbounds %main.errorString, ptr %1, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" %0, ptr %2, align 8
|
||||
%3 = load ptr, ptr @_llgo_main.errorString, align 8
|
||||
%4 = load ptr, ptr @"*_llgo_main.errorString", align 8
|
||||
%5 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%6 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %6, ptr %4)
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %7, 0
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %8, ptr %1, 1
|
||||
ret %"github.com/goplus/llgo/internal/runtime.iface" %9
|
||||
}
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.String" @"main.(*errorString).Error"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = getelementptr inbounds %main.errorString, ptr %0, i32 0, i32 0
|
||||
%2 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %1, align 8
|
||||
ret %"github.com/goplus/llgo/internal/runtime.String" %2
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call %"github.com/goplus/llgo/internal/runtime.iface" @main.New(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 8 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface" %2)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %2)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %2, 0
|
||||
%5 = getelementptr ptr, ptr %4, i64 3
|
||||
%6 = load ptr, ptr %5, align 8
|
||||
%7 = insertvalue { ptr, ptr } undef, ptr %6, 0
|
||||
%8 = insertvalue { ptr, ptr } %7, ptr %3, 1
|
||||
%9 = extractvalue { ptr, ptr } %8, 1
|
||||
%10 = extractvalue { ptr, ptr } %8, 0
|
||||
%11 = call %"github.com/goplus/llgo/internal/runtime.String" %10(ptr %9)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %11)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 11 }, i64 25, i64 16, i64 0, i64 1)
|
||||
store ptr %0, ptr @_llgo_main.errorString, align 8
|
||||
%1 = load ptr, ptr @_llgo_string, align 8
|
||||
%2 = icmp eq ptr %1, null
|
||||
br i1 %2, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %3, ptr @_llgo_string, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%4 = load ptr, ptr @_llgo_string, align 8
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%6 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 1 }, ptr %5, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56)
|
||||
%8 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %7, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %6, ptr %8, align 8
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %7, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, i64 1, 1
|
||||
%11 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %10, i64 1, 2
|
||||
%12 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %11)
|
||||
store ptr %12, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
|
||||
%13 = load ptr, ptr @"main.struct$QTufDJA9wEDzuzgkA-ZSrLqW-B6lWN8O25mTSglAoLQ", align 8
|
||||
%14 = load ptr, ptr @_llgo_string, align 8
|
||||
%15 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%16 = icmp eq ptr %15, null
|
||||
br i1 %16, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%18 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %17, 0
|
||||
%19 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %18, i64 0, 1
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %19, i64 0, 2
|
||||
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%22 = getelementptr ptr, ptr %21, i64 0
|
||||
store ptr %14, ptr %22, align 8
|
||||
%23 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %21, 0
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %23, i64 1, 1
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %24, i64 1, 2
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %20, %"github.com/goplus/llgo/internal/runtime.Slice" %25, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %26)
|
||||
store ptr %26, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%27 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 5 }, ptr undef, ptr undef, ptr undef }, ptr %27, 1
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %28, ptr @"main.(*errorString).Error", 2
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %29, ptr @"main.(*errorString).Error", 3
|
||||
%31 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%32 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %31, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %30, ptr %32, align 8
|
||||
%33 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %31, 0
|
||||
%34 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %33, i64 1, 1
|
||||
%35 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %34, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, ptr %13, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %35)
|
||||
%36 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 11 }, i64 25, i64 16, i64 0, i64 1)
|
||||
%37 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %36)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %37)
|
||||
store ptr %37, ptr @"*_llgo_main.errorString", align 8
|
||||
%38 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%39 = load ptr, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
|
||||
%40 = icmp eq ptr %39, null
|
||||
br i1 %40, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%41 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 5 }, ptr undef }, ptr %38, 1
|
||||
%42 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
%43 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %42, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %41, ptr %43, align 8
|
||||
%44 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %42, 0
|
||||
%45 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %44, i64 1, 1
|
||||
%46 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %45, i64 1, 2
|
||||
%47 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %46)
|
||||
store ptr %47, ptr @"_llgo_iface$Fh8eUJ-Gw4e6TYuajcFIOSCuqSPKAt5nS4ow7xeGXEU", align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr, ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
@@ -1,110 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
@1 = private unnamed_addr constant [16 x i8] c"Hello, goroutine", align 1
|
||||
@2 = private unnamed_addr constant [1 x i8] c".", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 1)
|
||||
store i1 false, ptr %2, align 1
|
||||
%3 = call ptr @malloc(i64 16)
|
||||
%4 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.String" }, ptr %3, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %4, align 8
|
||||
%5 = alloca i8, i64 8, align 1
|
||||
%6 = call i32 @"github.com/goplus/llgo/internal/runtime.CreateThread"(ptr %5, ptr null, ptr @"main._llgo_routine$1", ptr %3)
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%8 = getelementptr inbounds { ptr }, ptr %7, i32 0, i32 0
|
||||
store ptr %2, ptr %8, align 8
|
||||
%9 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %7, 1
|
||||
%10 = call ptr @malloc(i64 32)
|
||||
%11 = getelementptr inbounds { { ptr, ptr }, %"github.com/goplus/llgo/internal/runtime.String" }, ptr %10, i32 0, i32 0
|
||||
store { ptr, ptr } %9, ptr %11, align 8
|
||||
%12 = getelementptr inbounds { { ptr, ptr }, %"github.com/goplus/llgo/internal/runtime.String" }, ptr %10, i32 0, i32 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 16 }, ptr %12, align 8
|
||||
%13 = alloca i8, i64 8, align 1
|
||||
%14 = call i32 @"github.com/goplus/llgo/internal/runtime.CreateThread"(ptr %13, ptr null, ptr @"main._llgo_routine$2", ptr %10)
|
||||
br label %_llgo_3
|
||||
|
||||
_llgo_1: ; preds = %_llgo_3
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 1 })
|
||||
br label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_3
|
||||
ret i32 0
|
||||
|
||||
_llgo_3: ; preds = %_llgo_1, %_llgo_0
|
||||
%15 = load i1, ptr %2, align 1
|
||||
br i1 %15, label %_llgo_2, label %_llgo_1
|
||||
}
|
||||
|
||||
define void @"main.main$1"(ptr %0, %"github.com/goplus/llgo/internal/runtime.String" %1) {
|
||||
_llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %1)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%2 = load { ptr }, ptr %0, align 8
|
||||
%3 = extractvalue { ptr } %2, 0
|
||||
store i1 true, ptr %3, align 1
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare ptr @malloc(i64)
|
||||
|
||||
define ptr @"main._llgo_routine$1"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { %"github.com/goplus/llgo/internal/runtime.String" }, ptr %0, align 8
|
||||
%2 = extractvalue { %"github.com/goplus/llgo/internal/runtime.String" } %1, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %2)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @free(ptr %0)
|
||||
ret ptr null
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @free(ptr)
|
||||
|
||||
declare i32 @"github.com/goplus/llgo/internal/runtime.CreateThread"(ptr, ptr, ptr, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
define ptr @"main._llgo_routine$2"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { { ptr, ptr }, %"github.com/goplus/llgo/internal/runtime.String" }, ptr %0, align 8
|
||||
%2 = extractvalue { { ptr, ptr }, %"github.com/goplus/llgo/internal/runtime.String" } %1, 0
|
||||
%3 = extractvalue { { ptr, ptr }, %"github.com/goplus/llgo/internal/runtime.String" } %1, 1
|
||||
%4 = extractvalue { ptr, ptr } %2, 1
|
||||
%5 = extractvalue { ptr, ptr } %2, 0
|
||||
call void %5(ptr %4, %"github.com/goplus/llgo/internal/runtime.String" %3)
|
||||
call void @free(ptr %0)
|
||||
ret ptr null
|
||||
}
|
||||
@@ -1,740 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%main.C1 = type {}
|
||||
%main.C2 = type {}
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@_llgo_main.I0 = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@1 = private unnamed_addr constant [2 x i8] c"I0", align 1
|
||||
@2 = private unnamed_addr constant [21 x i8] c"nil i0.(I0) succeeded", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@_llgo_main.I1 = linkonce global ptr null, align 8
|
||||
@3 = private unnamed_addr constant [2 x i8] c"I1", align 1
|
||||
@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [6 x i8] c"main.f", align 1
|
||||
@"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4" = linkonce global ptr null, align 8
|
||||
@5 = private unnamed_addr constant [21 x i8] c"nil i1.(I1) succeeded", align 1
|
||||
@_llgo_main.I2 = linkonce global ptr null, align 8
|
||||
@6 = private unnamed_addr constant [2 x i8] c"I2", align 1
|
||||
@7 = private unnamed_addr constant [6 x i8] c"main.g", align 1
|
||||
@"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw" = linkonce global ptr null, align 8
|
||||
@8 = private unnamed_addr constant [21 x i8] c"nil i2.(I2) succeeded", align 1
|
||||
@_llgo_main.C1 = linkonce global ptr null, align 8
|
||||
@9 = private unnamed_addr constant [2 x i8] c"C1", align 1
|
||||
@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8
|
||||
@10 = private unnamed_addr constant [1 x i8] c"f", align 1
|
||||
@11 = private unnamed_addr constant [17 x i8] c"C1 i1.(I0) failed", align 1
|
||||
@12 = private unnamed_addr constant [17 x i8] c"C1 i1.(I1) failed", align 1
|
||||
@13 = private unnamed_addr constant [20 x i8] c"C1 i1.(I2) succeeded", align 1
|
||||
@_llgo_main.C2 = linkonce global ptr null, align 8
|
||||
@14 = private unnamed_addr constant [2 x i8] c"C2", align 1
|
||||
@15 = private unnamed_addr constant [1 x i8] c"g", align 1
|
||||
@16 = private unnamed_addr constant [17 x i8] c"C2 i1.(I0) failed", align 1
|
||||
@17 = private unnamed_addr constant [17 x i8] c"C2 i1.(I1) failed", align 1
|
||||
@18 = private unnamed_addr constant [17 x i8] c"C2 i1.(I2) failed", align 1
|
||||
@19 = private unnamed_addr constant [17 x i8] c"C1 I0(i1) was nil", align 1
|
||||
@20 = private unnamed_addr constant [17 x i8] c"C1 I1(i1) was nil", align 1
|
||||
@21 = private unnamed_addr constant [4 x i8] c"pass", align 1
|
||||
|
||||
define void @main.C1.f(%main.C1 %0) {
|
||||
_llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.(*C1).f"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load %main.C1, ptr %0, align 1
|
||||
call void @main.C1.f(%main.C1 %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.C2.f(%main.C2 %0) {
|
||||
_llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.C2.g(%main.C2 %0) {
|
||||
_llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.(*C2).f"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load %main.C2, ptr %0, align 1
|
||||
call void @main.C2.f(%main.C2 %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.(*C2).g"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load %main.C2, ptr %0, align 1
|
||||
call void @main.C2.g(%main.C2 %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = load ptr, ptr @_llgo_main.I0, align 8
|
||||
%3 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %2, ptr null)
|
||||
br i1 %3, label %_llgo_23, label %_llgo_24
|
||||
|
||||
_llgo_1: ; preds = %_llgo_25
|
||||
%4 = load ptr, ptr @_llgo_string, align 8
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 21 }, ptr %5, align 8
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %4, 0
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %6, ptr %5, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %7)
|
||||
unreachable
|
||||
|
||||
_llgo_2: ; preds = %_llgo_25
|
||||
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
%9 = load ptr, ptr @_llgo_main.I1, align 8
|
||||
%10 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %9, ptr %8)
|
||||
br i1 %10, label %_llgo_26, label %_llgo_27
|
||||
|
||||
_llgo_3: ; preds = %_llgo_28
|
||||
%11 = load ptr, ptr @_llgo_string, align 8
|
||||
%12 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 21 }, ptr %12, align 8
|
||||
%13 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %11, 0
|
||||
%14 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %13, ptr %12, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %14)
|
||||
unreachable
|
||||
|
||||
_llgo_4: ; preds = %_llgo_28
|
||||
%15 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
%16 = load ptr, ptr @_llgo_main.I2, align 8
|
||||
%17 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %16, ptr %15)
|
||||
br i1 %17, label %_llgo_29, label %_llgo_30
|
||||
|
||||
_llgo_5: ; preds = %_llgo_31
|
||||
%18 = load ptr, ptr @_llgo_string, align 8
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 21 }, ptr %19, align 8
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %18, 0
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %20, ptr %19, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %21)
|
||||
unreachable
|
||||
|
||||
_llgo_6: ; preds = %_llgo_31
|
||||
%22 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
%23 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %22, 0
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %23, ptr null, 1
|
||||
%25 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %25, 0
|
||||
%27 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %26, ptr null, 1
|
||||
%28 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
%29 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
|
||||
%30 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %29, ptr %28)
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %30, 0
|
||||
%32 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %31, ptr null, 1
|
||||
%33 = load ptr, ptr @_llgo_main.C1, align 8
|
||||
%34 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
store %main.C1 zeroinitializer, ptr %34, align 1
|
||||
%35 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
|
||||
%36 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %35, ptr %33)
|
||||
%37 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %36, 0
|
||||
%38 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %37, ptr %34, 1
|
||||
%39 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %38)
|
||||
%40 = load ptr, ptr @_llgo_main.I0, align 8
|
||||
%41 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %40, ptr %39)
|
||||
br i1 %41, label %_llgo_32, label %_llgo_33
|
||||
|
||||
_llgo_7: ; preds = %_llgo_34
|
||||
%42 = load ptr, ptr @_llgo_string, align 8
|
||||
%43 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @11, i64 17 }, ptr %43, align 8
|
||||
%44 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %42, 0
|
||||
%45 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %44, ptr %43, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %45)
|
||||
unreachable
|
||||
|
||||
_llgo_8: ; preds = %_llgo_34
|
||||
%46 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %38)
|
||||
%47 = load ptr, ptr @_llgo_main.I1, align 8
|
||||
%48 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %47, ptr %46)
|
||||
br i1 %48, label %_llgo_35, label %_llgo_36
|
||||
|
||||
_llgo_9: ; preds = %_llgo_37
|
||||
%49 = load ptr, ptr @_llgo_string, align 8
|
||||
%50 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @12, i64 17 }, ptr %50, align 8
|
||||
%51 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %49, 0
|
||||
%52 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %51, ptr %50, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %52)
|
||||
unreachable
|
||||
|
||||
_llgo_10: ; preds = %_llgo_37
|
||||
%53 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %38)
|
||||
%54 = load ptr, ptr @_llgo_main.I2, align 8
|
||||
%55 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %54, ptr %53)
|
||||
br i1 %55, label %_llgo_38, label %_llgo_39
|
||||
|
||||
_llgo_11: ; preds = %_llgo_40
|
||||
%56 = load ptr, ptr @_llgo_string, align 8
|
||||
%57 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @13, i64 20 }, ptr %57, align 8
|
||||
%58 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %56, 0
|
||||
%59 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %58, ptr %57, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %59)
|
||||
unreachable
|
||||
|
||||
_llgo_12: ; preds = %_llgo_40
|
||||
%60 = load ptr, ptr @_llgo_main.C2, align 8
|
||||
%61 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
store %main.C2 zeroinitializer, ptr %61, align 1
|
||||
%62 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
|
||||
%63 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %62, ptr %60)
|
||||
%64 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %63, 0
|
||||
%65 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %64, ptr %61, 1
|
||||
%66 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %65)
|
||||
%67 = load ptr, ptr @_llgo_main.I0, align 8
|
||||
%68 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %67, ptr %66)
|
||||
br i1 %68, label %_llgo_41, label %_llgo_42
|
||||
|
||||
_llgo_13: ; preds = %_llgo_43
|
||||
%69 = load ptr, ptr @_llgo_string, align 8
|
||||
%70 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @16, i64 17 }, ptr %70, align 8
|
||||
%71 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %69, 0
|
||||
%72 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %71, ptr %70, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %72)
|
||||
unreachable
|
||||
|
||||
_llgo_14: ; preds = %_llgo_43
|
||||
%73 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %65)
|
||||
%74 = load ptr, ptr @_llgo_main.I1, align 8
|
||||
%75 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %74, ptr %73)
|
||||
br i1 %75, label %_llgo_44, label %_llgo_45
|
||||
|
||||
_llgo_15: ; preds = %_llgo_46
|
||||
%76 = load ptr, ptr @_llgo_string, align 8
|
||||
%77 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @17, i64 17 }, ptr %77, align 8
|
||||
%78 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %76, 0
|
||||
%79 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %78, ptr %77, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %79)
|
||||
unreachable
|
||||
|
||||
_llgo_16: ; preds = %_llgo_46
|
||||
%80 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %65)
|
||||
%81 = load ptr, ptr @_llgo_main.I2, align 8
|
||||
%82 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %81, ptr %80)
|
||||
br i1 %82, label %_llgo_47, label %_llgo_48
|
||||
|
||||
_llgo_17: ; preds = %_llgo_49
|
||||
%83 = load ptr, ptr @_llgo_string, align 8
|
||||
%84 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @18, i64 17 }, ptr %84, align 8
|
||||
%85 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %83, 0
|
||||
%86 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %85, ptr %84, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %86)
|
||||
unreachable
|
||||
|
||||
_llgo_18: ; preds = %_llgo_49
|
||||
%87 = load ptr, ptr @_llgo_main.C1, align 8
|
||||
%88 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
store %main.C1 zeroinitializer, ptr %88, align 1
|
||||
%89 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
|
||||
%90 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %89, ptr %87)
|
||||
%91 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %90, 0
|
||||
%92 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %91, ptr %88, 1
|
||||
%93 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %92)
|
||||
%94 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %92, 1
|
||||
%95 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %93, 0
|
||||
%96 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %95, ptr %94, 1
|
||||
%97 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %96, %"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer)
|
||||
br i1 %97, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
%98 = load ptr, ptr @_llgo_string, align 8
|
||||
%99 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @19, i64 17 }, ptr %99, align 8
|
||||
%100 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %98, 0
|
||||
%101 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %100, ptr %99, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %101)
|
||||
unreachable
|
||||
|
||||
_llgo_20: ; preds = %_llgo_18
|
||||
%102 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %92)
|
||||
%103 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %92, 1
|
||||
%104 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %102, 0
|
||||
%105 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %104, ptr %103, 1
|
||||
%106 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
%107 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %106, 0
|
||||
%108 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %107, ptr null, 1
|
||||
%109 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %105, %"github.com/goplus/llgo/internal/runtime.eface" %108)
|
||||
br i1 %109, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_21: ; preds = %_llgo_20
|
||||
%110 = load ptr, ptr @_llgo_string, align 8
|
||||
%111 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @20, i64 17 }, ptr %111, align 8
|
||||
%112 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %110, 0
|
||||
%113 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %112, ptr %111, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %113)
|
||||
unreachable
|
||||
|
||||
_llgo_22: ; preds = %_llgo_20
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @21, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
|
||||
_llgo_23: ; preds = %_llgo_0
|
||||
br label %_llgo_25
|
||||
|
||||
_llgo_24: ; preds = %_llgo_0
|
||||
br label %_llgo_25
|
||||
|
||||
_llgo_25: ; preds = %_llgo_24, %_llgo_23
|
||||
%114 = phi { %"github.com/goplus/llgo/internal/runtime.eface", i1 } [ { %"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer, i1 true }, %_llgo_23 ], [ zeroinitializer, %_llgo_24 ]
|
||||
%115 = extractvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } %114, 0
|
||||
%116 = extractvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } %114, 1
|
||||
br i1 %116, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_26: ; preds = %_llgo_2
|
||||
%117 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
|
||||
%118 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %117, ptr %8)
|
||||
%119 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %118, 0
|
||||
%120 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %119, ptr null, 1
|
||||
%121 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.iface" %120, 0
|
||||
%122 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %121, i1 true, 1
|
||||
br label %_llgo_28
|
||||
|
||||
_llgo_27: ; preds = %_llgo_2
|
||||
br label %_llgo_28
|
||||
|
||||
_llgo_28: ; preds = %_llgo_27, %_llgo_26
|
||||
%123 = phi { %"github.com/goplus/llgo/internal/runtime.iface", i1 } [ %122, %_llgo_26 ], [ zeroinitializer, %_llgo_27 ]
|
||||
%124 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %123, 0
|
||||
%125 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %123, 1
|
||||
br i1 %125, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_29: ; preds = %_llgo_4
|
||||
%126 = load ptr, ptr @"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
|
||||
%127 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %126, ptr %15)
|
||||
%128 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %127, 0
|
||||
%129 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %128, ptr null, 1
|
||||
%130 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.iface" %129, 0
|
||||
%131 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %130, i1 true, 1
|
||||
br label %_llgo_31
|
||||
|
||||
_llgo_30: ; preds = %_llgo_4
|
||||
br label %_llgo_31
|
||||
|
||||
_llgo_31: ; preds = %_llgo_30, %_llgo_29
|
||||
%132 = phi { %"github.com/goplus/llgo/internal/runtime.iface", i1 } [ %131, %_llgo_29 ], [ zeroinitializer, %_llgo_30 ]
|
||||
%133 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %132, 0
|
||||
%134 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %132, 1
|
||||
br i1 %134, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_32: ; preds = %_llgo_6
|
||||
%135 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %38, 1
|
||||
%136 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %39, 0
|
||||
%137 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %136, ptr %135, 1
|
||||
%138 = insertvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.eface" %137, 0
|
||||
%139 = insertvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } %138, i1 true, 1
|
||||
br label %_llgo_34
|
||||
|
||||
_llgo_33: ; preds = %_llgo_6
|
||||
br label %_llgo_34
|
||||
|
||||
_llgo_34: ; preds = %_llgo_33, %_llgo_32
|
||||
%140 = phi { %"github.com/goplus/llgo/internal/runtime.eface", i1 } [ %139, %_llgo_32 ], [ zeroinitializer, %_llgo_33 ]
|
||||
%141 = extractvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } %140, 0
|
||||
%142 = extractvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } %140, 1
|
||||
br i1 %142, label %_llgo_8, label %_llgo_7
|
||||
|
||||
_llgo_35: ; preds = %_llgo_8
|
||||
%143 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %38, 1
|
||||
%144 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
|
||||
%145 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %144, ptr %46)
|
||||
%146 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %145, 0
|
||||
%147 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %146, ptr %143, 1
|
||||
%148 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.iface" %147, 0
|
||||
%149 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %148, i1 true, 1
|
||||
br label %_llgo_37
|
||||
|
||||
_llgo_36: ; preds = %_llgo_8
|
||||
br label %_llgo_37
|
||||
|
||||
_llgo_37: ; preds = %_llgo_36, %_llgo_35
|
||||
%150 = phi { %"github.com/goplus/llgo/internal/runtime.iface", i1 } [ %149, %_llgo_35 ], [ zeroinitializer, %_llgo_36 ]
|
||||
%151 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %150, 0
|
||||
%152 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %150, 1
|
||||
br i1 %152, label %_llgo_10, label %_llgo_9
|
||||
|
||||
_llgo_38: ; preds = %_llgo_10
|
||||
%153 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %38, 1
|
||||
%154 = load ptr, ptr @"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
|
||||
%155 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %154, ptr %53)
|
||||
%156 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %155, 0
|
||||
%157 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %156, ptr %153, 1
|
||||
%158 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.iface" %157, 0
|
||||
%159 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %158, i1 true, 1
|
||||
br label %_llgo_40
|
||||
|
||||
_llgo_39: ; preds = %_llgo_10
|
||||
br label %_llgo_40
|
||||
|
||||
_llgo_40: ; preds = %_llgo_39, %_llgo_38
|
||||
%160 = phi { %"github.com/goplus/llgo/internal/runtime.iface", i1 } [ %159, %_llgo_38 ], [ zeroinitializer, %_llgo_39 ]
|
||||
%161 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %160, 0
|
||||
%162 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %160, 1
|
||||
br i1 %162, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_41: ; preds = %_llgo_12
|
||||
%163 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %65, 1
|
||||
%164 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %66, 0
|
||||
%165 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %164, ptr %163, 1
|
||||
%166 = insertvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.eface" %165, 0
|
||||
%167 = insertvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } %166, i1 true, 1
|
||||
br label %_llgo_43
|
||||
|
||||
_llgo_42: ; preds = %_llgo_12
|
||||
br label %_llgo_43
|
||||
|
||||
_llgo_43: ; preds = %_llgo_42, %_llgo_41
|
||||
%168 = phi { %"github.com/goplus/llgo/internal/runtime.eface", i1 } [ %167, %_llgo_41 ], [ zeroinitializer, %_llgo_42 ]
|
||||
%169 = extractvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } %168, 0
|
||||
%170 = extractvalue { %"github.com/goplus/llgo/internal/runtime.eface", i1 } %168, 1
|
||||
br i1 %170, label %_llgo_14, label %_llgo_13
|
||||
|
||||
_llgo_44: ; preds = %_llgo_14
|
||||
%171 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %65, 1
|
||||
%172 = load ptr, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
|
||||
%173 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %172, ptr %73)
|
||||
%174 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %173, 0
|
||||
%175 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %174, ptr %171, 1
|
||||
%176 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.iface" %175, 0
|
||||
%177 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %176, i1 true, 1
|
||||
br label %_llgo_46
|
||||
|
||||
_llgo_45: ; preds = %_llgo_14
|
||||
br label %_llgo_46
|
||||
|
||||
_llgo_46: ; preds = %_llgo_45, %_llgo_44
|
||||
%178 = phi { %"github.com/goplus/llgo/internal/runtime.iface", i1 } [ %177, %_llgo_44 ], [ zeroinitializer, %_llgo_45 ]
|
||||
%179 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %178, 0
|
||||
%180 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %178, 1
|
||||
br i1 %180, label %_llgo_16, label %_llgo_15
|
||||
|
||||
_llgo_47: ; preds = %_llgo_16
|
||||
%181 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %65, 1
|
||||
%182 = load ptr, ptr @"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
|
||||
%183 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %182, ptr %80)
|
||||
%184 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %183, 0
|
||||
%185 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %184, ptr %181, 1
|
||||
%186 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.iface" %185, 0
|
||||
%187 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %186, i1 true, 1
|
||||
br label %_llgo_49
|
||||
|
||||
_llgo_48: ; preds = %_llgo_16
|
||||
br label %_llgo_49
|
||||
|
||||
_llgo_49: ; preds = %_llgo_48, %_llgo_47
|
||||
%188 = phi { %"github.com/goplus/llgo/internal/runtime.iface", i1 } [ %187, %_llgo_47 ], [ zeroinitializer, %_llgo_48 ]
|
||||
%189 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %188, 0
|
||||
%190 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %188, 1
|
||||
br i1 %190, label %_llgo_18, label %_llgo_17
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 2 })
|
||||
%1 = load ptr, ptr @_llgo_main.I0, align 8
|
||||
%2 = icmp eq ptr %1, null
|
||||
br i1 %2, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store ptr %0, ptr @_llgo_main.I0, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
br i1 %2, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%4 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %3, 0
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %4, i64 0, 1
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %5, i64 0, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr %0, %"github.com/goplus/llgo/internal/runtime.Slice" %6)
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%7 = load ptr, ptr @_llgo_string, align 8
|
||||
%8 = icmp eq ptr %7, null
|
||||
br i1 %8, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %9, ptr @_llgo_string, align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%10 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 2 })
|
||||
%11 = load ptr, ptr @_llgo_main.I1, align 8
|
||||
%12 = icmp eq ptr %11, null
|
||||
br i1 %12, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
store ptr %10, ptr @_llgo_main.I1, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%13 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%14 = icmp eq ptr %13, null
|
||||
br i1 %14, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%15 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %15, 0
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %16, i64 0, 1
|
||||
%18 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %17, i64 0, 2
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %19, 0
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %20, i64 0, 1
|
||||
%22 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %21, i64 0, 2
|
||||
%23 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %18, %"github.com/goplus/llgo/internal/runtime.Slice" %22, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %23)
|
||||
store ptr %23, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
||||
%24 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br i1 %12, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 6 }, ptr undef }, ptr %24, 1
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
%27 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %26, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %25, ptr %27, align 8
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %26, 0
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %28, i64 1, 1
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %29, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr %10, %"github.com/goplus/llgo/internal/runtime.Slice" %30)
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
||||
%31 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%32 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 6 }, ptr undef }, ptr %31, 1
|
||||
%33 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
%34 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %33, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %32, ptr %34, align 8
|
||||
%35 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %33, 0
|
||||
%36 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %35, i64 1, 1
|
||||
%37 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %36, i64 1, 2
|
||||
%38 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %37)
|
||||
store ptr %38, ptr @"main.iface$brpgdLtIeRlPi8QUoTgPCXzlehUkncg7v9aITo-GsF4", align 8
|
||||
%39 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 2 })
|
||||
%40 = load ptr, ptr @_llgo_main.I2, align 8
|
||||
%41 = icmp eq ptr %40, null
|
||||
br i1 %41, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
store ptr %39, ptr @_llgo_main.I2, align 8
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
%42 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%43 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br i1 %41, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_15: ; preds = %_llgo_14
|
||||
%44 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 6 }, ptr undef }, ptr %42, 1
|
||||
%45 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 6 }, ptr undef }, ptr %43, 1
|
||||
%46 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
%47 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %46, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %44, ptr %47, align 8
|
||||
%48 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %46, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %45, ptr %48, align 8
|
||||
%49 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %46, 0
|
||||
%50 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %49, i64 2, 1
|
||||
%51 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %50, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr %39, %"github.com/goplus/llgo/internal/runtime.Slice" %51)
|
||||
br label %_llgo_16
|
||||
|
||||
_llgo_16: ; preds = %_llgo_15, %_llgo_14
|
||||
%52 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%53 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%54 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 6 }, ptr undef }, ptr %52, 1
|
||||
%55 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 6 }, ptr undef }, ptr %53, 1
|
||||
%56 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
%57 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %56, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %54, ptr %57, align 8
|
||||
%58 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %56, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %55, ptr %58, align 8
|
||||
%59 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %56, 0
|
||||
%60 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %59, i64 2, 1
|
||||
%61 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %60, i64 2, 2
|
||||
%62 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %61)
|
||||
store ptr %62, ptr @"main.iface$gZBF8fFlqIMZ9M6lT2VWPyc3eu5Co6j0WoKGIEgDPAw", align 8
|
||||
%63 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @9, i64 2 }, i64 25, i64 0, i64 1, i64 1)
|
||||
%64 = load ptr, ptr @_llgo_main.C1, align 8
|
||||
%65 = icmp eq ptr %64, null
|
||||
br i1 %65, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_17: ; preds = %_llgo_16
|
||||
store ptr %63, ptr @_llgo_main.C1, align 8
|
||||
br label %_llgo_18
|
||||
|
||||
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
||||
%66 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%67 = icmp eq ptr %66, null
|
||||
br i1 %67, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
%68 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%69 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %68, 0
|
||||
%70 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %69, i64 0, 1
|
||||
%71 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %70, i64 0, 2
|
||||
%72 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, i64 0, %"github.com/goplus/llgo/internal/runtime.Slice" %71)
|
||||
store ptr %72, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br label %_llgo_20
|
||||
|
||||
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
||||
%73 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %65, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_21: ; preds = %_llgo_20
|
||||
%74 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%75 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %74, 1
|
||||
%76 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %75, ptr @"main.(*C1).f", 2
|
||||
%77 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %76, ptr @"main.(*C1).f", 3
|
||||
%78 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %74, 1
|
||||
%79 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %78, ptr @"main.(*C1).f", 2
|
||||
%80 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %79, ptr @main.C1.f, 3
|
||||
%81 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%82 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %81, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %80, ptr %82, align 8
|
||||
%83 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %81, 0
|
||||
%84 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %83, i64 1, 1
|
||||
%85 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %84, i64 1, 2
|
||||
%86 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%87 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %86, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %77, ptr %87, align 8
|
||||
%88 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %86, 0
|
||||
%89 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %88, i64 1, 1
|
||||
%90 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %89, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %63, ptr %73, %"github.com/goplus/llgo/internal/runtime.Slice" %85, %"github.com/goplus/llgo/internal/runtime.Slice" %90)
|
||||
br label %_llgo_22
|
||||
|
||||
_llgo_22: ; preds = %_llgo_21, %_llgo_20
|
||||
%91 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @14, i64 2 }, i64 25, i64 0, i64 2, i64 2)
|
||||
%92 = load ptr, ptr @_llgo_main.C2, align 8
|
||||
%93 = icmp eq ptr %92, null
|
||||
br i1 %93, label %_llgo_23, label %_llgo_24
|
||||
|
||||
_llgo_23: ; preds = %_llgo_22
|
||||
store ptr %91, ptr @_llgo_main.C2, align 8
|
||||
br label %_llgo_24
|
||||
|
||||
_llgo_24: ; preds = %_llgo_23, %_llgo_22
|
||||
%94 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %93, label %_llgo_25, label %_llgo_26
|
||||
|
||||
_llgo_25: ; preds = %_llgo_24
|
||||
%95 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%96 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %95, 1
|
||||
%97 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %96, ptr @"main.(*C2).f", 2
|
||||
%98 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %97, ptr @"main.(*C2).f", 3
|
||||
%99 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %95, 1
|
||||
%100 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %99, ptr @"main.(*C2).f", 2
|
||||
%101 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %100, ptr @main.C2.f, 3
|
||||
%102 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%103 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %102, 1
|
||||
%104 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %103, ptr @"main.(*C2).g", 2
|
||||
%105 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %104, ptr @"main.(*C2).g", 3
|
||||
%106 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %102, 1
|
||||
%107 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %106, ptr @"main.(*C2).g", 2
|
||||
%108 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %107, ptr @main.C2.g, 3
|
||||
%109 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80)
|
||||
%110 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %109, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %101, ptr %110, align 8
|
||||
%111 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %109, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %108, ptr %111, align 8
|
||||
%112 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %109, 0
|
||||
%113 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %112, i64 2, 1
|
||||
%114 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %113, i64 2, 2
|
||||
%115 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80)
|
||||
%116 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %115, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %98, ptr %116, align 8
|
||||
%117 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %115, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %105, ptr %117, align 8
|
||||
%118 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %115, 0
|
||||
%119 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %118, i64 2, 1
|
||||
%120 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %119, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %91, ptr %94, %"github.com/goplus/llgo/internal/runtime.Slice" %114, %"github.com/goplus/llgo/internal/runtime.Slice" %120)
|
||||
br label %_llgo_26
|
||||
|
||||
_llgo_26: ; preds = %_llgo_25, %_llgo_24
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface", %"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
@@ -1,668 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%main.S = type { %"github.com/goplus/llgo/internal/runtime.iface" }
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%main.impl = type {}
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [3 x i8] c"two", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@_llgo_main.impl = linkonce global ptr null, align 8
|
||||
@1 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@2 = private unnamed_addr constant [4 x i8] c"impl", align 1
|
||||
@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8
|
||||
@3 = private unnamed_addr constant [3 x i8] c"one", align 1
|
||||
@4 = private unnamed_addr constant [8 x i8] c"main.one", align 1
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA" = linkonce global ptr null, align 8
|
||||
@5 = private unnamed_addr constant [8 x i8] c"main.two", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8
|
||||
@"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA" = linkonce global ptr null, align 8
|
||||
@_llgo_main.I = linkonce global ptr null, align 8
|
||||
@6 = private unnamed_addr constant [1 x i8] c"I", align 1
|
||||
@7 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
|
||||
@8 = private unnamed_addr constant [4 x i8] c"pass", align 1
|
||||
|
||||
define i64 @main.S.one(%main.S %0) {
|
||||
_llgo_0:
|
||||
%1 = alloca %main.S, align 8
|
||||
call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false)
|
||||
store %main.S %0, ptr %1, align 8
|
||||
%2 = getelementptr inbounds %main.S, ptr %1, i32 0, i32 0
|
||||
%3 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %2, align 8
|
||||
%4 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %3)
|
||||
%5 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %3, 0
|
||||
%6 = getelementptr ptr, ptr %5, i64 3
|
||||
%7 = load ptr, ptr %6, align 8
|
||||
%8 = insertvalue { ptr, ptr } undef, ptr %7, 0
|
||||
%9 = insertvalue { ptr, ptr } %8, ptr %4, 1
|
||||
%10 = extractvalue { ptr, ptr } %9, 1
|
||||
%11 = extractvalue { ptr, ptr } %9, 0
|
||||
%12 = call i64 %11(ptr %10)
|
||||
ret i64 %12
|
||||
}
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.String" @main.S.two(%main.S %0) {
|
||||
_llgo_0:
|
||||
%1 = alloca %main.S, align 8
|
||||
call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false)
|
||||
store %main.S %0, ptr %1, align 8
|
||||
%2 = getelementptr inbounds %main.S, ptr %1, i32 0, i32 0
|
||||
%3 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %2, align 8
|
||||
%4 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %3)
|
||||
%5 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %3, 0
|
||||
%6 = getelementptr ptr, ptr %5, i64 4
|
||||
%7 = load ptr, ptr %6, align 8
|
||||
%8 = insertvalue { ptr, ptr } undef, ptr %7, 0
|
||||
%9 = insertvalue { ptr, ptr } %8, ptr %4, 1
|
||||
%10 = extractvalue { ptr, ptr } %9, 1
|
||||
%11 = extractvalue { ptr, ptr } %9, 0
|
||||
%12 = call %"github.com/goplus/llgo/internal/runtime.String" %11(ptr %10)
|
||||
ret %"github.com/goplus/llgo/internal/runtime.String" %12
|
||||
}
|
||||
|
||||
define i64 @"main.(*S).one"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = getelementptr inbounds %main.S, ptr %0, i32 0, i32 0
|
||||
%2 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %1, align 8
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %2)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %2, 0
|
||||
%5 = getelementptr ptr, ptr %4, i64 3
|
||||
%6 = load ptr, ptr %5, align 8
|
||||
%7 = insertvalue { ptr, ptr } undef, ptr %6, 0
|
||||
%8 = insertvalue { ptr, ptr } %7, ptr %3, 1
|
||||
%9 = extractvalue { ptr, ptr } %8, 1
|
||||
%10 = extractvalue { ptr, ptr } %8, 0
|
||||
%11 = call i64 %10(ptr %9)
|
||||
ret i64 %11
|
||||
}
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.String" @"main.(*S).two"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = getelementptr inbounds %main.S, ptr %0, i32 0, i32 0
|
||||
%2 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %1, align 8
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %2)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %2, 0
|
||||
%5 = getelementptr ptr, ptr %4, i64 4
|
||||
%6 = load ptr, ptr %5, align 8
|
||||
%7 = insertvalue { ptr, ptr } undef, ptr %6, 0
|
||||
%8 = insertvalue { ptr, ptr } %7, ptr %3, 1
|
||||
%9 = extractvalue { ptr, ptr } %8, 1
|
||||
%10 = extractvalue { ptr, ptr } %8, 0
|
||||
%11 = call %"github.com/goplus/llgo/internal/runtime.String" %10(ptr %9)
|
||||
ret %"github.com/goplus/llgo/internal/runtime.String" %11
|
||||
}
|
||||
|
||||
define i64 @main.impl.one(%main.impl %0) {
|
||||
_llgo_0:
|
||||
ret i64 1
|
||||
}
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.String" @main.impl.two(%main.impl %0) {
|
||||
_llgo_0:
|
||||
ret %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 3 }
|
||||
}
|
||||
|
||||
define i64 @"main.(*impl).one"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load %main.impl, ptr %0, align 1
|
||||
%2 = call i64 @main.impl.one(%main.impl %1)
|
||||
ret i64 %2
|
||||
}
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.String" @"main.(*impl).two"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load %main.impl, ptr %0, align 1
|
||||
%2 = call %"github.com/goplus/llgo/internal/runtime.String" @main.impl.two(%main.impl %1)
|
||||
ret %"github.com/goplus/llgo/internal/runtime.String" %2
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = alloca %main.S, align 8
|
||||
call void @llvm.memset(ptr %2, i8 0, i64 16, i1 false)
|
||||
%3 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
|
||||
%4 = load ptr, ptr @_llgo_main.impl, align 8
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
store %main.impl zeroinitializer, ptr %5, align 1
|
||||
%6 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%7 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%8 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %8, ptr %4)
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %9, 0
|
||||
%11 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %10, ptr %5, 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.iface" %11, ptr %3, align 8
|
||||
%12 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
|
||||
%13 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %12, align 8
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %13)
|
||||
%15 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %13, 0
|
||||
%16 = getelementptr ptr, ptr %15, i64 3
|
||||
%17 = load ptr, ptr %16, align 8
|
||||
%18 = insertvalue { ptr, ptr } undef, ptr %17, 0
|
||||
%19 = insertvalue { ptr, ptr } %18, ptr %14, 1
|
||||
%20 = extractvalue { ptr, ptr } %19, 1
|
||||
%21 = extractvalue { ptr, ptr } %19, 0
|
||||
%22 = call i64 %21(ptr %20)
|
||||
%23 = icmp ne i64 %22, 1
|
||||
br i1 %23, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%24 = load ptr, ptr @_llgo_int, align 8
|
||||
%25 = inttoptr i64 %22 to ptr
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %24, 0
|
||||
%27 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %26, ptr %25, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %27)
|
||||
unreachable
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
%28 = load %main.S, ptr %2, align 8
|
||||
%29 = extractvalue %main.S %28, 0
|
||||
%30 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %29)
|
||||
%31 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %29, 0
|
||||
%32 = getelementptr ptr, ptr %31, i64 3
|
||||
%33 = load ptr, ptr %32, align 8
|
||||
%34 = insertvalue { ptr, ptr } undef, ptr %33, 0
|
||||
%35 = insertvalue { ptr, ptr } %34, ptr %30, 1
|
||||
%36 = extractvalue { ptr, ptr } %35, 1
|
||||
%37 = extractvalue { ptr, ptr } %35, 0
|
||||
%38 = call i64 %37(ptr %36)
|
||||
%39 = icmp ne i64 %38, 1
|
||||
br i1 %39, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%40 = load ptr, ptr @_llgo_int, align 8
|
||||
%41 = inttoptr i64 %38 to ptr
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %40, 0
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %42, ptr %41, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %43)
|
||||
unreachable
|
||||
|
||||
_llgo_4: ; preds = %_llgo_2
|
||||
%44 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
|
||||
%45 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %44, align 8
|
||||
%46 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %45)
|
||||
%47 = load ptr, ptr @_llgo_main.I, align 8
|
||||
%48 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %47, ptr %46)
|
||||
br i1 %48, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_5: ; preds = %_llgo_17
|
||||
%49 = load ptr, ptr @_llgo_int, align 8
|
||||
%50 = inttoptr i64 %124 to ptr
|
||||
%51 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %49, 0
|
||||
%52 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %51, ptr %50, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %52)
|
||||
unreachable
|
||||
|
||||
_llgo_6: ; preds = %_llgo_17
|
||||
%53 = load %main.S, ptr %2, align 8
|
||||
%54 = extractvalue %main.S %53, 0
|
||||
%55 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %54)
|
||||
%56 = load ptr, ptr @_llgo_main.I, align 8
|
||||
%57 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %56, ptr %55)
|
||||
br i1 %57, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_7: ; preds = %_llgo_19
|
||||
%58 = load ptr, ptr @_llgo_int, align 8
|
||||
%59 = inttoptr i64 %140 to ptr
|
||||
%60 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %58, 0
|
||||
%61 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %60, ptr %59, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %61)
|
||||
unreachable
|
||||
|
||||
_llgo_8: ; preds = %_llgo_19
|
||||
%62 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
|
||||
%63 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %62, align 8
|
||||
%64 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %63)
|
||||
%65 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %63, 0
|
||||
%66 = getelementptr ptr, ptr %65, i64 4
|
||||
%67 = load ptr, ptr %66, align 8
|
||||
%68 = insertvalue { ptr, ptr } undef, ptr %67, 0
|
||||
%69 = insertvalue { ptr, ptr } %68, ptr %64, 1
|
||||
%70 = extractvalue { ptr, ptr } %69, 1
|
||||
%71 = extractvalue { ptr, ptr } %69, 0
|
||||
%72 = call %"github.com/goplus/llgo/internal/runtime.String" %71(ptr %70)
|
||||
%73 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %72, %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 3 })
|
||||
%74 = xor i1 %73, true
|
||||
br i1 %74, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%75 = load ptr, ptr @_llgo_string, align 8
|
||||
%76 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" %72, ptr %76, align 8
|
||||
%77 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %75, 0
|
||||
%78 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %77, ptr %76, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %78)
|
||||
unreachable
|
||||
|
||||
_llgo_10: ; preds = %_llgo_8
|
||||
%79 = load %main.S, ptr %2, align 8
|
||||
%80 = extractvalue %main.S %79, 0
|
||||
%81 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %80)
|
||||
%82 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %80, 0
|
||||
%83 = getelementptr ptr, ptr %82, i64 4
|
||||
%84 = load ptr, ptr %83, align 8
|
||||
%85 = insertvalue { ptr, ptr } undef, ptr %84, 0
|
||||
%86 = insertvalue { ptr, ptr } %85, ptr %81, 1
|
||||
%87 = extractvalue { ptr, ptr } %86, 1
|
||||
%88 = extractvalue { ptr, ptr } %86, 0
|
||||
%89 = call %"github.com/goplus/llgo/internal/runtime.String" %88(ptr %87)
|
||||
%90 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %89, %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 3 })
|
||||
%91 = xor i1 %90, true
|
||||
br i1 %91, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
%92 = load ptr, ptr @_llgo_string, align 8
|
||||
%93 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" %89, ptr %93, align 8
|
||||
%94 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %92, 0
|
||||
%95 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %94, ptr %93, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %95)
|
||||
unreachable
|
||||
|
||||
_llgo_12: ; preds = %_llgo_10
|
||||
%96 = getelementptr inbounds %main.S, ptr %2, i32 0, i32 0
|
||||
%97 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %96, align 8
|
||||
%98 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %97)
|
||||
%99 = load ptr, ptr @_llgo_main.I, align 8
|
||||
%100 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %99, ptr %98)
|
||||
br i1 %100, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_13: ; preds = %_llgo_21
|
||||
%101 = load ptr, ptr @_llgo_string, align 8
|
||||
%102 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" %156, ptr %102, align 8
|
||||
%103 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %101, 0
|
||||
%104 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %103, ptr %102, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %104)
|
||||
unreachable
|
||||
|
||||
_llgo_14: ; preds = %_llgo_21
|
||||
%105 = load %main.S, ptr %2, align 8
|
||||
%106 = extractvalue %main.S %105, 0
|
||||
%107 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %106)
|
||||
%108 = load ptr, ptr @_llgo_main.I, align 8
|
||||
%109 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %108, ptr %107)
|
||||
br i1 %109, label %_llgo_23, label %_llgo_24
|
||||
|
||||
_llgo_15: ; preds = %_llgo_23
|
||||
%110 = load ptr, ptr @_llgo_string, align 8
|
||||
%111 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" %173, ptr %111, align 8
|
||||
%112 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %110, 0
|
||||
%113 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %112, ptr %111, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %113)
|
||||
unreachable
|
||||
|
||||
_llgo_16: ; preds = %_llgo_23
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
|
||||
_llgo_17: ; preds = %_llgo_4
|
||||
%114 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %45, 1
|
||||
%115 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
|
||||
%116 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %115, ptr %46)
|
||||
%117 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %116, 0
|
||||
%118 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %117, ptr %114, 1
|
||||
%119 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
%120 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %119, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.iface" %45, ptr %120, align 8
|
||||
%121 = insertvalue { ptr, ptr } { ptr @"main.one$bound", ptr undef }, ptr %119, 1
|
||||
%122 = extractvalue { ptr, ptr } %121, 1
|
||||
%123 = extractvalue { ptr, ptr } %121, 0
|
||||
%124 = call i64 %123(ptr %122)
|
||||
%125 = icmp ne i64 %124, 1
|
||||
br i1 %125, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_18: ; preds = %_llgo_4
|
||||
%126 = load ptr, ptr @_llgo_string, align 8
|
||||
%127 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 21 }, ptr %127, align 8
|
||||
%128 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %126, 0
|
||||
%129 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %128, ptr %127, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %129)
|
||||
unreachable
|
||||
|
||||
_llgo_19: ; preds = %_llgo_6
|
||||
%130 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %54, 1
|
||||
%131 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
|
||||
%132 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %131, ptr %55)
|
||||
%133 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %132, 0
|
||||
%134 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %133, ptr %130, 1
|
||||
%135 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
%136 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %135, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.iface" %54, ptr %136, align 8
|
||||
%137 = insertvalue { ptr, ptr } { ptr @"main.one$bound", ptr undef }, ptr %135, 1
|
||||
%138 = extractvalue { ptr, ptr } %137, 1
|
||||
%139 = extractvalue { ptr, ptr } %137, 0
|
||||
%140 = call i64 %139(ptr %138)
|
||||
%141 = icmp ne i64 %140, 1
|
||||
br i1 %141, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_20: ; preds = %_llgo_6
|
||||
%142 = load ptr, ptr @_llgo_string, align 8
|
||||
%143 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 21 }, ptr %143, align 8
|
||||
%144 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %142, 0
|
||||
%145 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %144, ptr %143, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %145)
|
||||
unreachable
|
||||
|
||||
_llgo_21: ; preds = %_llgo_12
|
||||
%146 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %97, 1
|
||||
%147 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
|
||||
%148 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %147, ptr %98)
|
||||
%149 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %148, 0
|
||||
%150 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %149, ptr %146, 1
|
||||
%151 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
%152 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %151, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.iface" %97, ptr %152, align 8
|
||||
%153 = insertvalue { ptr, ptr } { ptr @"main.two$bound", ptr undef }, ptr %151, 1
|
||||
%154 = extractvalue { ptr, ptr } %153, 1
|
||||
%155 = extractvalue { ptr, ptr } %153, 0
|
||||
%156 = call %"github.com/goplus/llgo/internal/runtime.String" %155(ptr %154)
|
||||
%157 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %156, %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 3 })
|
||||
%158 = xor i1 %157, true
|
||||
br i1 %158, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_22: ; preds = %_llgo_12
|
||||
%159 = load ptr, ptr @_llgo_string, align 8
|
||||
%160 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 21 }, ptr %160, align 8
|
||||
%161 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %159, 0
|
||||
%162 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %161, ptr %160, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %162)
|
||||
unreachable
|
||||
|
||||
_llgo_23: ; preds = %_llgo_14
|
||||
%163 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %106, 1
|
||||
%164 = load ptr, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
|
||||
%165 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %164, ptr %107)
|
||||
%166 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %165, 0
|
||||
%167 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %166, ptr %163, 1
|
||||
%168 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
%169 = getelementptr inbounds { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %168, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.iface" %106, ptr %169, align 8
|
||||
%170 = insertvalue { ptr, ptr } { ptr @"main.two$bound", ptr undef }, ptr %168, 1
|
||||
%171 = extractvalue { ptr, ptr } %170, 1
|
||||
%172 = extractvalue { ptr, ptr } %170, 0
|
||||
%173 = call %"github.com/goplus/llgo/internal/runtime.String" %172(ptr %171)
|
||||
%174 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" %173, %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 3 })
|
||||
%175 = xor i1 %174, true
|
||||
br i1 %175, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_24: ; preds = %_llgo_14
|
||||
%176 = load ptr, ptr @_llgo_string, align 8
|
||||
%177 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 21 }, ptr %177, align 8
|
||||
%178 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %176, 0
|
||||
%179 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %178, ptr %177, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %179)
|
||||
unreachable
|
||||
}
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 }, i64 25, i64 0, i64 2, i64 2)
|
||||
store ptr %0, ptr @_llgo_main.impl, align 8
|
||||
%1 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%2 = icmp eq ptr %1, null
|
||||
br i1 %2, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%4 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %3, 0
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %4, i64 0, 1
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %5, i64 0, 2
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, i64 0, %"github.com/goplus/llgo/internal/runtime.Slice" %6)
|
||||
store ptr %7, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%8 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%9 = load ptr, ptr @_llgo_int, align 8
|
||||
%10 = icmp eq ptr %9, null
|
||||
br i1 %10, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%11 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %11, ptr @_llgo_int, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%12 = load ptr, ptr @_llgo_int, align 8
|
||||
%13 = load ptr, ptr @_llgo_int, align 8
|
||||
%14 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%15 = icmp eq ptr %14, null
|
||||
br i1 %15, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%16 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %16, 0
|
||||
%18 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %17, i64 0, 1
|
||||
%19 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %18, i64 0, 2
|
||||
%20 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%21 = getelementptr ptr, ptr %20, i64 0
|
||||
store ptr %13, ptr %21, align 8
|
||||
%22 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %20, 0
|
||||
%23 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %22, i64 1, 1
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %23, i64 1, 2
|
||||
%25 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %19, %"github.com/goplus/llgo/internal/runtime.Slice" %24, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %25)
|
||||
store ptr %25, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%26 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%27 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %26, 1
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %27, ptr @"main.(*impl).one", 2
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %28, ptr @"main.(*impl).one", 3
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %26, 1
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %30, ptr @"main.(*impl).one", 2
|
||||
%32 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %31, ptr @main.impl.one, 3
|
||||
%33 = load ptr, ptr @_llgo_string, align 8
|
||||
%34 = icmp eq ptr %33, null
|
||||
br i1 %34, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%35 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %35, ptr @_llgo_string, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%36 = load ptr, ptr @_llgo_string, align 8
|
||||
%37 = load ptr, ptr @_llgo_string, align 8
|
||||
%38 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%39 = icmp eq ptr %38, null
|
||||
br i1 %39, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%40 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%41 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %40, 0
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %41, i64 0, 1
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %42, i64 0, 2
|
||||
%44 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%45 = getelementptr ptr, ptr %44, i64 0
|
||||
store ptr %37, ptr %45, align 8
|
||||
%46 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %44, 0
|
||||
%47 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %46, i64 1, 1
|
||||
%48 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %47, i64 1, 2
|
||||
%49 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %43, %"github.com/goplus/llgo/internal/runtime.Slice" %48, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %49)
|
||||
store ptr %49, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
||||
%50 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%51 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %50, 1
|
||||
%52 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %51, ptr @"main.(*impl).two", 2
|
||||
%53 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %52, ptr @"main.(*impl).two", 3
|
||||
%54 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 8 }, ptr undef, ptr undef, ptr undef }, ptr %50, 1
|
||||
%55 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %54, ptr @"main.(*impl).two", 2
|
||||
%56 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %55, ptr @main.impl.two, 3
|
||||
%57 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80)
|
||||
%58 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %57, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %32, ptr %58, align 8
|
||||
%59 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %57, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %56, ptr %59, align 8
|
||||
%60 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %57, 0
|
||||
%61 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %60, i64 2, 1
|
||||
%62 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %61, i64 2, 2
|
||||
%63 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80)
|
||||
%64 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %63, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %29, ptr %64, align 8
|
||||
%65 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %63, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %53, ptr %65, align 8
|
||||
%66 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %63, 0
|
||||
%67 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %66, i64 2, 1
|
||||
%68 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %67, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, ptr %8, %"github.com/goplus/llgo/internal/runtime.Slice" %62, %"github.com/goplus/llgo/internal/runtime.Slice" %68)
|
||||
%69 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%70 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%71 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 8 }, ptr undef }, ptr %69, 1
|
||||
%72 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 8 }, ptr undef }, ptr %70, 1
|
||||
%73 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
%74 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %73, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %71, ptr %74, align 8
|
||||
%75 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %73, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %72, ptr %75, align 8
|
||||
%76 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %73, 0
|
||||
%77 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %76, i64 2, 1
|
||||
%78 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %77, i64 2, 2
|
||||
%79 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %78)
|
||||
store ptr %79, ptr @"main.iface$zZ89tENb5h_KNjvpxf1TXPfaWFYn0IZrZwyVf42lRtA", align 8
|
||||
%80 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 1 })
|
||||
%81 = load ptr, ptr @_llgo_main.I, align 8
|
||||
%82 = icmp eq ptr %81, null
|
||||
br i1 %82, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
store ptr %80, ptr @_llgo_main.I, align 8
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
||||
%83 = load ptr, ptr @"_llgo_func$ETeB8WwW04JEq0ztcm-XPTJtuYvtpkjIsAc0-2NT9zA", align 8
|
||||
%84 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
br i1 %82, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
%85 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 8 }, ptr undef }, ptr %83, 1
|
||||
%86 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 8 }, ptr undef }, ptr %84, 1
|
||||
%87 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
%88 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %87, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %85, ptr %88, align 8
|
||||
%89 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %87, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %86, ptr %89, align 8
|
||||
%90 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %87, 0
|
||||
%91 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %90, i64 2, 1
|
||||
%92 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %91, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr %80, %"github.com/goplus/llgo/internal/runtime.Slice" %92)
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr, ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr, ptr)
|
||||
|
||||
define i64 @"main.one$bound"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %0, align 8
|
||||
%2 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface" } %1, 0
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %2)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %2, 0
|
||||
%5 = getelementptr ptr, ptr %4, i64 3
|
||||
%6 = load ptr, ptr %5, align 8
|
||||
%7 = insertvalue { ptr, ptr } undef, ptr %6, 0
|
||||
%8 = insertvalue { ptr, ptr } %7, ptr %3, 1
|
||||
%9 = extractvalue { ptr, ptr } %8, 1
|
||||
%10 = extractvalue { ptr, ptr } %8, 0
|
||||
%11 = call i64 %10(ptr %9)
|
||||
ret i64 %11
|
||||
}
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.String" @"main.two$bound"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { %"github.com/goplus/llgo/internal/runtime.iface" }, ptr %0, align 8
|
||||
%2 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface" } %1, 0
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %2)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %2, 0
|
||||
%5 = getelementptr ptr, ptr %4, i64 4
|
||||
%6 = load ptr, ptr %5, align 8
|
||||
%7 = insertvalue { ptr, ptr } undef, ptr %6, 0
|
||||
%8 = insertvalue { ptr, ptr } %7, ptr %3, 1
|
||||
%9 = extractvalue { ptr, ptr } %8, 1
|
||||
%10 = extractvalue { ptr, ptr } %8, 0
|
||||
%11 = call %"github.com/goplus/llgo/internal/runtime.String" %10(ptr %9)
|
||||
ret %"github.com/goplus/llgo/internal/runtime.String" %11
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
@@ -1,485 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%main.Game1 = type { ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
%"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@_llgo_main.Game1 = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@1 = private unnamed_addr constant [5 x i8] c"Game1", align 1
|
||||
@"_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null, align 8
|
||||
@2 = private unnamed_addr constant [38 x i8] c"github.com/goplus/llgo/cl/internal/foo", align 1
|
||||
@3 = private unnamed_addr constant [4 x i8] c"Game", align 1
|
||||
@"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw" = linkonce global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [4 x i8] c"Load", align 1
|
||||
@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8
|
||||
@5 = private unnamed_addr constant [8 x i8] c"initGame", align 1
|
||||
@6 = private unnamed_addr constant [47 x i8] c"github.com/goplus/llgo/cl/internal/foo.initGame", align 1
|
||||
@"*_llgo_github.com/goplus/llgo/cl/internal/foo.Game" = linkonce global ptr null, align 8
|
||||
@"_llgo_struct$cJmCzeVn0orHWafCrTGAnbbAF46F2A4Fms4bJBm8ITI" = linkonce global ptr null, align 8
|
||||
@"*_llgo_main.Game1" = linkonce global ptr null, align 8
|
||||
@_llgo_main.Game2 = linkonce global ptr null, align 8
|
||||
@7 = private unnamed_addr constant [5 x i8] c"Game2", align 1
|
||||
@8 = private unnamed_addr constant [13 x i8] c"main.initGame", align 1
|
||||
@"*_llgo_main.Game2" = linkonce global ptr null, align 8
|
||||
@"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer" = linkonce global ptr null, align 8
|
||||
@9 = private unnamed_addr constant [5 x i8] c"Gamer", align 1
|
||||
@"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg" = linkonce global ptr null, align 8
|
||||
@10 = private unnamed_addr constant [2 x i8] c"OK", align 1
|
||||
@11 = private unnamed_addr constant [4 x i8] c"FAIL", align 1
|
||||
|
||||
define void @main.Game1.Load(%main.Game1 %0) {
|
||||
_llgo_0:
|
||||
%1 = alloca %main.Game1, align 8
|
||||
call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false)
|
||||
store %main.Game1 %0, ptr %1, align 8
|
||||
%2 = getelementptr inbounds %main.Game1, ptr %1, i32 0, i32 0
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
call void @"github.com/goplus/llgo/cl/internal/foo.(*Game).Load"(ptr %3)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.Game1.initGame(%main.Game1 %0) {
|
||||
_llgo_0:
|
||||
%1 = alloca %main.Game1, align 8
|
||||
call void @llvm.memset(ptr %1, i8 0, i64 8, i1 false)
|
||||
store %main.Game1 %0, ptr %1, align 8
|
||||
%2 = getelementptr inbounds %main.Game1, ptr %1, i32 0, i32 0
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
call void @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame"(ptr %3)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.(*Game1).Load"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = getelementptr inbounds %main.Game1, ptr %0, i32 0, i32 0
|
||||
%2 = load ptr, ptr %1, align 8
|
||||
call void @"github.com/goplus/llgo/cl/internal/foo.(*Game).Load"(ptr %2)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.(*Game1).initGame"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = getelementptr inbounds %main.Game1, ptr %0, i32 0, i32 0
|
||||
%2 = load ptr, ptr %1, align 8
|
||||
call void @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame"(ptr %2)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.(*Game2).initGame"(ptr %0) {
|
||||
_llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"github.com/goplus/llgo/cl/internal/foo.init"()
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%3 = getelementptr inbounds %main.Game1, ptr %2, i32 0, i32 0
|
||||
%4 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 0)
|
||||
store ptr %4, ptr %3, align 8
|
||||
%5 = load ptr, ptr @_llgo_main.Game1, align 8
|
||||
%6 = load ptr, ptr @"*_llgo_main.Game1", align 8
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %6, 0
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %7, ptr %2, 1
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 0)
|
||||
%10 = load ptr, ptr @_llgo_main.Game2, align 8
|
||||
%11 = load ptr, ptr @"*_llgo_main.Game2", align 8
|
||||
%12 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %11, 0
|
||||
%13 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %12, ptr %9, 1
|
||||
%14 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %8, 0
|
||||
%15 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer", align 8
|
||||
%16 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %15, ptr %14)
|
||||
br i1 %16, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_1: ; preds = %_llgo_5
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %36)
|
||||
%18 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %36, 0
|
||||
%19 = getelementptr ptr, ptr %18, i64 3
|
||||
%20 = load ptr, ptr %19, align 8
|
||||
%21 = insertvalue { ptr, ptr } undef, ptr %20, 0
|
||||
%22 = insertvalue { ptr, ptr } %21, ptr %17, 1
|
||||
%23 = extractvalue { ptr, ptr } %22, 1
|
||||
%24 = extractvalue { ptr, ptr } %22, 0
|
||||
call void %24(ptr %23)
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_5
|
||||
%25 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %13, 0
|
||||
%26 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer", align 8
|
||||
%27 = call i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr %26, ptr %25)
|
||||
br i1 %27, label %_llgo_6, label %_llgo_7
|
||||
|
||||
_llgo_3: ; preds = %_llgo_0
|
||||
%28 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %8, 1
|
||||
%29 = load ptr, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
|
||||
%30 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %29, ptr %14)
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %30, 0
|
||||
%32 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %31, ptr %28, 1
|
||||
%33 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.iface" %32, 0
|
||||
%34 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %33, i1 true, 1
|
||||
br label %_llgo_5
|
||||
|
||||
_llgo_4: ; preds = %_llgo_0
|
||||
br label %_llgo_5
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4, %_llgo_3
|
||||
%35 = phi { %"github.com/goplus/llgo/internal/runtime.iface", i1 } [ %34, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
|
||||
%36 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %35, 0
|
||||
%37 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %35, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @10, i64 2 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface" %36)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %37)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
br i1 %37, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_6: ; preds = %_llgo_2
|
||||
%38 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %13, 1
|
||||
%39 = load ptr, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
|
||||
%40 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %39, ptr %25)
|
||||
%41 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %40, 0
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %41, ptr %38, 1
|
||||
%43 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } undef, %"github.com/goplus/llgo/internal/runtime.iface" %42, 0
|
||||
%44 = insertvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %43, i1 true, 1
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_2
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%45 = phi { %"github.com/goplus/llgo/internal/runtime.iface", i1 } [ %44, %_llgo_6 ], [ zeroinitializer, %_llgo_7 ]
|
||||
%46 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %45, 0
|
||||
%47 = extractvalue { %"github.com/goplus/llgo/internal/runtime.iface", i1 } %45, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @11, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface" %46)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %47)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
declare void @"github.com/goplus/llgo/cl/internal/foo.(*Game).Load"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/cl/internal/foo.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2)
|
||||
%1 = load ptr, ptr @_llgo_main.Game1, align 8
|
||||
%2 = icmp eq ptr %1, null
|
||||
br i1 %2, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %0)
|
||||
store ptr %0, ptr @_llgo_main.Game1, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 38 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2)
|
||||
%4 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Game", align 8
|
||||
%5 = icmp eq ptr %4, null
|
||||
br i1 %5, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
store ptr %3, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Game", align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
%7 = icmp eq ptr %6, null
|
||||
br i1 %7, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %8, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, i64 0, 1
|
||||
%11 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %10, i64 0, 2
|
||||
%12 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, i64 0, %"github.com/goplus/llgo/internal/runtime.Slice" %11)
|
||||
store ptr %12, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%13 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %5, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%14 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%15 = icmp eq ptr %14, null
|
||||
br i1 %15, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_8: ; preds = %_llgo_10, %_llgo_6
|
||||
%16 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Game", align 8
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 38 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2)
|
||||
%18 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/internal/foo.Game", align 8
|
||||
%19 = icmp eq ptr %18, null
|
||||
br i1 %19, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_9: ; preds = %_llgo_7
|
||||
%20 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %20, 0
|
||||
%22 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %21, i64 0, 1
|
||||
%23 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %22, i64 0, 2
|
||||
%24 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %24, 0
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %25, i64 0, 1
|
||||
%27 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %26, i64 0, 2
|
||||
%28 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %23, %"github.com/goplus/llgo/internal/runtime.Slice" %27, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %28)
|
||||
store ptr %28, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_7
|
||||
%29 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %29, 1
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %30, ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).Load", 2
|
||||
%32 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %31, ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).Load", 3
|
||||
%33 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%34 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 47 }, ptr undef, ptr undef, ptr undef }, ptr %33, 1
|
||||
%35 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %34, ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame", 2
|
||||
%36 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %35, ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame", 3
|
||||
%37 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80)
|
||||
%38 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %37, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %32, ptr %38, align 8
|
||||
%39 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %37, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %36, ptr %39, align 8
|
||||
%40 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %37, 0
|
||||
%41 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %40, i64 2, 1
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %41, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %3, ptr %13, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %42)
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_11: ; preds = %_llgo_8
|
||||
%43 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %17)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %43)
|
||||
store ptr %43, ptr @"*_llgo_github.com/goplus/llgo/cl/internal/foo.Game", align 8
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_8
|
||||
%44 = load ptr, ptr @"*_llgo_github.com/goplus/llgo/cl/internal/foo.Game", align 8
|
||||
%45 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 38 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, i64 25, i64 0, i64 0, i64 2)
|
||||
%46 = load ptr, ptr @"_llgo_struct$cJmCzeVn0orHWafCrTGAnbbAF46F2A4Fms4bJBm8ITI", align 8
|
||||
%47 = icmp eq ptr %46, null
|
||||
br i1 %47, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
%48 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %45)
|
||||
%49 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 }, ptr %48, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 true)
|
||||
%50 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56)
|
||||
%51 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %50, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %49, ptr %51, align 8
|
||||
%52 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %50, 0
|
||||
%53 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %52, i64 1, 1
|
||||
%54 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %53, i64 1, 2
|
||||
%55 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %54)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %55)
|
||||
store ptr %55, ptr @"_llgo_struct$cJmCzeVn0orHWafCrTGAnbbAF46F2A4Fms4bJBm8ITI", align 8
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
%56 = load ptr, ptr @"_llgo_struct$cJmCzeVn0orHWafCrTGAnbbAF46F2A4Fms4bJBm8ITI", align 8
|
||||
br i1 %2, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_15: ; preds = %_llgo_14
|
||||
%57 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%58 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %57, 1
|
||||
%59 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %58, ptr @"main.(*Game1).Load", 2
|
||||
%60 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %59, ptr @"main.(*Game1).Load", 3
|
||||
%61 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %57, 1
|
||||
%62 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %61, ptr @"main.(*Game1).Load", 2
|
||||
%63 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %62, ptr @main.Game1.Load, 3
|
||||
%64 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%65 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 47 }, ptr undef, ptr undef, ptr undef }, ptr %64, 1
|
||||
%66 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %65, ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame", 2
|
||||
%67 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %66, ptr @"github.com/goplus/llgo/cl/internal/foo.(*Game).initGame", 3
|
||||
%68 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%69 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %68, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %63, ptr %69, align 8
|
||||
%70 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %68, 0
|
||||
%71 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %70, i64 1, 1
|
||||
%72 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %71, i64 1, 2
|
||||
%73 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80)
|
||||
%74 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %73, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %60, ptr %74, align 8
|
||||
%75 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %73, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %67, ptr %75, align 8
|
||||
%76 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %73, 0
|
||||
%77 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %76, i64 2, 1
|
||||
%78 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %77, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, ptr %56, %"github.com/goplus/llgo/internal/runtime.Slice" %72, %"github.com/goplus/llgo/internal/runtime.Slice" %78)
|
||||
br label %_llgo_16
|
||||
|
||||
_llgo_16: ; preds = %_llgo_15, %_llgo_14
|
||||
%79 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, i64 25, i64 8, i64 2, i64 2)
|
||||
%80 = load ptr, ptr @"*_llgo_main.Game1", align 8
|
||||
%81 = icmp eq ptr %80, null
|
||||
br i1 %81, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_17: ; preds = %_llgo_16
|
||||
%82 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %79)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %82)
|
||||
store ptr %82, ptr @"*_llgo_main.Game1", align 8
|
||||
br label %_llgo_18
|
||||
|
||||
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
||||
%83 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
|
||||
%84 = load ptr, ptr @_llgo_main.Game2, align 8
|
||||
%85 = icmp eq ptr %84, null
|
||||
br i1 %85, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
store ptr %83, ptr @_llgo_main.Game2, align 8
|
||||
br label %_llgo_20
|
||||
|
||||
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
||||
%86 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
|
||||
br i1 %85, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_21: ; preds = %_llgo_20
|
||||
%87 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%88 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 13 }, ptr undef, ptr undef, ptr undef }, ptr %87, 1
|
||||
%89 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %88, ptr @"main.(*Game2).initGame", 2
|
||||
%90 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %89, ptr @"main.(*Game2).initGame", 3
|
||||
%91 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%92 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %91, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %90, ptr %92, align 8
|
||||
%93 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %91, 0
|
||||
%94 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %93, i64 1, 1
|
||||
%95 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %94, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %83, ptr %86, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %95)
|
||||
br label %_llgo_22
|
||||
|
||||
_llgo_22: ; preds = %_llgo_21, %_llgo_20
|
||||
%96 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 5 }, i64 25, i64 0, i64 0, i64 1)
|
||||
%97 = load ptr, ptr @"*_llgo_main.Game2", align 8
|
||||
%98 = icmp eq ptr %97, null
|
||||
br i1 %98, label %_llgo_23, label %_llgo_24
|
||||
|
||||
_llgo_23: ; preds = %_llgo_22
|
||||
%99 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %96)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %99)
|
||||
store ptr %99, ptr @"*_llgo_main.Game2", align 8
|
||||
br label %_llgo_24
|
||||
|
||||
_llgo_24: ; preds = %_llgo_23, %_llgo_22
|
||||
%100 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 38 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @9, i64 5 })
|
||||
%101 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer", align 8
|
||||
%102 = icmp eq ptr %101, null
|
||||
br i1 %102, label %_llgo_25, label %_llgo_26
|
||||
|
||||
_llgo_25: ; preds = %_llgo_24
|
||||
store ptr %100, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Gamer", align 8
|
||||
br label %_llgo_26
|
||||
|
||||
_llgo_26: ; preds = %_llgo_25, %_llgo_24
|
||||
%103 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%104 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br i1 %102, label %_llgo_27, label %_llgo_28
|
||||
|
||||
_llgo_27: ; preds = %_llgo_26
|
||||
%105 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, ptr undef }, ptr %103, 1
|
||||
%106 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 47 }, ptr undef }, ptr %104, 1
|
||||
%107 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
%108 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %107, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %105, ptr %108, align 8
|
||||
%109 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %107, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %106, ptr %109, align 8
|
||||
%110 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %107, 0
|
||||
%111 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %110, i64 2, 1
|
||||
%112 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %111, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr %100, %"github.com/goplus/llgo/internal/runtime.Slice" %112)
|
||||
br label %_llgo_28
|
||||
|
||||
_llgo_28: ; preds = %_llgo_27, %_llgo_26
|
||||
%113 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%114 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%115 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, ptr undef }, ptr %113, 1
|
||||
%116 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 47 }, ptr undef }, ptr %114, 1
|
||||
%117 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
%118 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %117, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %115, ptr %118, align 8
|
||||
%119 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %117, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %116, ptr %119, align 8
|
||||
%120 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %117, 0
|
||||
%121 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %120, i64 2, 1
|
||||
%122 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %121, i64 2, 2
|
||||
%123 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %122)
|
||||
store ptr %123, ptr @"main.iface$sO8a1LvuUsjXwiwaC6sR9-L4DiYgiOnZi7iosyShJXg", align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.Implements"(ptr, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr, ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,266 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.ChanOp" = type { ptr, ptr, i32, i1 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [4 x i8] c"c1<-", align 1
|
||||
@1 = private unnamed_addr constant [4 x i8] c"<-c2", align 1
|
||||
@2 = private unnamed_addr constant [4 x i8] c"<-c4", align 1
|
||||
@3 = private unnamed_addr constant [31 x i8] c"blocking select matched no case", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [4 x i8] c"<-c1", align 1
|
||||
@5 = private unnamed_addr constant [4 x i8] c"c2<-", align 1
|
||||
@6 = private unnamed_addr constant [4 x i8] c"<-c3", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64 0, i64 1)
|
||||
store ptr %3, ptr %2, align 8
|
||||
%4 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64 0, i64 1)
|
||||
store ptr %5, ptr %4, align 8
|
||||
%6 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64 0, i64 1)
|
||||
store ptr %7, ptr %6, align 8
|
||||
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64 0, i64 1)
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
%10 = getelementptr inbounds { ptr, ptr, ptr }, ptr %9, i32 0, i32 0
|
||||
store ptr %2, ptr %10, align 8
|
||||
%11 = getelementptr inbounds { ptr, ptr, ptr }, ptr %9, i32 0, i32 1
|
||||
store ptr %4, ptr %11, align 8
|
||||
%12 = getelementptr inbounds { ptr, ptr, ptr }, ptr %9, i32 0, i32 2
|
||||
store ptr %6, ptr %12, align 8
|
||||
%13 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %9, 1
|
||||
%14 = call ptr @malloc(i64 16)
|
||||
%15 = getelementptr inbounds { { ptr, ptr } }, ptr %14, i32 0, i32 0
|
||||
store { ptr, ptr } %13, ptr %15, align 8
|
||||
%16 = alloca i8, i64 8, align 1
|
||||
%17 = call i32 @"github.com/goplus/llgo/internal/runtime.CreateThread"(ptr %16, ptr null, ptr @"main._llgo_routine$1", ptr %14)
|
||||
%18 = load ptr, ptr %2, align 8
|
||||
%19 = alloca {}, align 8
|
||||
call void @llvm.memset(ptr %19, i8 0, i64 0, i1 false)
|
||||
store {} zeroinitializer, ptr %19, align 1
|
||||
%20 = call i1 @"github.com/goplus/llgo/internal/runtime.ChanSend"(ptr %18, ptr %19, i64 0)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%21 = load ptr, ptr %4, align 8
|
||||
%22 = alloca {}, align 8
|
||||
call void @llvm.memset(ptr %22, i8 0, i64 0, i1 false)
|
||||
%23 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" undef, ptr %21, 0
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %23, ptr %22, 1
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %24, i32 0, 2
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %25, i1 false, 3
|
||||
%27 = alloca {}, align 8
|
||||
call void @llvm.memset(ptr %27, i8 0, i64 0, i1 false)
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" undef, ptr %8, 0
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %28, ptr %27, 1
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %29, i32 0, 2
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %30, i1 false, 3
|
||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
%33 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %32, i64 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %26, ptr %33, align 8
|
||||
%34 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %32, i64 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %31, ptr %34, align 8
|
||||
%35 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %32, 0
|
||||
%36 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %35, i64 2, 1
|
||||
%37 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %36, i64 2, 2
|
||||
%38 = call { i64, i1 } @"github.com/goplus/llgo/internal/runtime.Select"(%"github.com/goplus/llgo/internal/runtime.Slice" %37)
|
||||
%39 = extractvalue { i64, i1 } %38, 0
|
||||
%40 = extractvalue { i64, i1 } %38, 1
|
||||
%41 = extractvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %26, 1
|
||||
%42 = load {}, ptr %41, align 1
|
||||
%43 = extractvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %31, 1
|
||||
%44 = load {}, ptr %43, align 1
|
||||
%45 = insertvalue { i64, i1, {}, {} } undef, i64 %39, 0
|
||||
%46 = insertvalue { i64, i1, {}, {} } %45, i1 %40, 1
|
||||
%47 = insertvalue { i64, i1, {}, {} } %46, {} %42, 2
|
||||
%48 = insertvalue { i64, i1, {}, {} } %47, {} %44, 3
|
||||
%49 = extractvalue { i64, i1, {}, {} } %48, 0
|
||||
%50 = icmp eq i64 %49, 0
|
||||
br i1 %50, label %_llgo_2, label %_llgo_3
|
||||
|
||||
_llgo_1: ; preds = %_llgo_4, %_llgo_2
|
||||
ret i32 0
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_3: ; preds = %_llgo_0
|
||||
%51 = icmp eq i64 %49, 1
|
||||
br i1 %51, label %_llgo_4, label %_llgo_5
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_5: ; preds = %_llgo_3
|
||||
%52 = load ptr, ptr @_llgo_string, align 8
|
||||
%53 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 31 }, ptr %53, align 8
|
||||
%54 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %52, 0
|
||||
%55 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %54, ptr %53, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %55)
|
||||
unreachable
|
||||
}
|
||||
|
||||
define void @"main.main$1"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { ptr, ptr, ptr }, ptr %0, align 8
|
||||
%2 = extractvalue { ptr, ptr, ptr } %1, 0
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = alloca {}, align 8
|
||||
call void @llvm.memset(ptr %4, i8 0, i64 0, i1 false)
|
||||
%5 = call i1 @"github.com/goplus/llgo/internal/runtime.ChanRecv"(ptr %3, ptr %4, i64 0)
|
||||
%6 = load {}, ptr %4, align 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%7 = extractvalue { ptr, ptr, ptr } %1, 1
|
||||
%8 = load ptr, ptr %7, align 8
|
||||
%9 = extractvalue { ptr, ptr, ptr } %1, 2
|
||||
%10 = load ptr, ptr %9, align 8
|
||||
%11 = alloca {}, align 8
|
||||
call void @llvm.memset(ptr %11, i8 0, i64 0, i1 false)
|
||||
store {} zeroinitializer, ptr %11, align 1
|
||||
%12 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" undef, ptr %8, 0
|
||||
%13 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %12, ptr %11, 1
|
||||
%14 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %13, i32 0, 2
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %14, i1 true, 3
|
||||
%16 = alloca {}, align 8
|
||||
call void @llvm.memset(ptr %16, i8 0, i64 0, i1 false)
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" undef, ptr %10, 0
|
||||
%18 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %17, ptr %16, 1
|
||||
%19 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %18, i32 0, 2
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %19, i1 false, 3
|
||||
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
%22 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %21, i64 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %15, ptr %22, align 8
|
||||
%23 = getelementptr %"github.com/goplus/llgo/internal/runtime.ChanOp", ptr %21, i64 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.ChanOp" %20, ptr %23, align 8
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %21, 0
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %24, i64 2, 1
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %25, i64 2, 2
|
||||
%27 = call { i64, i1 } @"github.com/goplus/llgo/internal/runtime.Select"(%"github.com/goplus/llgo/internal/runtime.Slice" %26)
|
||||
%28 = extractvalue { i64, i1 } %27, 0
|
||||
%29 = extractvalue { i64, i1 } %27, 1
|
||||
%30 = extractvalue %"github.com/goplus/llgo/internal/runtime.ChanOp" %20, 1
|
||||
%31 = load {}, ptr %30, align 1
|
||||
%32 = insertvalue { i64, i1, {} } undef, i64 %28, 0
|
||||
%33 = insertvalue { i64, i1, {} } %32, i1 %29, 1
|
||||
%34 = insertvalue { i64, i1, {} } %33, {} %31, 2
|
||||
%35 = extractvalue { i64, i1, {} } %34, 0
|
||||
%36 = icmp eq i64 %35, 0
|
||||
br i1 %36, label %_llgo_2, label %_llgo_3
|
||||
|
||||
_llgo_1: ; preds = %_llgo_4, %_llgo_2
|
||||
ret void
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_3: ; preds = %_llgo_0
|
||||
%37 = icmp eq i64 %35, 1
|
||||
br i1 %37, label %_llgo_4, label %_llgo_5
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_5: ; preds = %_llgo_3
|
||||
%38 = load ptr, ptr @_llgo_string, align 8
|
||||
%39 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 31 }, ptr %39, align 8
|
||||
%40 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %38, 0
|
||||
%41 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %40, ptr %39, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %41)
|
||||
unreachable
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare ptr @malloc(i64)
|
||||
|
||||
define ptr @"main._llgo_routine$1"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { { ptr, ptr } }, ptr %0, align 8
|
||||
%2 = extractvalue { { ptr, ptr } } %1, 0
|
||||
%3 = extractvalue { ptr, ptr } %2, 1
|
||||
%4 = extractvalue { ptr, ptr } %2, 0
|
||||
call void %4(ptr %3)
|
||||
call void @free(ptr %0)
|
||||
ret ptr null
|
||||
}
|
||||
|
||||
declare void @free(ptr)
|
||||
|
||||
declare i32 @"github.com/goplus/llgo/internal/runtime.CreateThread"(ptr, ptr, ptr, ptr)
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.ChanSend"(ptr, ptr, i64)
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare { i64, i1 } @"github.com/goplus/llgo/internal/runtime.Select"(%"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_string, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %2, ptr @_llgo_string, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.ChanRecv"(ptr, ptr, i64)
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
@@ -1,325 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/cl/internal/foo.Foo" = type { ptr, float }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%main.bar = type { ptr, float }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@"_llgo_github.com/goplus/llgo/cl/internal/foo.Foo" = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [38 x i8] c"github.com/goplus/llgo/cl/internal/foo", align 1
|
||||
@1 = private unnamed_addr constant [3 x i8] c"Foo", align 1
|
||||
@_llgo_byte = linkonce global ptr null, align 8
|
||||
@"*_llgo_byte" = linkonce global ptr null, align 8
|
||||
@_llgo_float32 = linkonce global ptr null, align 8
|
||||
@"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs" = linkonce global ptr null, align 8
|
||||
@2 = private unnamed_addr constant [2 x i8] c"pb", align 1
|
||||
@3 = private unnamed_addr constant [1 x i8] c"F", align 1
|
||||
@4 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@5 = private unnamed_addr constant [2 x i8] c"Pb", align 1
|
||||
@"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE" = linkonce global ptr null, align 8
|
||||
@_llgo_main.bar = linkonce global ptr null, align 8
|
||||
@6 = private unnamed_addr constant [3 x i8] c"bar", align 1
|
||||
@"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo" = linkonce global ptr null, align 8
|
||||
@7 = private unnamed_addr constant [1 x i8] c"f", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@8 = private unnamed_addr constant [6 x i8] c"notOk:", align 1
|
||||
|
||||
define { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } @main.Bar(%"github.com/goplus/llgo/internal/runtime.eface" %0) {
|
||||
_llgo_0:
|
||||
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 0
|
||||
%2 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||
%3 = icmp eq ptr %1, %2
|
||||
br i1 %3, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 1
|
||||
%5 = load %"github.com/goplus/llgo/cl/internal/foo.Foo", ptr %4, align 8
|
||||
%6 = insertvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } undef, %"github.com/goplus/llgo/cl/internal/foo.Foo" %5, 0
|
||||
%7 = insertvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %6, i1 true, 1
|
||||
br label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
br label %_llgo_3
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2, %_llgo_1
|
||||
%8 = phi { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } [ %7, %_llgo_1 ], [ zeroinitializer, %_llgo_2 ]
|
||||
%9 = extractvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %8, 0
|
||||
%10 = extractvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %8, 1
|
||||
%11 = insertvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } undef, %"github.com/goplus/llgo/cl/internal/foo.Foo" %9, 0
|
||||
%12 = insertvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %11, i1 %10, 1
|
||||
ret { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %12
|
||||
}
|
||||
|
||||
define { %main.bar, i1 } @main.Foo(%"github.com/goplus/llgo/internal/runtime.eface" %0) {
|
||||
_llgo_0:
|
||||
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 0
|
||||
%2 = load ptr, ptr @_llgo_main.bar, align 8
|
||||
%3 = icmp eq ptr %1, %2
|
||||
br i1 %3, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %0, 1
|
||||
%5 = load %main.bar, ptr %4, align 8
|
||||
%6 = insertvalue { %main.bar, i1 } undef, %main.bar %5, 0
|
||||
%7 = insertvalue { %main.bar, i1 } %6, i1 true, 1
|
||||
br label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
br label %_llgo_3
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2, %_llgo_1
|
||||
%8 = phi { %main.bar, i1 } [ %7, %_llgo_1 ], [ zeroinitializer, %_llgo_2 ]
|
||||
%9 = extractvalue { %main.bar, i1 } %8, 0
|
||||
%10 = extractvalue { %main.bar, i1 } %8, 1
|
||||
%11 = insertvalue { %main.bar, i1 } undef, %main.bar %9, 0
|
||||
%12 = insertvalue { %main.bar, i1 } %11, i1 %10, 1
|
||||
ret { %main.bar, i1 } %12
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"github.com/goplus/llgo/cl/internal/foo.init"()
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = alloca %main.bar, align 8
|
||||
call void @llvm.memset(ptr %2, i8 0, i64 16, i1 false)
|
||||
%3 = call { %main.bar, i1 } @main.Foo(%"github.com/goplus/llgo/internal/runtime.eface" zeroinitializer)
|
||||
%4 = extractvalue { %main.bar, i1 } %3, 0
|
||||
store %main.bar %4, ptr %2, align 8
|
||||
%5 = extractvalue { %main.bar, i1 } %3, 1
|
||||
%6 = getelementptr inbounds %main.bar, ptr %2, i32 0, i32 0
|
||||
%7 = load ptr, ptr %6, align 8
|
||||
%8 = getelementptr inbounds %main.bar, ptr %2, i32 0, i32 1
|
||||
%9 = load float, ptr %8, align 4
|
||||
%10 = xor i1 %5, true
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %7)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%11 = fpext float %9 to double
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %11)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 6 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%12 = alloca %"github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||
call void @llvm.memset(ptr %12, i8 0, i64 16, i1 false)
|
||||
%13 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/cl/internal/foo.Foo" zeroinitializer, ptr %14, align 8
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %13, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %15, ptr %14, 1
|
||||
%17 = call { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } @main.Bar(%"github.com/goplus/llgo/internal/runtime.eface" %16)
|
||||
%18 = extractvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %17, 0
|
||||
store %"github.com/goplus/llgo/cl/internal/foo.Foo" %18, ptr %12, align 8
|
||||
%19 = extractvalue { %"github.com/goplus/llgo/cl/internal/foo.Foo", i1 } %17, 1
|
||||
%20 = load %"github.com/goplus/llgo/cl/internal/foo.Foo", ptr %12, align 8
|
||||
%21 = call ptr @"github.com/goplus/llgo/cl/internal/foo.Foo.Pb"(%"github.com/goplus/llgo/cl/internal/foo.Foo" %20)
|
||||
%22 = getelementptr inbounds %"github.com/goplus/llgo/cl/internal/foo.Foo", ptr %12, i32 0, i32 1
|
||||
%23 = load float, ptr %22, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %21)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%24 = fpext float %23 to double
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %24)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %19)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 38 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 3 }, i64 25, i64 16, i64 1, i64 1)
|
||||
%1 = load ptr, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||
%2 = icmp eq ptr %1, null
|
||||
br i1 %2, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store ptr %0, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Foo", align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @_llgo_byte, align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
store ptr %5, ptr @_llgo_byte, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @_llgo_byte, align 8
|
||||
%7 = load ptr, ptr @"*_llgo_byte", align 8
|
||||
%8 = icmp eq ptr %7, null
|
||||
br i1 %8, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
%10 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %9)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %10)
|
||||
store ptr %10, ptr @"*_llgo_byte", align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%11 = load ptr, ptr @"*_llgo_byte", align 8
|
||||
%12 = load ptr, ptr @_llgo_float32, align 8
|
||||
%13 = icmp eq ptr %12, null
|
||||
br i1 %13, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 45)
|
||||
store ptr %14, ptr @_llgo_float32, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%15 = load ptr, ptr @_llgo_float32, align 8
|
||||
%16 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %16)
|
||||
%18 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 }, ptr %17, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 45)
|
||||
%20 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 1 }, ptr %19, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||
%22 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %21, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %18, ptr %22, align 8
|
||||
%23 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %21, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %20, ptr %23, align 8
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %21, 0
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %24, i64 2, 1
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %25, i64 2, 2
|
||||
%27 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %26)
|
||||
store ptr %27, ptr @"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8
|
||||
%28 = load ptr, ptr @"main.struct$qQwZyFy_4JRalRxVVsVD8R09X5t58tWjTrtJPtHbEjs", align 8
|
||||
br i1 %2, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%29 = load ptr, ptr @"*_llgo_byte", align 8
|
||||
%30 = load ptr, ptr @"*_llgo_byte", align 8
|
||||
%31 = load ptr, ptr @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE", align 8
|
||||
%32 = icmp eq ptr %31, null
|
||||
br i1 %32, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_10: ; preds = %_llgo_12, %_llgo_8
|
||||
%33 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 3 }, i64 25, i64 16, i64 0, i64 0)
|
||||
store ptr %33, ptr @_llgo_main.bar, align 8
|
||||
%34 = load ptr, ptr @"*_llgo_byte", align 8
|
||||
%35 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
%36 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %35)
|
||||
%37 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 }, ptr %36, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%38 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 45)
|
||||
%39 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 1 }, ptr %38, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%40 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||
%41 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %40, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %37, ptr %41, align 8
|
||||
%42 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %40, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %39, ptr %42, align 8
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %40, 0
|
||||
%44 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %43, i64 2, 1
|
||||
%45 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %44, i64 2, 2
|
||||
%46 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %45)
|
||||
store ptr %46, ptr @"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8
|
||||
%47 = load ptr, ptr @"main.struct$Ci43nzKYkRLddRL_N4mkykxLXfJlqJGS5n04LKThPNo", align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %33, ptr %47, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
ret void
|
||||
|
||||
_llgo_11: ; preds = %_llgo_9
|
||||
%48 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%49 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %48, 0
|
||||
%50 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %49, i64 0, 1
|
||||
%51 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %50, i64 0, 2
|
||||
%52 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%53 = getelementptr ptr, ptr %52, i64 0
|
||||
store ptr %30, ptr %53, align 8
|
||||
%54 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %52, 0
|
||||
%55 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %54, i64 1, 1
|
||||
%56 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %55, i64 1, 2
|
||||
%57 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %51, %"github.com/goplus/llgo/internal/runtime.Slice" %56, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %57)
|
||||
store ptr %57, ptr @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE", align 8
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_9
|
||||
%58 = load ptr, ptr @"_llgo_func$NfGSLZ1QiKRoFkKeqYSXE5hUU5bpeteSJKrbMNUzYRE", align 8
|
||||
%59 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 2 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1
|
||||
%60 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %59, ptr @"github.com/goplus/llgo/cl/internal/foo.(*Foo).Pb", 2
|
||||
%61 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %60, ptr @"github.com/goplus/llgo/cl/internal/foo.(*Foo).Pb", 3
|
||||
%62 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 2 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1
|
||||
%63 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %62, ptr @"github.com/goplus/llgo/cl/internal/foo.(*Foo).Pb", 2
|
||||
%64 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %63, ptr @"github.com/goplus/llgo/cl/internal/foo.Foo.Pb", 3
|
||||
%65 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%66 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %65, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %64, ptr %66, align 8
|
||||
%67 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %65, 0
|
||||
%68 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %67, i64 1, 1
|
||||
%69 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %68, i64 1, 2
|
||||
%70 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%71 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %70, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %61, ptr %71, align 8
|
||||
%72 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %70, 0
|
||||
%73 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %72, i64 1, 1
|
||||
%74 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %73, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, ptr %28, %"github.com/goplus/llgo/internal/runtime.Slice" %69, %"github.com/goplus/llgo/internal/runtime.Slice" %74)
|
||||
br label %_llgo_10
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/cl/internal/foo.(*Foo).Pb"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/cl/internal/foo.Foo.Pb"(%"github.com/goplus/llgo/cl/internal/foo.Foo")
|
||||
|
||||
declare void @"github.com/goplus/llgo/cl/internal/foo.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
@@ -1,218 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"main.Data[int]" = type { i64 }
|
||||
%"main.Data[string]" = type { %"github.com/goplus/llgo/internal/runtime.String" }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"main.Slice[[]int,int]" = type { %"github.com/goplus/llgo/internal/runtime.Slice" }
|
||||
%"main.Slice[[]string,string]" = type { %"github.com/goplus/llgo/internal/runtime.Slice" }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = alloca %"main.Data[int]", align 8
|
||||
call void @llvm.memset(ptr %2, i8 0, i64 8, i1 false)
|
||||
%3 = getelementptr inbounds %"main.Data[int]", ptr %2, i32 0, i32 0
|
||||
store i64 1, ptr %3, align 4
|
||||
%4 = load %"main.Data[int]", ptr %2, align 4
|
||||
%5 = extractvalue %"main.Data[int]" %4, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %5)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%6 = alloca %"main.Data[string]", align 8
|
||||
call void @llvm.memset(ptr %6, i8 0, i64 16, i1 false)
|
||||
%7 = getelementptr inbounds %"main.Data[string]", ptr %6, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %7, align 8
|
||||
%8 = load %"main.Data[string]", ptr %6, align 8
|
||||
%9 = extractvalue %"main.Data[string]" %8, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %9)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%10 = alloca %"main.Data[int]", align 8
|
||||
call void @llvm.memset(ptr %10, i8 0, i64 8, i1 false)
|
||||
%11 = getelementptr inbounds %"main.Data[int]", ptr %10, i32 0, i32 0
|
||||
store i64 100, ptr %11, align 4
|
||||
%12 = load %"main.Data[int]", ptr %10, align 4
|
||||
%13 = extractvalue %"main.Data[int]" %12, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %13)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%14 = alloca %"main.Data[string]", align 8
|
||||
call void @llvm.memset(ptr %14, i8 0, i64 16, i1 false)
|
||||
%15 = getelementptr inbounds %"main.Data[string]", ptr %14, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %15, align 8
|
||||
%16 = load %"main.Data[string]", ptr %14, align 8
|
||||
%17 = extractvalue %"main.Data[string]" %16, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %17)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 0)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%18 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 24)
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%20 = getelementptr inbounds i64, ptr %19, i64 0
|
||||
store i64 100, ptr %20, align 4
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %19, 0
|
||||
%22 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %21, i64 1, 1
|
||||
%23 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %22, i64 1, 2
|
||||
%24 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append"(ptr %18, %"github.com/goplus/llgo/internal/runtime.Slice" %23)
|
||||
%25 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 24)
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
%27 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %26, i64 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %27, align 8
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %26, 0
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %28, i64 1, 1
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %29, i64 1, 2
|
||||
%31 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"main.(*Slice[[]string,string]).Append"(ptr %25, %"github.com/goplus/llgo/internal/runtime.Slice" %30)
|
||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 24)
|
||||
%33 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%34 = getelementptr inbounds i64, ptr %33, i64 0
|
||||
store i64 1, ptr %34, align 4
|
||||
%35 = getelementptr inbounds i64, ptr %33, i64 1
|
||||
store i64 2, ptr %35, align 4
|
||||
%36 = getelementptr inbounds i64, ptr %33, i64 2
|
||||
store i64 3, ptr %36, align 4
|
||||
%37 = getelementptr inbounds i64, ptr %33, i64 3
|
||||
store i64 4, ptr %37, align 4
|
||||
%38 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %33, 0
|
||||
%39 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %38, i64 4, 1
|
||||
%40 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %39, i64 4, 2
|
||||
%41 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append"(ptr %32, %"github.com/goplus/llgo/internal/runtime.Slice" %40)
|
||||
%42 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%43 = getelementptr inbounds i64, ptr %42, i64 0
|
||||
store i64 1, ptr %43, align 4
|
||||
%44 = getelementptr inbounds i64, ptr %42, i64 1
|
||||
store i64 2, ptr %44, align 4
|
||||
%45 = getelementptr inbounds i64, ptr %42, i64 2
|
||||
store i64 3, ptr %45, align 4
|
||||
%46 = getelementptr inbounds i64, ptr %42, i64 3
|
||||
store i64 4, ptr %46, align 4
|
||||
%47 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %42, 0
|
||||
%48 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %47, i64 4, 1
|
||||
%49 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %48, i64 4, 2
|
||||
%50 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append2"(ptr %32, %"github.com/goplus/llgo/internal/runtime.Slice" %49)
|
||||
%51 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %18, i32 0, i32 0
|
||||
%52 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %51, align 8
|
||||
%53 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %18, i32 0, i32 0
|
||||
%54 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %53, align 8
|
||||
%55 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %54, 0
|
||||
%56 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %54, 1
|
||||
%57 = icmp sge i64 0, %56
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %57)
|
||||
%58 = getelementptr inbounds i64, ptr %55, i64 0
|
||||
%59 = load i64, ptr %58, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %52)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %59)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%60 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %25, i32 0, i32 0
|
||||
%61 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %60, align 8
|
||||
%62 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %25, i32 0, i32 0
|
||||
%63 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %62, align 8
|
||||
%64 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %63, 0
|
||||
%65 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %63, 1
|
||||
%66 = icmp sge i64 0, %65
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %66)
|
||||
%67 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %64, i64 0
|
||||
%68 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %67, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %61)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %68)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%69 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %32, i32 0, i32 0
|
||||
%70 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %69, align 8
|
||||
%71 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %32, i32 0, i32 0
|
||||
%72 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %71, align 8
|
||||
%73 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %72, 0
|
||||
%74 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %72, 1
|
||||
%75 = icmp sge i64 0, %74
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %75)
|
||||
%76 = getelementptr inbounds i64, ptr %73, i64 0
|
||||
%77 = load i64, ptr %76, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %70)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %77)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
define linkonce %"github.com/goplus/llgo/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append"(ptr %0, %"github.com/goplus/llgo/internal/runtime.Slice" %1) {
|
||||
_llgo_0:
|
||||
%2 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
|
||||
%3 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %2, align 8
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %1, 0
|
||||
%5 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %1, 1
|
||||
%6 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/internal/runtime.Slice" %3, ptr %4, i64 %5, i64 8)
|
||||
%7 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.Slice" %6, ptr %7, align 8
|
||||
%8 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
|
||||
%9 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %8, align 8
|
||||
ret %"github.com/goplus/llgo/internal/runtime.Slice" %9
|
||||
}
|
||||
|
||||
define linkonce %"github.com/goplus/llgo/internal/runtime.Slice" @"main.(*Slice[[]string,string]).Append"(ptr %0, %"github.com/goplus/llgo/internal/runtime.Slice" %1) {
|
||||
_llgo_0:
|
||||
%2 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %0, i32 0, i32 0
|
||||
%3 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %2, align 8
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %1, 0
|
||||
%5 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %1, 1
|
||||
%6 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/internal/runtime.Slice" %3, ptr %4, i64 %5, i64 16)
|
||||
%7 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %0, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.Slice" %6, ptr %7, align 8
|
||||
%8 = getelementptr inbounds %"main.Slice[[]string,string]", ptr %0, i32 0, i32 0
|
||||
%9 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %8, align 8
|
||||
ret %"github.com/goplus/llgo/internal/runtime.Slice" %9
|
||||
}
|
||||
|
||||
define linkonce %"github.com/goplus/llgo/internal/runtime.Slice" @"main.(*Slice[[]int,int]).Append2"(ptr %0, %"github.com/goplus/llgo/internal/runtime.Slice" %1) {
|
||||
_llgo_0:
|
||||
%2 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
|
||||
%3 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %2, align 8
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %1, 0
|
||||
%5 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %1, 1
|
||||
%6 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/internal/runtime.Slice" %3, ptr %4, i64 %5, i64 8)
|
||||
%7 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.Slice" %6, ptr %7, align 8
|
||||
%8 = getelementptr inbounds %"main.Slice[[]int,int]", ptr %0, i32 0, i32 0
|
||||
%9 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %8, align 8
|
||||
ret %"github.com/goplus/llgo/internal/runtime.Slice" %9
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/internal/runtime.Slice", ptr, i64, i64)
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
@@ -1,101 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [1 x i8] c"a", align 1
|
||||
@1 = private unnamed_addr constant [1 x i8] c"b", align 1
|
||||
@2 = private unnamed_addr constant [1 x i8] c"c", align 1
|
||||
@3 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 48)
|
||||
%3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 1 }, ptr %3, align 8
|
||||
%4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 1 }, ptr %4, align 8
|
||||
%5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 2
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 1 }, ptr %5, align 8
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %2, 0
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %6, i64 3, 1
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %7, i64 3, 2
|
||||
%9 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, 1
|
||||
%10 = add i64 %9, 1
|
||||
%11 = alloca ptr, i64 %10, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_1: ; preds = %_llgo_3, %_llgo_6
|
||||
%12 = phi i64 [ 0, %_llgo_6 ], [ %17, %_llgo_3 ]
|
||||
%13 = getelementptr ptr, ptr %11, i64 %12
|
||||
%14 = load ptr, ptr %13, align 8
|
||||
%15 = icmp eq ptr %14, null
|
||||
br i1 %15, label %_llgo_2, label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1
|
||||
ret i32 0
|
||||
|
||||
_llgo_3: ; preds = %_llgo_1
|
||||
%16 = call i32 (ptr, ...) @printf(ptr @3, ptr %14)
|
||||
%17 = add i64 %12, 1
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_4: ; preds = %_llgo_5, %_llgo_0
|
||||
%18 = phi i64 [ 0, %_llgo_0 ], [ %32, %_llgo_5 ]
|
||||
%19 = icmp slt i64 %18, %9
|
||||
br i1 %19, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%20 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, 0
|
||||
%21 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, 1
|
||||
%22 = icmp slt i64 %18, 0
|
||||
%23 = icmp sge i64 %18, %21
|
||||
%24 = or i1 %23, %22
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %24)
|
||||
%25 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %20, i64 %18
|
||||
%26 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %25, align 8
|
||||
%27 = getelementptr ptr, ptr %11, i64 %18
|
||||
%28 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %26, 1
|
||||
%29 = add i64 %28, 1
|
||||
%30 = alloca i8, i64 %29, align 1
|
||||
%31 = call ptr @"github.com/goplus/llgo/internal/runtime.CStrCopy"(ptr %30, %"github.com/goplus/llgo/internal/runtime.String" %26)
|
||||
store ptr %31, ptr %27, align 8
|
||||
%32 = add i64 %18, 1
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_6: ; preds = %_llgo_4
|
||||
%33 = getelementptr ptr, ptr %11, i64 %9
|
||||
store ptr null, ptr %33, align 8
|
||||
br label %_llgo_1
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.CStrCopy"(ptr, %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare i32 @printf(ptr, ...)
|
||||
@@ -1,74 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [5 x i8] c"addr:", align 1
|
||||
@1 = private unnamed_addr constant [10 x i8] c"abs(3+4i):", align 1
|
||||
@2 = private unnamed_addr constant [11 x i8] c"real(3+4i):", align 1
|
||||
@3 = private unnamed_addr constant [11 x i8] c"imag(3+4i):", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define void @main.f({ float, float } %0, { float, float } %1, ptr %2) {
|
||||
_llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %2)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%3 = call float @cabsf({ float, float } %0)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 10 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%4 = fpext float %3 to double
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%5 = extractvalue { float, float } %1, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 11 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%6 = fpext float %5 to double
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %6)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%7 = extractvalue { float, float } %1, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 11 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%8 = fpext float %7 to double
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %8)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @main.f({ float, float } { float 3.000000e+00, float 4.000000e+00 }, { float, float } { float 3.000000e+00, float 4.000000e+00 }, ptr @main.f)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
||||
|
||||
declare float @cabsf({ float, float })
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
@@ -1,100 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [6 x i8] c"store:", align 1
|
||||
@1 = private unnamed_addr constant [4 x i8] c"ret:", align 1
|
||||
@2 = private unnamed_addr constant [2 x i8] c"v:", align 1
|
||||
@3 = private unnamed_addr constant [4 x i8] c"swp:", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"sync/atomic.init"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
store atomic i64 100, ptr %2 seq_cst, align 4
|
||||
%3 = load atomic i64, ptr %2 seq_cst, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 6 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%4 = call i64 @"sync/atomic.AddInt64"(ptr %2, i64 1)
|
||||
%5 = load i64, ptr %2, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %5)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%6 = call i1 @"sync/atomic.CompareAndSwapInt64"(ptr %2, i64 100, i64 102)
|
||||
%7 = load i64, ptr %2, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %6)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %7)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%8 = call i1 @"sync/atomic.CompareAndSwapInt64"(ptr %2, i64 101, i64 102)
|
||||
%9 = load i64, ptr %2, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %8)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %9)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%10 = call i64 @"sync/atomic.AddInt64"(ptr %2, i64 -1)
|
||||
%11 = load i64, ptr %2, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %11)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"sync/atomic.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
declare i64 @"sync/atomic.AddInt64"(ptr, i64)
|
||||
|
||||
declare i1 @"sync/atomic.CompareAndSwapInt64"(ptr, i64, i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
@@ -1,81 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [6 x i8] c"Hello ", align 1
|
||||
@1 = private unnamed_addr constant [5 x i8] c"World", align 1
|
||||
@2 = private unnamed_addr constant [3 x i8] c"buf", align 1
|
||||
@3 = private unnamed_addr constant [2 x i8] c"Go", align 1
|
||||
@4 = private unnamed_addr constant [2 x i8] c"go", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @bytes.init()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 40)
|
||||
%3 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 6 })
|
||||
%4 = call { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @"bytes.(*Buffer).Write"(ptr %2, %"github.com/goplus/llgo/internal/runtime.Slice" %3)
|
||||
%5 = call { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @"bytes.(*Buffer).WriteString"(ptr %2, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 })
|
||||
%6 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"bytes.(*Buffer).Bytes"(ptr %2)
|
||||
%7 = call %"github.com/goplus/llgo/internal/runtime.String" @"bytes.(*Buffer).String"(ptr %2)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 3 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %6)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %7)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%8 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 2 })
|
||||
%9 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 2 })
|
||||
%10 = call i1 @bytes.EqualFold(%"github.com/goplus/llgo/internal/runtime.Slice" %8, %"github.com/goplus/llgo/internal/runtime.Slice" %9)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @bytes.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @"bytes.(*Buffer).Write"(ptr, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @"bytes.(*Buffer).WriteString"(ptr, %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"bytes.(*Buffer).Bytes"(ptr)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"bytes.(*Buffer).String"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare i1 @bytes.EqualFold(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
@@ -1,67 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [10 x i8] c"abs(3+4i):", align 1
|
||||
@1 = private unnamed_addr constant [11 x i8] c"real(3+4i):", align 1
|
||||
@2 = private unnamed_addr constant [11 x i8] c"imag(3+4i):", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define void @main.f({ double, double } %0, { double, double } %1) {
|
||||
_llgo_0:
|
||||
%2 = call double @cabs({ double, double } %0)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 10 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %2)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%3 = extractvalue { double, double } %1, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 11 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%4 = extractvalue { double, double } %1, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 11 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"math/cmplx.init"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @main.f({ double, double } { double 3.000000e+00, double 4.000000e+00 }, { double, double } { double 3.000000e+00, double 4.000000e+00 })
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare double @cabs({ double, double })
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double)
|
||||
|
||||
declare void @"math/cmplx.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
@@ -1,50 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [5 x i8] c"error", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @errors.init()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call %"github.com/goplus/llgo/internal/runtime.iface" @errors.New(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 })
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %2)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %2, 1
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %3, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, ptr %4, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %6)
|
||||
unreachable
|
||||
}
|
||||
|
||||
declare void @errors.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.iface" @errors.New(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
@@ -1,45 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [4 x i8] c"host", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"net/textproto.init"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call %"github.com/goplus/llgo/internal/runtime.String" @"net/textproto.CanonicalMIMEHeaderKey"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %2)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"net/textproto.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"net/textproto.CanonicalMIMEHeaderKey"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
@@ -1,77 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [4 x i8] c"cwd:", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @os.init()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call { %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.iface" } @os.Getwd()
|
||||
%3 = extractvalue { %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.iface" } %2, 0
|
||||
%4 = extractvalue { %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.iface" } %2, 1
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %4)
|
||||
%6 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %4, 1
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %5, 0
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %7, ptr %6, 1
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %9, 0
|
||||
%11 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %10, ptr null, 1
|
||||
%12 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %8, %"github.com/goplus/llgo/internal/runtime.eface" %11)
|
||||
%13 = xor i1 %12, true
|
||||
br i1 %13, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %4)
|
||||
%15 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %4, 1
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %14, 0
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %16, ptr %15, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %17)
|
||||
unreachable
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @os.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare { %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.iface" } @os.Getwd()
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface", %"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
@@ -1,110 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [6 x i8] c"Hello ", align 1
|
||||
@1 = private unnamed_addr constant [5 x i8] c"World", align 1
|
||||
@2 = private unnamed_addr constant [4 x i8] c"len:", align 1
|
||||
@3 = private unnamed_addr constant [4 x i8] c"cap:", align 1
|
||||
@4 = private unnamed_addr constant [7 x i8] c"string:", align 1
|
||||
@5 = private unnamed_addr constant [13 x i8] c"Hello, \E4\B8\96\E7\95\8C", align 1
|
||||
@6 = private unnamed_addr constant [12 x i8] c"Hello, world", align 1
|
||||
@unicode.Han = external global ptr, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @strings.init()
|
||||
call void @unicode.init()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%3 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 6 })
|
||||
%4 = call { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @"strings.(*Builder).Write"(ptr %2, %"github.com/goplus/llgo/internal/runtime.Slice" %3)
|
||||
%5 = call { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @"strings.(*Builder).WriteString"(ptr %2, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 })
|
||||
%6 = call i64 @"strings.(*Builder).Len"(ptr %2)
|
||||
%7 = call i64 @"strings.(*Builder).Cap"(ptr %2)
|
||||
%8 = call %"github.com/goplus/llgo/internal/runtime.String" @"strings.(*Builder).String"(ptr %2)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %6)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %7)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 7 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %8)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%9 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 13 }, { ptr, ptr } { ptr @"__llgo_stub.main.main$1", ptr null })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %9)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%10 = call i64 @strings.IndexFunc(%"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 12 }, { ptr, ptr } { ptr @"__llgo_stub.main.main$1", ptr null })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define i1 @"main.main$1"(i32 %0) {
|
||||
_llgo_0:
|
||||
%1 = load ptr, ptr @unicode.Han, align 8
|
||||
%2 = call i1 @unicode.Is(ptr %1, i32 %0)
|
||||
ret i1 %2
|
||||
}
|
||||
|
||||
declare void @strings.init()
|
||||
|
||||
declare void @unicode.init()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @"strings.(*Builder).Write"(ptr, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare { i64, %"github.com/goplus/llgo/internal/runtime.iface" } @"strings.(*Builder).WriteString"(ptr, %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare i64 @"strings.(*Builder).Len"(ptr)
|
||||
|
||||
declare i64 @"strings.(*Builder).Cap"(ptr)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"strings.(*Builder).String"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
declare i64 @strings.IndexFunc(%"github.com/goplus/llgo/internal/runtime.String", { ptr, ptr })
|
||||
|
||||
define linkonce i1 @"__llgo_stub.main.main$1"(ptr %0, i32 %1) {
|
||||
_llgo_0:
|
||||
%2 = tail call i1 @"main.main$1"(i32 %1)
|
||||
ret i1 %2
|
||||
}
|
||||
|
||||
declare i1 @unicode.Is(ptr, i32)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,523 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
|
||||
@main.a = global i64 0, align 8
|
||||
@main.b = global i64 0, align 8
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@main.n = global i64 0, align 8
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
@1 = private unnamed_addr constant [3 x i8] c"def", align 1
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@2 = private unnamed_addr constant [4 x i8] c"ABCD", align 1
|
||||
@3 = private unnamed_addr constant [7 x i8] c"\E4\B8\ADabcd", align 1
|
||||
@4 = private unnamed_addr constant [3 x i8] c"abc", align 1
|
||||
@5 = private unnamed_addr constant [3 x i8] c"abd", align 1
|
||||
@6 = private unnamed_addr constant [2 x i8] c"fn", align 1
|
||||
|
||||
define double @main.Float64frombits(i64 %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
store i64 %0, ptr %1, align 4
|
||||
%2 = load double, ptr %1, align 8
|
||||
ret double %2
|
||||
}
|
||||
|
||||
define double @main.Inf(i64 %0) {
|
||||
_llgo_0:
|
||||
%1 = icmp sge i64 %0, 0
|
||||
br i1 %1, label %_llgo_1, label %_llgo_3
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_3, %_llgo_1
|
||||
%2 = phi i64 [ 9218868437227405312, %_llgo_1 ], [ -4503599627370496, %_llgo_3 ]
|
||||
%3 = call double @main.Float64frombits(i64 %2)
|
||||
ret double %3
|
||||
|
||||
_llgo_3: ; preds = %_llgo_0
|
||||
br label %_llgo_2
|
||||
}
|
||||
|
||||
define i1 @main.IsNaN(double %0) {
|
||||
_llgo_0:
|
||||
%1 = fcmp une double %0, %0
|
||||
ret i1 %1
|
||||
}
|
||||
|
||||
define double @main.NaN() {
|
||||
_llgo_0:
|
||||
%0 = call double @main.Float64frombits(i64 9221120237041090561)
|
||||
ret double %0
|
||||
}
|
||||
|
||||
define void @main.demo() {
|
||||
_llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
store i64 9223372036854775807, ptr @main.a, align 4
|
||||
store i64 -9223372036854775808, ptr @main.b, align 4
|
||||
store i64 -1, ptr @main.n, align 4
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%3 = getelementptr inbounds i64, ptr %2, i64 0
|
||||
store i64 1, ptr %3, align 4
|
||||
%4 = getelementptr inbounds i64, ptr %2, i64 1
|
||||
store i64 2, ptr %4, align 4
|
||||
%5 = getelementptr inbounds i64, ptr %2, i64 2
|
||||
store i64 3, ptr %5, align 4
|
||||
%6 = getelementptr inbounds i64, ptr %2, i64 3
|
||||
store i64 4, ptr %6, align 4
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %2, 0
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %7, i64 4, 1
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, i64 4, 2
|
||||
%10 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%11 = getelementptr inbounds i64, ptr %10, i64 0
|
||||
%12 = getelementptr inbounds i64, ptr %10, i64 1
|
||||
%13 = getelementptr inbounds i64, ptr %10, i64 2
|
||||
%14 = getelementptr inbounds i64, ptr %10, i64 3
|
||||
store i64 1, ptr %11, align 4
|
||||
store i64 2, ptr %12, align 4
|
||||
store i64 3, ptr %13, align 4
|
||||
store i64 4, ptr %14, align 4
|
||||
%15 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 10)
|
||||
%16 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %15, i64 1, i64 10, i64 0, i64 4, i64 10)
|
||||
%17 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 1
|
||||
%18 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %9)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %17)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %18)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%19 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %16, 1
|
||||
%20 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %16, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %16)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %19)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %20)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%22 = getelementptr inbounds i64, ptr %21, i64 0
|
||||
store i64 1, ptr %22, align 4
|
||||
%23 = getelementptr inbounds i64, ptr %21, i64 1
|
||||
store i64 2, ptr %23, align 4
|
||||
%24 = getelementptr inbounds i64, ptr %21, i64 2
|
||||
store i64 3, ptr %24, align 4
|
||||
%25 = getelementptr inbounds i64, ptr %21, i64 3
|
||||
store i64 4, ptr %25, align 4
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %21, 0
|
||||
%27 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %26, i64 4, 1
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %27, i64 4, 2
|
||||
%29 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %28, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %29)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%30 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 2
|
||||
%31 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 1
|
||||
%32 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 0
|
||||
%33 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %32, i64 8, i64 %30, i64 1, i64 %31, i64 %30)
|
||||
%34 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %33, 1
|
||||
%35 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 2
|
||||
%36 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 1
|
||||
%37 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 0
|
||||
%38 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %37, i64 8, i64 %35, i64 1, i64 %36, i64 %35)
|
||||
%39 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %38, 2
|
||||
%40 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 2
|
||||
%41 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 0
|
||||
%42 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %41, i64 8, i64 %40, i64 1, i64 2, i64 %40)
|
||||
%43 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %42, 1
|
||||
%44 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 2
|
||||
%45 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 0
|
||||
%46 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %45, i64 8, i64 %44, i64 1, i64 2, i64 %44)
|
||||
%47 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %46, 2
|
||||
%48 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 2
|
||||
%49 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 0
|
||||
%50 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %49, i64 8, i64 %48, i64 1, i64 2, i64 2)
|
||||
%51 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %50, 1
|
||||
%52 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 2
|
||||
%53 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, 0
|
||||
%54 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %53, i64 8, i64 %52, i64 1, i64 2, i64 2)
|
||||
%55 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %54, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %34)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %39)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %43)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %47)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %51)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %55)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%56 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 4, i64 4)
|
||||
%57 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %56, 1
|
||||
%58 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 4, i64 4)
|
||||
%59 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %58, 2
|
||||
%60 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 2, i64 4)
|
||||
%61 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %60, 1
|
||||
%62 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 2, i64 4)
|
||||
%63 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %62, 2
|
||||
%64 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 2, i64 2)
|
||||
%65 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %64, 1
|
||||
%66 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %10, i64 8, i64 4, i64 1, i64 2, i64 2)
|
||||
%67 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %66, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %57)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %59)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %61)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %63)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %65)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %67)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%68 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringSlice"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, i64 1, i64 5)
|
||||
%69 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringSlice"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, i64 1, i64 2)
|
||||
%70 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringSlice"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, i64 5, i64 5)
|
||||
%71 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %70, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %68)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %69)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %71)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%72 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%73 = getelementptr inbounds i64, ptr %72, i64 0
|
||||
store i64 5, ptr %73, align 4
|
||||
%74 = getelementptr inbounds i64, ptr %72, i64 1
|
||||
store i64 6, ptr %74, align 4
|
||||
%75 = getelementptr inbounds i64, ptr %72, i64 2
|
||||
store i64 7, ptr %75, align 4
|
||||
%76 = getelementptr inbounds i64, ptr %72, i64 3
|
||||
store i64 8, ptr %76, align 4
|
||||
%77 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %72, 0
|
||||
%78 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %77, i64 4, 1
|
||||
%79 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %78, i64 4, 2
|
||||
%80 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %79, 0
|
||||
%81 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %79, 1
|
||||
%82 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/internal/runtime.Slice" %9, ptr %80, i64 %81, i64 8)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %82)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%83 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 3)
|
||||
%84 = getelementptr inbounds i8, ptr %83, i64 0
|
||||
store i8 97, ptr %84, align 1
|
||||
%85 = getelementptr inbounds i8, ptr %83, i64 1
|
||||
store i8 98, ptr %85, align 1
|
||||
%86 = getelementptr inbounds i8, ptr %83, i64 2
|
||||
store i8 99, ptr %86, align 1
|
||||
%87 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %83, 0
|
||||
%88 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %87, i64 3, 1
|
||||
%89 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %88, i64 3, 2
|
||||
%90 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/internal/runtime.Slice" %89, ptr @1, i64 3, i64 1)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %90)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%91 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
%92 = load ptr, ptr @_llgo_int, align 8
|
||||
%93 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %92, 0
|
||||
%94 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %93, ptr inttoptr (i64 100 to ptr), 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %94, ptr %91, align 8
|
||||
%95 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %91, align 8
|
||||
%96 = ptrtoint ptr %91 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 true)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 0)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 100)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 -100)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 255)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 -100)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double 0.000000e+00)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double 1.005000e+02)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintEface"(%"github.com/goplus/llgo/internal/runtime.eface" %95)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %91)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %96)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%97 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 3)
|
||||
%98 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
%99 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %97, 0
|
||||
%100 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %99, i64 3, 1
|
||||
%101 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %100, i64 3, 2
|
||||
%102 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %90, 0
|
||||
%103 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %90, 1
|
||||
%104 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %101, ptr %102, i64 %103, i64 1)
|
||||
store i64 %104, ptr %98, align 4
|
||||
%105 = load i64, ptr %98, align 4
|
||||
%106 = getelementptr inbounds i8, ptr %97, i64 0
|
||||
%107 = load i8, ptr %106, align 1
|
||||
%108 = getelementptr inbounds i8, ptr %97, i64 1
|
||||
%109 = load i8, ptr %108, align 1
|
||||
%110 = getelementptr inbounds i8, ptr %97, i64 2
|
||||
%111 = load i8, ptr %110, align 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %105)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%112 = zext i8 %107 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %112)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%113 = zext i8 %109 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %113)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%114 = zext i8 %111 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %114)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%115 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr %97, i64 1, i64 3, i64 1, i64 3, i64 3)
|
||||
%116 = call i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice" %115, ptr @2, i64 4, i64 1)
|
||||
store i64 %116, ptr %98, align 4
|
||||
%117 = load i64, ptr %98, align 4
|
||||
%118 = getelementptr inbounds i8, ptr %97, i64 0
|
||||
%119 = load i8, ptr %118, align 1
|
||||
%120 = getelementptr inbounds i8, ptr %97, i64 1
|
||||
%121 = load i8, ptr %120, align 1
|
||||
%122 = getelementptr inbounds i8, ptr %97, i64 2
|
||||
%123 = load i8, ptr %122, align 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %117)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%124 = zext i8 %119 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %124)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%125 = zext i8 %121 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %125)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%126 = zext i8 %123 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %126)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%127 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%128 = getelementptr inbounds { ptr }, ptr %127, i32 0, i32 0
|
||||
store ptr %98, ptr %128, align 8
|
||||
%129 = insertvalue { ptr, ptr } { ptr @"main.main$2", ptr undef }, ptr %127, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @main.demo)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @main.demo)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @"main.main$1")
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%130 = extractvalue { ptr, ptr } %129, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %130)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%131 = call ptr @"github.com/goplus/llgo/internal/runtime.NewStringIter"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 7 })
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_2, %_llgo_0
|
||||
%132 = call { i1, i64, i32 } @"github.com/goplus/llgo/internal/runtime.StringIterNext"(ptr %131)
|
||||
%133 = extractvalue { i1, i64, i32 } %132, 0
|
||||
br i1 %133, label %_llgo_2, label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1
|
||||
%134 = extractvalue { i1, i64, i32 } %132, 1
|
||||
%135 = extractvalue { i1, i64, i32 } %132, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %134)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%136 = sext i32 %135 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %136)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_3: ; preds = %_llgo_1
|
||||
%137 = call double @main.Inf(i64 1)
|
||||
%138 = call double @main.Inf(i64 -1)
|
||||
%139 = call double @main.NaN()
|
||||
%140 = call double @main.NaN()
|
||||
%141 = call i1 @main.IsNaN(double %140)
|
||||
%142 = call i1 @main.IsNaN(double 1.000000e+00)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %137)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %138)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double %139)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %141)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %142)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%143 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 7 })
|
||||
%144 = call %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToRunes"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 7 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %143)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice" %144)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%145 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromBytes"(%"github.com/goplus/llgo/internal/runtime.Slice" %143)
|
||||
%146 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRunes"(%"github.com/goplus/llgo/internal/runtime.Slice" %144)
|
||||
%147 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %143, 0
|
||||
%148 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %143, 1
|
||||
%149 = icmp sge i64 3, %148
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %149)
|
||||
%150 = getelementptr inbounds i8, ptr %147, i64 3
|
||||
%151 = load i8, ptr %150, align 1
|
||||
%152 = sext i8 %151 to i32
|
||||
%153 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRune"(i32 %152)
|
||||
%154 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %144, 0
|
||||
%155 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %144, 1
|
||||
%156 = icmp sge i64 0, %155
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %156)
|
||||
%157 = getelementptr inbounds i32, ptr %154, i64 0
|
||||
%158 = load i32, ptr %157, align 4
|
||||
%159 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRune"(i32 %158)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %145)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %146)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %153)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %159)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%160 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 3 })
|
||||
%161 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 3 })
|
||||
%162 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 3 })
|
||||
%163 = xor i1 %162, true
|
||||
%164 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 3 })
|
||||
%165 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 3 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 3 })
|
||||
%166 = xor i1 %165, true
|
||||
%167 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 3 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 3 })
|
||||
%168 = call i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 3 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 3 })
|
||||
%169 = xor i1 %168, true
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %160)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %161)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %163)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %164)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %166)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %167)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %169)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @"main.main$1"() {
|
||||
_llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 2 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.main$2"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load { ptr }, ptr %0, align 8
|
||||
%2 = extractvalue { ptr } %1, 0
|
||||
%3 = load i64, ptr %2, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.NewSlice3"(ptr, i64, i64, i64, i64, i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintSlice"(%"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringSlice"(%"github.com/goplus/llgo/internal/runtime.String", i64, i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.SliceAppend"(%"github.com/goplus/llgo/internal/runtime.Slice", ptr, i64, i64)
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_int, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %2, ptr @_llgo_int, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintEface"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
||||
|
||||
declare i64 @"github.com/goplus/llgo/internal/runtime.SliceCopy"(%"github.com/goplus/llgo/internal/runtime.Slice", ptr, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewStringIter"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare { i1, i64, i32 } @"github.com/goplus/llgo/internal/runtime.StringIterNext"(ptr)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToBytes"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.Slice" @"github.com/goplus/llgo/internal/runtime.StringToRunes"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromBytes"(%"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRunes"(%"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringFromRune"(i32)
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.StringLess"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
@@ -1,213 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU" = linkonce global ptr null, align 8
|
||||
@_llgo_Pointer = linkonce global ptr null, align 8
|
||||
@"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk" = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [2 x i8] c"$f", align 1
|
||||
@1 = private unnamed_addr constant [5 x i8] c"$data", align 1
|
||||
@2 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@3 = private unnamed_addr constant [5 x i8] c"error", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 8)
|
||||
store i64 200, ptr %2, align 4
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%4 = getelementptr inbounds { ptr }, ptr %3, i32 0, i32 0
|
||||
store ptr %2, ptr %4, align 8
|
||||
%5 = insertvalue { ptr, ptr } { ptr @"main.main$1", ptr undef }, ptr %3, 1
|
||||
%6 = load ptr, ptr @_llgo_int, align 8
|
||||
%7 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8
|
||||
%8 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%9 = load ptr, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
|
||||
%10 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store { ptr, ptr } %5, ptr %10, align 8
|
||||
%11 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %9, 0
|
||||
%12 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %11, ptr %10, 1
|
||||
%13 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %12, 0
|
||||
%14 = load ptr, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
|
||||
%15 = icmp eq ptr %13, %14
|
||||
br i1 %15, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_1: ; preds = %_llgo_5
|
||||
%16 = load ptr, ptr @_llgo_string, align 8
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 5 }, ptr %17, align 8
|
||||
%18 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %16, 0
|
||||
%19 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %18, ptr %17, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %19)
|
||||
unreachable
|
||||
|
||||
_llgo_2: ; preds = %_llgo_5
|
||||
%20 = extractvalue { ptr, ptr } %28, 1
|
||||
%21 = extractvalue { ptr, ptr } %28, 0
|
||||
%22 = call i64 %21(ptr %20, i64 100)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %22)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
|
||||
_llgo_3: ; preds = %_llgo_0
|
||||
%23 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %12, 1
|
||||
%24 = load { ptr, ptr }, ptr %23, align 8
|
||||
%25 = insertvalue { { ptr, ptr }, i1 } undef, { ptr, ptr } %24, 0
|
||||
%26 = insertvalue { { ptr, ptr }, i1 } %25, i1 true, 1
|
||||
br label %_llgo_5
|
||||
|
||||
_llgo_4: ; preds = %_llgo_0
|
||||
br label %_llgo_5
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4, %_llgo_3
|
||||
%27 = phi { { ptr, ptr }, i1 } [ %26, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
|
||||
%28 = extractvalue { { ptr, ptr }, i1 } %27, 0
|
||||
%29 = extractvalue { { ptr, ptr }, i1 } %27, 1
|
||||
br i1 %29, label %_llgo_2, label %_llgo_1
|
||||
}
|
||||
|
||||
define i64 @"main.main$1"(ptr %0, i64 %1) {
|
||||
_llgo_0:
|
||||
%2 = load { ptr }, ptr %0, align 8
|
||||
%3 = extractvalue { ptr } %2, 0
|
||||
%4 = load i64, ptr %3, align 4
|
||||
%5 = add i64 %4, %1
|
||||
ret i64 %5
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_int, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %2, ptr @_llgo_int, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @_llgo_int, align 8
|
||||
%4 = load ptr, ptr @_llgo_int, align 8
|
||||
%5 = load ptr, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8
|
||||
%6 = icmp eq ptr %5, null
|
||||
br i1 %6, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%8 = getelementptr ptr, ptr %7, i64 0
|
||||
store ptr %3, ptr %8, align 8
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %7, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %9, i64 1, 1
|
||||
%11 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %10, i64 1, 2
|
||||
%12 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%13 = getelementptr ptr, ptr %12, i64 0
|
||||
store ptr %4, ptr %13, align 8
|
||||
%14 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %12, 0
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %14, i64 1, 1
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %15, i64 1, 2
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %11, %"github.com/goplus/llgo/internal/runtime.Slice" %16, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %17)
|
||||
store ptr %17, ptr @"_llgo_func$ekGNsrYBSzltfAjxbl6T8H6Yq8j16wzqS3nDj2xxGMU", align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%18 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%19 = icmp eq ptr %18, null
|
||||
br i1 %19, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%20 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %20)
|
||||
store ptr %20, ptr @_llgo_Pointer, align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%21 = load ptr, ptr @_llgo_int, align 8
|
||||
%22 = load ptr, ptr @_llgo_int, align 8
|
||||
%23 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%24 = getelementptr ptr, ptr %23, i64 0
|
||||
store ptr %21, ptr %24, align 8
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %23, 0
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %25, i64 1, 1
|
||||
%27 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %26, i64 1, 2
|
||||
%28 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%29 = getelementptr ptr, ptr %28, i64 0
|
||||
store ptr %22, ptr %29, align 8
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %28, 0
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %30, i64 1, 1
|
||||
%32 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %31, i64 1, 2
|
||||
%33 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %27, %"github.com/goplus/llgo/internal/runtime.Slice" %32, i1 false)
|
||||
%34 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 2 }, ptr %33, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%35 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
%36 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, ptr %35, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%37 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||
%38 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %37, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %34, ptr %38, align 8
|
||||
%39 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %37, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %36, ptr %39, align 8
|
||||
%40 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %37, 0
|
||||
%41 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %40, i64 2, 1
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %41, i64 2, 2
|
||||
%43 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %42)
|
||||
store ptr %43, ptr @"main.struct$QIHBTaw1IFobr8yvWpq-2AJFm3xBNhdW_aNBicqUBGk", align 8
|
||||
%44 = load ptr, ptr @_llgo_string, align 8
|
||||
%45 = icmp eq ptr %44, null
|
||||
br i1 %45, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%46 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %46, ptr @_llgo_string, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
@@ -1,66 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double 1.000000e+00)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double 2.000000e+00)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintComplex"({ double, double } { double -1.000000e+00, double -2.000000e+00 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintComplex"({ double, double } { double 4.000000e+00, double 6.000000e+00 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintComplex"({ double, double } { double -2.000000e+00, double -2.000000e+00 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintComplex"({ double, double } { double -5.000000e+00, double 1.000000e+01 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintComplex"({ double, double } { double 4.400000e-01, double -8.000000e-02 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintComplex"({ double, double } { double 0x7FF0000000000000, double 0x7FF0000000000000 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintComplex"({ double, double } { double 0x7FF8000000000000, double 0x7FF8000000000000 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 true)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 true)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 true)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintFloat"(double)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintComplex"({ double, double })
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
@@ -1,95 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [3 x i8] c"...", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@1 = private unnamed_addr constant [5 x i8] c"Hello", align 1
|
||||
@2 = private unnamed_addr constant [1 x i8] c" ", align 1
|
||||
@3 = private unnamed_addr constant [5 x i8] c"World", align 1
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.String" @main.concat(%"github.com/goplus/llgo/internal/runtime.Slice" %0) {
|
||||
_llgo_0:
|
||||
%1 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 1
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_2, %_llgo_0
|
||||
%2 = phi %"github.com/goplus/llgo/internal/runtime.String" [ zeroinitializer, %_llgo_0 ], [ %13, %_llgo_2 ]
|
||||
%3 = phi i64 [ -1, %_llgo_0 ], [ %4, %_llgo_2 ]
|
||||
%4 = add i64 %3, 1
|
||||
%5 = icmp slt i64 %4, %1
|
||||
br i1 %5, label %_llgo_2, label %_llgo_3
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1
|
||||
%6 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 0
|
||||
%7 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %0, 1
|
||||
%8 = icmp slt i64 %4, 0
|
||||
%9 = icmp sge i64 %4, %7
|
||||
%10 = or i1 %9, %8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %10)
|
||||
%11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %6, i64 %4
|
||||
%12 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %11, align 8
|
||||
%13 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringCat"(%"github.com/goplus/llgo/internal/runtime.String" %2, %"github.com/goplus/llgo/internal/runtime.String" %12)
|
||||
br label %_llgo_1
|
||||
|
||||
_llgo_3: ; preds = %_llgo_1
|
||||
ret %"github.com/goplus/llgo/internal/runtime.String" %2
|
||||
}
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.String" @main.info(%"github.com/goplus/llgo/internal/runtime.String" %0) {
|
||||
_llgo_0:
|
||||
%1 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringCat"(%"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.String" %0)
|
||||
%2 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringCat"(%"github.com/goplus/llgo/internal/runtime.String" %1, %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 3 })
|
||||
ret %"github.com/goplus/llgo/internal/runtime.String" %2
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 48)
|
||||
%3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, ptr %3, align 8
|
||||
%4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 1 }, ptr %4, align 8
|
||||
%5 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %2, i64 2
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 5 }, ptr %5, align 8
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %2, 0
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %6, i64 3, 1
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %7, i64 3, 2
|
||||
%9 = call %"github.com/goplus/llgo/internal/runtime.String" @main.concat(%"github.com/goplus/llgo/internal/runtime.Slice" %8)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %9)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringCat"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
@@ -1,36 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr inttoptr (i64 100 to ptr))
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
@@ -1,632 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%main.eface = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.Type" = type { i64, i64, i32, i8, i8, i8, i8, { ptr, ptr }, ptr, %"github.com/goplus/llgo/internal/runtime.String", ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.UncommonType" = type { %"github.com/goplus/llgo/internal/runtime.String", i16, i16, i32 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
%"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@0 = private unnamed_addr constant [6 x i8] c"invoke", align 1
|
||||
@1 = private unnamed_addr constant [7 x i8] c"\09elem: ", align 1
|
||||
@2 = private unnamed_addr constant [9 x i8] c"\09uncomm: ", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@_llgo_bool = linkonce global ptr null, align 8
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@_llgo_int8 = linkonce global ptr null, align 8
|
||||
@_llgo_int16 = linkonce global ptr null, align 8
|
||||
@_llgo_int32 = linkonce global ptr null, align 8
|
||||
@_llgo_int64 = linkonce global ptr null, align 8
|
||||
@_llgo_uint = linkonce global ptr null, align 8
|
||||
@_llgo_uint8 = linkonce global ptr null, align 8
|
||||
@_llgo_uint16 = linkonce global ptr null, align 8
|
||||
@_llgo_uint32 = linkonce global ptr null, align 8
|
||||
@_llgo_uint64 = linkonce global ptr null, align 8
|
||||
@_llgo_uintptr = linkonce global ptr null, align 8
|
||||
@_llgo_float32 = linkonce global ptr null, align 8
|
||||
@_llgo_float64 = linkonce global ptr null, align 8
|
||||
@"[10]_llgo_int" = linkonce global ptr null, align 8
|
||||
@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8
|
||||
@_llgo_Pointer = linkonce global ptr null, align 8
|
||||
@"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8
|
||||
@3 = private unnamed_addr constant [2 x i8] c"$f", align 1
|
||||
@4 = private unnamed_addr constant [5 x i8] c"$data", align 1
|
||||
@5 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@"*_llgo_int" = linkonce global ptr null, align 8
|
||||
@"[]_llgo_int" = linkonce global ptr null, align 8
|
||||
@6 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM" = linkonce global ptr null, align 8
|
||||
@7 = private unnamed_addr constant [1 x i8] c"x", align 1
|
||||
@8 = private unnamed_addr constant [1 x i8] c"y", align 1
|
||||
@9 = private unnamed_addr constant [1 x i8] c"z", align 1
|
||||
@_llgo_main.T = linkonce global ptr null, align 8
|
||||
@10 = private unnamed_addr constant [1 x i8] c"T", align 1
|
||||
@11 = private unnamed_addr constant [6 x i8] c"Invoke", align 1
|
||||
|
||||
define void @"main.(*T).Invoke"(ptr %0) {
|
||||
_llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 6 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %0, ptr %1, align 8
|
||||
%2 = getelementptr inbounds %main.eface, ptr %1, i32 0, i32 0
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
call void @main.dumpTyp(ptr %3, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.dumpTyp(ptr %0, %"github.com/goplus/llgo/internal/runtime.String" %1) {
|
||||
_llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %1)
|
||||
%2 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/abi.(*Type).String"(ptr %0)
|
||||
%3 = call i64 @"github.com/goplus/llgo/internal/abi.(*Type).Kind"(ptr %0)
|
||||
%4 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 0
|
||||
%5 = load i64, ptr %4, align 4
|
||||
%6 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 1
|
||||
%7 = load i64, ptr %6, align 4
|
||||
%8 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 2
|
||||
%9 = load i32, ptr %8, align 4
|
||||
%10 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 3
|
||||
%11 = load i8, ptr %10, align 1
|
||||
%12 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 4
|
||||
%13 = load i8, ptr %12, align 1
|
||||
%14 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 10
|
||||
%15 = load ptr, ptr %14, align 8
|
||||
%16 = call ptr @"github.com/goplus/llgo/internal/abi.(*Type).Uncommon"(ptr %0)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %2)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %5)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %7)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%17 = zext i32 %9 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %17)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%18 = zext i8 %11 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %18)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%19 = zext i8 %13 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %19)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %15)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %16)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%20 = call ptr @"github.com/goplus/llgo/internal/abi.(*Type).Elem"(ptr %0)
|
||||
%21 = icmp ne ptr %20, null
|
||||
br i1 %21, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%22 = call ptr @"github.com/goplus/llgo/internal/abi.(*Type).Elem"(ptr %0)
|
||||
%23 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringCat"(%"github.com/goplus/llgo/internal/runtime.String" %1, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 7 })
|
||||
call void @main.dumpTyp(ptr %22, %"github.com/goplus/llgo/internal/runtime.String" %23)
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%24 = call ptr @"github.com/goplus/llgo/internal/abi.(*Type).Uncommon"(ptr %0)
|
||||
%25 = icmp ne ptr %24, null
|
||||
br i1 %25, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/abi.(*Type).Uncommon"(ptr %0)
|
||||
%27 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringCat"(%"github.com/goplus/llgo/internal/runtime.String" %1, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 9 })
|
||||
call void @main.dumpUncommon(ptr %26, %"github.com/goplus/llgo/internal/runtime.String" %27)
|
||||
%28 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 10
|
||||
%29 = load ptr, ptr %28, align 8
|
||||
%30 = icmp ne ptr %29, null
|
||||
br i1 %30, label %_llgo_5, label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_5, %_llgo_3, %_llgo_2
|
||||
ret void
|
||||
|
||||
_llgo_5: ; preds = %_llgo_3
|
||||
%31 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.Type", ptr %0, i32 0, i32 10
|
||||
%32 = load ptr, ptr %31, align 8
|
||||
%33 = call ptr @"github.com/goplus/llgo/internal/abi.(*Type).Uncommon"(ptr %32)
|
||||
%34 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringCat"(%"github.com/goplus/llgo/internal/runtime.String" %1, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 9 })
|
||||
call void @main.dumpUncommon(ptr %33, %"github.com/goplus/llgo/internal/runtime.String" %34)
|
||||
br label %_llgo_4
|
||||
}
|
||||
|
||||
define void @main.dumpUncommon(ptr %0, %"github.com/goplus/llgo/internal/runtime.String" %1) {
|
||||
_llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %1)
|
||||
%2 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.UncommonType", ptr %0, i32 0, i32 0
|
||||
%3 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %2, align 8
|
||||
%4 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.UncommonType", ptr %0, i32 0, i32 1
|
||||
%5 = load i16, ptr %4, align 2
|
||||
%6 = getelementptr inbounds %"github.com/goplus/llgo/internal/abi.UncommonType", ptr %0, i32 0, i32 2
|
||||
%7 = load i16, ptr %6, align 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%8 = zext i16 %5 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %8)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%9 = zext i16 %7 to i64
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 %9)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"github.com/goplus/llgo/internal/abi.init"()
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = load ptr, ptr @_llgo_bool, align 8
|
||||
%3 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %2, 0
|
||||
%4 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %3, ptr inttoptr (i64 -1 to ptr), 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %4)
|
||||
%5 = load ptr, ptr @_llgo_int, align 8
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %5, 0
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %6, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %7)
|
||||
%8 = load ptr, ptr @_llgo_int8, align 8
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %8, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %9, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %10)
|
||||
%11 = load ptr, ptr @_llgo_int16, align 8
|
||||
%12 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %11, 0
|
||||
%13 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %12, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %13)
|
||||
%14 = load ptr, ptr @_llgo_int32, align 8
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %14, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %15, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %16)
|
||||
%17 = load ptr, ptr @_llgo_int64, align 8
|
||||
%18 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %17, 0
|
||||
%19 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %18, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %19)
|
||||
%20 = load ptr, ptr @_llgo_uint, align 8
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %20, 0
|
||||
%22 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %21, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %22)
|
||||
%23 = load ptr, ptr @_llgo_uint8, align 8
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %23, 0
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %24, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %25)
|
||||
%26 = load ptr, ptr @_llgo_uint16, align 8
|
||||
%27 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %26, 0
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %27, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %28)
|
||||
%29 = load ptr, ptr @_llgo_uint32, align 8
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %29, 0
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %30, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %31)
|
||||
%32 = load ptr, ptr @_llgo_uint64, align 8
|
||||
%33 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %32, 0
|
||||
%34 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %33, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %34)
|
||||
%35 = load ptr, ptr @_llgo_uintptr, align 8
|
||||
%36 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %35, 0
|
||||
%37 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %36, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %37)
|
||||
%38 = load ptr, ptr @_llgo_float32, align 8
|
||||
%39 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %38, 0
|
||||
%40 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %39, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %40)
|
||||
%41 = load ptr, ptr @_llgo_float64, align 8
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %41, 0
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %42, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %43)
|
||||
%44 = load ptr, ptr @"[10]_llgo_int", align 8
|
||||
%45 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80)
|
||||
store [10 x i64] zeroinitializer, ptr %45, align 4
|
||||
%46 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %44, 0
|
||||
%47 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %46, ptr %45, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %47)
|
||||
%48 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%49 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%50 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
|
||||
%51 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store { ptr, ptr } { ptr @"__llgo_stub.main.main$1", ptr null }, ptr %51, align 8
|
||||
%52 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %50, 0
|
||||
%53 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %52, ptr %51, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %53)
|
||||
%54 = load ptr, ptr @"*_llgo_int", align 8
|
||||
%55 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %54, 0
|
||||
%56 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %55, ptr null, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %56)
|
||||
%57 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 0)
|
||||
%58 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %57, 0
|
||||
%59 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %58, i64 0, 1
|
||||
%60 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %59, i64 0, 2
|
||||
%61 = load ptr, ptr @"[]_llgo_int", align 8
|
||||
%62 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
store %"github.com/goplus/llgo/internal/runtime.Slice" %60, ptr %62, align 8
|
||||
%63 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %61, 0
|
||||
%64 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %63, ptr %62, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %64)
|
||||
%65 = load ptr, ptr @_llgo_string, align 8
|
||||
%66 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 5 }, ptr %66, align 8
|
||||
%67 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %65, 0
|
||||
%68 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %67, ptr %66, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %68)
|
||||
%69 = load ptr, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8
|
||||
%70 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
store { i8, i64, i64 } zeroinitializer, ptr %70, align 4
|
||||
%71 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %69, 0
|
||||
%72 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %71, ptr %70, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %72)
|
||||
%73 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%74 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, ptr %74, align 8
|
||||
%75 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %73, 0
|
||||
%76 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %75, ptr %74, 1
|
||||
call void @main.dump(%"github.com/goplus/llgo/internal/runtime.eface" %76)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @"main.main$1"() {
|
||||
_llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/abi.(*Type).String"(ptr)
|
||||
|
||||
declare i64 @"github.com/goplus/llgo/internal/abi.(*Type).Kind"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/abi.(*Type).Uncommon"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/abi.(*Type).Elem"(ptr)
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/internal/runtime.StringCat"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/abi.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_bool, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 33)
|
||||
store ptr %2, ptr @_llgo_bool, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @_llgo_int, align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %5, ptr @_llgo_int, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @_llgo_int8, align 8
|
||||
%7 = icmp eq ptr %6, null
|
||||
br i1 %7, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 35)
|
||||
store ptr %8, ptr @_llgo_int8, align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%9 = load ptr, ptr @_llgo_int16, align 8
|
||||
%10 = icmp eq ptr %9, null
|
||||
br i1 %10, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%11 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 36)
|
||||
store ptr %11, ptr @_llgo_int16, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%12 = load ptr, ptr @_llgo_int32, align 8
|
||||
%13 = icmp eq ptr %12, null
|
||||
br i1 %13, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 37)
|
||||
store ptr %14, ptr @_llgo_int32, align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
||||
%15 = load ptr, ptr @_llgo_int64, align 8
|
||||
%16 = icmp eq ptr %15, null
|
||||
br i1 %16, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 38)
|
||||
store ptr %17, ptr @_llgo_int64, align 8
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
||||
%18 = load ptr, ptr @_llgo_uint, align 8
|
||||
%19 = icmp eq ptr %18, null
|
||||
br i1 %19, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
%20 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 39)
|
||||
store ptr %20, ptr @_llgo_uint, align 8
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
%21 = load ptr, ptr @_llgo_uint8, align 8
|
||||
%22 = icmp eq ptr %21, null
|
||||
br i1 %22, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_15: ; preds = %_llgo_14
|
||||
%23 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
store ptr %23, ptr @_llgo_uint8, align 8
|
||||
br label %_llgo_16
|
||||
|
||||
_llgo_16: ; preds = %_llgo_15, %_llgo_14
|
||||
%24 = load ptr, ptr @_llgo_uint16, align 8
|
||||
%25 = icmp eq ptr %24, null
|
||||
br i1 %25, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_17: ; preds = %_llgo_16
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 41)
|
||||
store ptr %26, ptr @_llgo_uint16, align 8
|
||||
br label %_llgo_18
|
||||
|
||||
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
||||
%27 = load ptr, ptr @_llgo_uint32, align 8
|
||||
%28 = icmp eq ptr %27, null
|
||||
br i1 %28, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
%29 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 42)
|
||||
store ptr %29, ptr @_llgo_uint32, align 8
|
||||
br label %_llgo_20
|
||||
|
||||
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
||||
%30 = load ptr, ptr @_llgo_uint64, align 8
|
||||
%31 = icmp eq ptr %30, null
|
||||
br i1 %31, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_21: ; preds = %_llgo_20
|
||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 43)
|
||||
store ptr %32, ptr @_llgo_uint64, align 8
|
||||
br label %_llgo_22
|
||||
|
||||
_llgo_22: ; preds = %_llgo_21, %_llgo_20
|
||||
%33 = load ptr, ptr @_llgo_uintptr, align 8
|
||||
%34 = icmp eq ptr %33, null
|
||||
br i1 %34, label %_llgo_23, label %_llgo_24
|
||||
|
||||
_llgo_23: ; preds = %_llgo_22
|
||||
%35 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 44)
|
||||
store ptr %35, ptr @_llgo_uintptr, align 8
|
||||
br label %_llgo_24
|
||||
|
||||
_llgo_24: ; preds = %_llgo_23, %_llgo_22
|
||||
%36 = load ptr, ptr @_llgo_float32, align 8
|
||||
%37 = icmp eq ptr %36, null
|
||||
br i1 %37, label %_llgo_25, label %_llgo_26
|
||||
|
||||
_llgo_25: ; preds = %_llgo_24
|
||||
%38 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 45)
|
||||
store ptr %38, ptr @_llgo_float32, align 8
|
||||
br label %_llgo_26
|
||||
|
||||
_llgo_26: ; preds = %_llgo_25, %_llgo_24
|
||||
%39 = load ptr, ptr @_llgo_float64, align 8
|
||||
%40 = icmp eq ptr %39, null
|
||||
br i1 %40, label %_llgo_27, label %_llgo_28
|
||||
|
||||
_llgo_27: ; preds = %_llgo_26
|
||||
%41 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 46)
|
||||
store ptr %41, ptr @_llgo_float64, align 8
|
||||
br label %_llgo_28
|
||||
|
||||
_llgo_28: ; preds = %_llgo_27, %_llgo_26
|
||||
%42 = load ptr, ptr @"[10]_llgo_int", align 8
|
||||
%43 = icmp eq ptr %42, null
|
||||
br i1 %43, label %_llgo_29, label %_llgo_30
|
||||
|
||||
_llgo_29: ; preds = %_llgo_28
|
||||
%44 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%45 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 10, ptr %44)
|
||||
store ptr %45, ptr @"[10]_llgo_int", align 8
|
||||
br label %_llgo_30
|
||||
|
||||
_llgo_30: ; preds = %_llgo_29, %_llgo_28
|
||||
%46 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%47 = icmp eq ptr %46, null
|
||||
br i1 %47, label %_llgo_31, label %_llgo_32
|
||||
|
||||
_llgo_31: ; preds = %_llgo_30
|
||||
%48 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%49 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %48, 0
|
||||
%50 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %49, i64 0, 1
|
||||
%51 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %50, i64 0, 2
|
||||
%52 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%53 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %52, 0
|
||||
%54 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %53, i64 0, 1
|
||||
%55 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %54, i64 0, 2
|
||||
%56 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %51, %"github.com/goplus/llgo/internal/runtime.Slice" %55, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %56)
|
||||
store ptr %56, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br label %_llgo_32
|
||||
|
||||
_llgo_32: ; preds = %_llgo_31, %_llgo_30
|
||||
%57 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%58 = icmp eq ptr %57, null
|
||||
br i1 %58, label %_llgo_33, label %_llgo_34
|
||||
|
||||
_llgo_33: ; preds = %_llgo_32
|
||||
%59 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %59)
|
||||
store ptr %59, ptr @_llgo_Pointer, align 8
|
||||
br label %_llgo_34
|
||||
|
||||
_llgo_34: ; preds = %_llgo_33, %_llgo_32
|
||||
%60 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%61 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %60, 0
|
||||
%62 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %61, i64 0, 1
|
||||
%63 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %62, i64 0, 2
|
||||
%64 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%65 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %64, 0
|
||||
%66 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %65, i64 0, 1
|
||||
%67 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %66, i64 0, 2
|
||||
%68 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %63, %"github.com/goplus/llgo/internal/runtime.Slice" %67, i1 false)
|
||||
%69 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 2 }, ptr %68, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%70 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
%71 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 5 }, ptr %70, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%72 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||
%73 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %72, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %69, ptr %73, align 8
|
||||
%74 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %72, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %71, ptr %74, align 8
|
||||
%75 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %72, 0
|
||||
%76 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %75, i64 2, 1
|
||||
%77 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %76, i64 2, 2
|
||||
%78 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %77)
|
||||
store ptr %78, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
|
||||
%79 = load ptr, ptr @"*_llgo_int", align 8
|
||||
%80 = icmp eq ptr %79, null
|
||||
br i1 %80, label %_llgo_35, label %_llgo_36
|
||||
|
||||
_llgo_35: ; preds = %_llgo_34
|
||||
%81 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%82 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %81)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %82)
|
||||
store ptr %82, ptr @"*_llgo_int", align 8
|
||||
br label %_llgo_36
|
||||
|
||||
_llgo_36: ; preds = %_llgo_35, %_llgo_34
|
||||
%83 = load ptr, ptr @"[]_llgo_int", align 8
|
||||
%84 = icmp eq ptr %83, null
|
||||
br i1 %84, label %_llgo_37, label %_llgo_38
|
||||
|
||||
_llgo_37: ; preds = %_llgo_36
|
||||
%85 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%86 = call ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr %85)
|
||||
store ptr %86, ptr @"[]_llgo_int", align 8
|
||||
br label %_llgo_38
|
||||
|
||||
_llgo_38: ; preds = %_llgo_37, %_llgo_36
|
||||
%87 = load ptr, ptr @_llgo_string, align 8
|
||||
%88 = icmp eq ptr %87, null
|
||||
br i1 %88, label %_llgo_39, label %_llgo_40
|
||||
|
||||
_llgo_39: ; preds = %_llgo_38
|
||||
%89 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %89, ptr @_llgo_string, align 8
|
||||
br label %_llgo_40
|
||||
|
||||
_llgo_40: ; preds = %_llgo_39, %_llgo_38
|
||||
%90 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 35)
|
||||
%91 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 1 }, ptr %90, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%92 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%93 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 1 }, ptr %92, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%94 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%95 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @9, i64 1 }, ptr %94, i64 16, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%96 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 168)
|
||||
%97 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %96, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %91, ptr %97, align 8
|
||||
%98 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %96, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %93, ptr %98, align 8
|
||||
%99 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %96, i64 2
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %95, ptr %99, align 8
|
||||
%100 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %96, 0
|
||||
%101 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %100, i64 3, 1
|
||||
%102 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %101, i64 3, 2
|
||||
%103 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 4 }, i64 24, %"github.com/goplus/llgo/internal/runtime.Slice" %102)
|
||||
store ptr %103, ptr @"main.struct$RKbUG45GE4henGMAdmt0Rju0JptyR8NsX7IZLsOI0OM", align 8
|
||||
%104 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @10, i64 1 }, i64 24, i64 16, i64 0, i64 1)
|
||||
%105 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%106 = icmp eq ptr %105, null
|
||||
br i1 %106, label %_llgo_41, label %_llgo_42
|
||||
|
||||
_llgo_41: ; preds = %_llgo_40
|
||||
store ptr %104, ptr @_llgo_main.T, align 8
|
||||
br label %_llgo_42
|
||||
|
||||
_llgo_42: ; preds = %_llgo_41, %_llgo_40
|
||||
%107 = load ptr, ptr @_llgo_string, align 8
|
||||
br i1 %106, label %_llgo_43, label %_llgo_44
|
||||
|
||||
_llgo_43: ; preds = %_llgo_42
|
||||
%108 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%109 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @11, i64 6 }, ptr undef, ptr undef, ptr undef }, ptr %108, 1
|
||||
%110 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %109, ptr @"main.(*T).Invoke", 2
|
||||
%111 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %110, ptr @"main.(*T).Invoke", 3
|
||||
%112 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%113 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %112, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %111, ptr %113, align 8
|
||||
%114 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %112, 0
|
||||
%115 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %114, i64 1, 1
|
||||
%116 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %115, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %104, ptr %107, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %116)
|
||||
br label %_llgo_44
|
||||
|
||||
_llgo_44: ; preds = %_llgo_43, %_llgo_42
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
define linkonce void @"__llgo_stub.main.main$1"(ptr %0) {
|
||||
_llgo_0:
|
||||
tail call void @"main.main$1"()
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.SliceOf"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
@@ -1,98 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @"main.main$1"({ ptr, ptr } { ptr @"__llgo_stub.main.main$2", ptr null })
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @"main.main$1"({ ptr, ptr } %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
store { ptr, ptr } %0, ptr %1, align 8
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%3 = getelementptr inbounds { ptr }, ptr %2, i32 0, i32 0
|
||||
store ptr %1, ptr %3, align 8
|
||||
%4 = insertvalue { ptr, ptr } { ptr @"main.main$1$1", ptr undef }, ptr %2, 1
|
||||
%5 = extractvalue { ptr, ptr } %4, 1
|
||||
%6 = extractvalue { ptr, ptr } %4, 0
|
||||
call void %6(ptr %5, %"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.main$1$1"(ptr %0, %"github.com/goplus/llgo/internal/runtime.iface" %1) {
|
||||
_llgo_0:
|
||||
%2 = load { ptr }, ptr %0, align 8
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" %1)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %1, 1
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %3, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, ptr %4, 1
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %7, 0
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %8, ptr null, 1
|
||||
%10 = call i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface" %6, %"github.com/goplus/llgo/internal/runtime.eface" %9)
|
||||
%11 = xor i1 %10, true
|
||||
br i1 %11, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%12 = extractvalue { ptr } %2, 0
|
||||
%13 = load { ptr, ptr }, ptr %12, align 8
|
||||
%14 = extractvalue { ptr, ptr } %13, 1
|
||||
%15 = extractvalue { ptr, ptr } %13, 0
|
||||
call void %15(ptr %14, %"github.com/goplus/llgo/internal/runtime.iface" %1)
|
||||
ret void
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
%16 = extractvalue { ptr } %2, 0
|
||||
%17 = load { ptr, ptr }, ptr %16, align 8
|
||||
%18 = extractvalue { ptr, ptr } %17, 1
|
||||
%19 = extractvalue { ptr, ptr } %17, 0
|
||||
call void %19(ptr %18, %"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.main$2"(%"github.com/goplus/llgo/internal/runtime.iface" %0) {
|
||||
_llgo_0:
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
define linkonce void @"__llgo_stub.main.main$2"(ptr %0, %"github.com/goplus/llgo/internal/runtime.iface" %1) {
|
||||
_llgo_0:
|
||||
tail call void @"main.main$2"(%"github.com/goplus/llgo/internal/runtime.iface" %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.EfaceEqual"(%"github.com/goplus/llgo/internal/runtime.eface", %"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfaceType"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
@@ -1,238 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%main.rtype = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8
|
||||
@_llgo_Pointer = linkonce global ptr null, align 8
|
||||
@"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8" = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [2 x i8] c"$f", align 1
|
||||
@1 = private unnamed_addr constant [5 x i8] c"$data", align 1
|
||||
@2 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@3 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [4 x i8] c"demo", align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@5 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
|
||||
define void @main.check({ ptr, ptr } %0) {
|
||||
_llgo_0:
|
||||
%1 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%2 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%3 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
|
||||
%4 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store { ptr, ptr } { ptr @__llgo_stub.main.demo, ptr null }, ptr %4, align 8
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %3, 0
|
||||
%6 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, ptr %4, 1
|
||||
%7 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
|
||||
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store { ptr, ptr } %0, ptr %8, align 8
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %7, 0
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %9, ptr %8, 1
|
||||
%11 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %6, 0
|
||||
%12 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
|
||||
%13 = icmp eq ptr %11, %12
|
||||
br i1 %13, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%14 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %6, 1
|
||||
%15 = load { ptr, ptr }, ptr %14, align 8
|
||||
%16 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %10, 0
|
||||
%17 = load ptr, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
|
||||
%18 = icmp eq ptr %16, %17
|
||||
br i1 %18, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
%19 = load ptr, ptr @_llgo_string, align 8
|
||||
%20 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 21 }, ptr %20, align 8
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %19, 0
|
||||
%22 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %21, ptr %20, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %22)
|
||||
unreachable
|
||||
|
||||
_llgo_3: ; preds = %_llgo_1
|
||||
%23 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %10, 1
|
||||
%24 = load { ptr, ptr }, ptr %23, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintEface"(%"github.com/goplus/llgo/internal/runtime.eface" %6)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintEface"(%"github.com/goplus/llgo/internal/runtime.eface" %10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%25 = extractvalue { ptr, ptr } %0, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %25)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%26 = extractvalue { ptr, ptr } %15, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %26)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
%27 = extractvalue { ptr, ptr } %24, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %27)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr @main.demo)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%28 = call ptr @main.closurePtr(%"github.com/goplus/llgo/internal/runtime.eface" %6)
|
||||
%29 = call ptr @main.closurePtr(%"github.com/goplus/llgo/internal/runtime.eface" %10)
|
||||
%30 = icmp eq ptr %28, %29
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %30)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
|
||||
_llgo_4: ; preds = %_llgo_1
|
||||
%31 = load ptr, ptr @_llgo_string, align 8
|
||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 21 }, ptr %32, align 8
|
||||
%33 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %31, 0
|
||||
%34 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %33, ptr %32, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %34)
|
||||
unreachable
|
||||
}
|
||||
|
||||
define ptr @main.closurePtr(%"github.com/goplus/llgo/internal/runtime.eface" %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %0, ptr %1, align 8
|
||||
%2 = getelementptr inbounds %main.rtype, ptr %1, i32 0, i32 1
|
||||
%3 = load ptr, ptr %2, align 8
|
||||
%4 = getelementptr inbounds { ptr, ptr }, ptr %3, i32 0, i32 0
|
||||
%5 = load ptr, ptr %4, align 8
|
||||
ret ptr %5
|
||||
}
|
||||
|
||||
define void @main.demo() {
|
||||
_llgo_0:
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 5 })
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
call void @main.check({ ptr, ptr } { ptr @__llgo_stub.main.demo, ptr null })
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define linkonce void @__llgo_stub.main.demo(ptr %0) {
|
||||
_llgo_0:
|
||||
tail call void @main.demo()
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%3 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %2, 0
|
||||
%4 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %3, i64 0, 1
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %4, i64 0, 2
|
||||
%6 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%7 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %6, 0
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %7, i64 0, 1
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %8, i64 0, 2
|
||||
%10 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %5, %"github.com/goplus/llgo/internal/runtime.Slice" %9, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %10)
|
||||
store ptr %10, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%11 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%12 = icmp eq ptr %11, null
|
||||
br i1 %12, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%13 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %13)
|
||||
store ptr %13, ptr @_llgo_Pointer, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %14, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %15, i64 0, 1
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %16, i64 0, 2
|
||||
%18 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%19 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %18, 0
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %19, i64 0, 1
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %20, i64 0, 2
|
||||
%22 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %17, %"github.com/goplus/llgo/internal/runtime.Slice" %21, i1 false)
|
||||
%23 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 2 }, ptr %22, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%24 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
%25 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 5 }, ptr %24, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||
%27 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %26, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %23, ptr %27, align 8
|
||||
%28 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %26, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %25, ptr %28, align 8
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %26, 0
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %29, i64 2, 1
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %30, i64 2, 2
|
||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %31)
|
||||
store ptr %32, ptr @"main.struct$b7Su1hWaFih-M0M9hMk6nO_RD1K_GQu5WjIXQp6Q2e8", align 8
|
||||
%33 = load ptr, ptr @_llgo_string, align 8
|
||||
%34 = icmp eq ptr %33, null
|
||||
br i1 %34, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%35 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %35, ptr @_llgo_string, align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintEface"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
@@ -1,229 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%main.data = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice" }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@"map[_llgo_int]_llgo_string" = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [7 x i8] c"topbits", align 1
|
||||
@1 = private unnamed_addr constant [4 x i8] c"keys", align 1
|
||||
@2 = private unnamed_addr constant [5 x i8] c"elems", align 1
|
||||
@3 = private unnamed_addr constant [8 x i8] c"overflow", align 1
|
||||
@4 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@5 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 56)
|
||||
%3 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 0
|
||||
%4 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %3, align 8
|
||||
%5 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %4, 1
|
||||
%6 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 1
|
||||
%7 = load ptr, ptr %6, align 8
|
||||
%8 = call i64 @"github.com/goplus/llgo/internal/runtime.ChanLen"(ptr %7)
|
||||
%9 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 2
|
||||
%10 = load ptr, ptr %9, align 8
|
||||
%11 = call i64 @"github.com/goplus/llgo/internal/runtime.MapLen"(ptr %10)
|
||||
%12 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 3
|
||||
%13 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %12, align 8
|
||||
%14 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %13, 1
|
||||
%15 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 1
|
||||
%16 = load ptr, ptr %15, align 8
|
||||
%17 = call i64 @"github.com/goplus/llgo/internal/runtime.ChanCap"(ptr %16)
|
||||
%18 = getelementptr inbounds %main.data, ptr %2, i32 0, i32 3
|
||||
%19 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %18, align 8
|
||||
%20 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %19, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %5)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %8)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %11)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %14)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %17)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %20)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 56)
|
||||
%22 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 0
|
||||
%23 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 1
|
||||
%24 = call ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64 8, i64 2)
|
||||
%25 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 2
|
||||
%26 = load ptr, ptr @_llgo_int, align 8
|
||||
%27 = load ptr, ptr @_llgo_string, align 8
|
||||
%28 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
%29 = call ptr @"github.com/goplus/llgo/internal/runtime.MakeMap"(ptr %28, i64 1)
|
||||
%30 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
%31 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
store i64 1, ptr %31, align 4
|
||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.MapAssign"(ptr %30, ptr %29, ptr %31)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 5 }, ptr %32, align 8
|
||||
%33 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 3
|
||||
%34 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 24)
|
||||
%35 = getelementptr inbounds i64, ptr %34, i64 0
|
||||
store i64 1, ptr %35, align 4
|
||||
%36 = getelementptr inbounds i64, ptr %34, i64 1
|
||||
store i64 2, ptr %36, align 4
|
||||
%37 = getelementptr inbounds i64, ptr %34, i64 2
|
||||
store i64 3, ptr %37, align 4
|
||||
%38 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %34, 0
|
||||
%39 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %38, i64 3, 1
|
||||
%40 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %39, i64 3, 2
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 5 }, ptr %22, align 8
|
||||
store ptr %24, ptr %23, align 8
|
||||
store ptr %29, ptr %25, align 8
|
||||
store %"github.com/goplus/llgo/internal/runtime.Slice" %40, ptr %33, align 8
|
||||
%41 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 0
|
||||
%42 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %41, align 8
|
||||
%43 = extractvalue %"github.com/goplus/llgo/internal/runtime.String" %42, 1
|
||||
%44 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 1
|
||||
%45 = load ptr, ptr %44, align 8
|
||||
%46 = call i64 @"github.com/goplus/llgo/internal/runtime.ChanLen"(ptr %45)
|
||||
%47 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 2
|
||||
%48 = load ptr, ptr %47, align 8
|
||||
%49 = call i64 @"github.com/goplus/llgo/internal/runtime.MapLen"(ptr %48)
|
||||
%50 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 3
|
||||
%51 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %50, align 8
|
||||
%52 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %51, 1
|
||||
%53 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 1
|
||||
%54 = load ptr, ptr %53, align 8
|
||||
%55 = call i64 @"github.com/goplus/llgo/internal/runtime.ChanCap"(ptr %54)
|
||||
%56 = getelementptr inbounds %main.data, ptr %21, i32 0, i32 3
|
||||
%57 = load %"github.com/goplus/llgo/internal/runtime.Slice", ptr %56, align 8
|
||||
%58 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %57, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %43)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %46)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %49)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %52)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %55)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %58)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare i64 @"github.com/goplus/llgo/internal/runtime.ChanLen"(ptr)
|
||||
|
||||
declare i64 @"github.com/goplus/llgo/internal/runtime.MapLen"(ptr)
|
||||
|
||||
declare i64 @"github.com/goplus/llgo/internal/runtime.ChanCap"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewChan"(i64, i64)
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_int, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %2, ptr @_llgo_int, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @_llgo_string, align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %5, ptr @_llgo_string, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
%7 = icmp eq ptr %6, null
|
||||
br i1 %7, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%10 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
%11 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %10)
|
||||
%12 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 7 }, ptr %11, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%13 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %13)
|
||||
%15 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, ptr %14, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%16 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %16)
|
||||
%18 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 5 }, ptr %17, i64 72, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
%20 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 8 }, ptr %19, i64 200, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 224)
|
||||
%22 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %21, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %12, ptr %22, align 8
|
||||
%23 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %21, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %15, ptr %23, align 8
|
||||
%24 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %21, i64 2
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %18, ptr %24, align 8
|
||||
%25 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %21, i64 3
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %20, ptr %25, align 8
|
||||
%26 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %21, 0
|
||||
%27 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %26, i64 4, 1
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %27, i64 4, 2
|
||||
%29 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, i64 208, %"github.com/goplus/llgo/internal/runtime.Slice" %28)
|
||||
%30 = call ptr @"github.com/goplus/llgo/internal/runtime.MapOf"(ptr %8, ptr %9, ptr %29, i64 4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %30)
|
||||
store ptr %30, ptr @"map[_llgo_int]_llgo_string", align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MapOf"(ptr, ptr, ptr, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MakeMap"(ptr, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MapAssign"(ptr, ptr, ptr)
|
||||
@@ -1,65 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%main.m = type { %"github.com/goplus/llgo/internal/runtime.String" }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [2 x i8] c"a\00", align 1
|
||||
@1 = private unnamed_addr constant [2 x i8] c"b\00", align 1
|
||||
@2 = private unnamed_addr constant [2 x i8] c"c\00", align 1
|
||||
@3 = private unnamed_addr constant [2 x i8] c"d\00", align 1
|
||||
@4 = private unnamed_addr constant [2 x i8] c"1\00", align 1
|
||||
@5 = private unnamed_addr constant [2 x i8] c"2\00", align 1
|
||||
@6 = private unnamed_addr constant [2 x i8] c"3\00", align 1
|
||||
@7 = private unnamed_addr constant [2 x i8] c"4\00", align 1
|
||||
@8 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/cl/internal/linktarget.m.info"(%main.m)
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"github.com/goplus/llgo/cl/internal/linktarget.init"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @"github.com/goplus/llgo/cl/internal/linktarget.F"(ptr @0, ptr @1, ptr @2, ptr @3)
|
||||
call void @"github.com/goplus/llgo/cl/internal/linktarget.F"(ptr @4, ptr @5, ptr @6, ptr @7)
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
call void @"github.com/goplus/llgo/cl/internal/linktarget.(*m).setInfo"(ptr %2, %"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 5 })
|
||||
%3 = load %main.m, ptr %2, align 8
|
||||
%4 = call %"github.com/goplus/llgo/internal/runtime.String" @"github.com/goplus/llgo/cl/internal/linktarget.m.info"(%main.m %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/cl/internal/linktarget.F"(ptr, ptr, ptr, ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/cl/internal/linktarget.(*m).setInfo"(ptr, %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/cl/internal/linktarget.init"()
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,136 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@"map[_llgo_int]_llgo_int" = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [7 x i8] c"topbits", align 1
|
||||
@1 = private unnamed_addr constant [4 x i8] c"keys", align 1
|
||||
@2 = private unnamed_addr constant [5 x i8] c"elems", align 1
|
||||
@3 = private unnamed_addr constant [8 x i8] c"overflow", align 1
|
||||
@4 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@5 = private unnamed_addr constant [10 x i8] c"Hello %d\0A\00", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = load ptr, ptr @_llgo_int, align 8
|
||||
%3 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
|
||||
%4 = call ptr @"github.com/goplus/llgo/internal/runtime.MakeMap"(ptr %3, i64 2)
|
||||
%5 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
|
||||
%6 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
store i64 23, ptr %6, align 4
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.MapAssign"(ptr %5, ptr %4, ptr %6)
|
||||
store i64 100, ptr %7, align 4
|
||||
%8 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
store i64 7, ptr %9, align 4
|
||||
%10 = call ptr @"github.com/goplus/llgo/internal/runtime.MapAssign"(ptr %8, ptr %4, ptr %9)
|
||||
store i64 29, ptr %10, align 4
|
||||
%11 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
|
||||
%12 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
store i64 23, ptr %12, align 4
|
||||
%13 = call ptr @"github.com/goplus/llgo/internal/runtime.MapAccess1"(ptr %11, ptr %4, ptr %12)
|
||||
%14 = load i64, ptr %13, align 4
|
||||
%15 = call i32 (ptr, ...) @printf(ptr @5, i64 %14)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_int, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %2, ptr @_llgo_int, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @"map[_llgo_int]_llgo_int", align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%6 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
%8 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %7)
|
||||
%9 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 7 }, ptr %8, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%10 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%11 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %10)
|
||||
%12 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, ptr %11, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%13 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %13)
|
||||
%15 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 5 }, ptr %14, i64 72, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%16 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 44)
|
||||
%17 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 8 }, ptr %16, i64 136, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%18 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 224)
|
||||
%19 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %18, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %9, ptr %19, align 8
|
||||
%20 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %18, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %12, ptr %20, align 8
|
||||
%21 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %18, i64 2
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %15, ptr %21, align 8
|
||||
%22 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %18, i64 3
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %17, ptr %22, align 8
|
||||
%23 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %18, 0
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %23, i64 4, 1
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %24, i64 4, 2
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 4 }, i64 144, %"github.com/goplus/llgo/internal/runtime.Slice" %25)
|
||||
%27 = call ptr @"github.com/goplus/llgo/internal/runtime.MapOf"(ptr %5, ptr %6, ptr %26, i64 4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %27)
|
||||
store ptr %27, ptr @"map[_llgo_int]_llgo_int", align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MapOf"(ptr, ptr, ptr, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MakeMap"(ptr, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MapAssign"(ptr, ptr, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MapAccess1"(ptr, ptr, ptr)
|
||||
|
||||
declare i32 @printf(ptr, ...)
|
||||
@@ -1,333 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"main.T[string,int]" = type { %"github.com/goplus/llgo/internal/runtime.String", i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [1 x i8] c"a", align 1
|
||||
@"_llgo_main.T[string,int]" = linkonce global ptr null, align 8
|
||||
@1 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@2 = private unnamed_addr constant [1 x i8] c"T", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@"main.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk" = linkonce global ptr null, align 8
|
||||
@3 = private unnamed_addr constant [1 x i8] c"m", align 1
|
||||
@4 = private unnamed_addr constant [1 x i8] c"n", align 1
|
||||
@5 = private unnamed_addr constant [4 x i8] c"Demo", align 1
|
||||
@"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac" = linkonce global ptr null, align 8
|
||||
@6 = private unnamed_addr constant [4 x i8] c"Info", align 1
|
||||
@7 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
|
||||
@8 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
@"*_llgo_main.T[string,int]" = linkonce global ptr null, align 8
|
||||
@"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs" = linkonce global ptr null, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = alloca %"main.T[string,int]", align 8
|
||||
call void @llvm.memset(ptr %2, i8 0, i64 24, i1 false)
|
||||
%3 = getelementptr inbounds %"main.T[string,int]", ptr %2, i32 0, i32 0
|
||||
%4 = getelementptr inbounds %"main.T[string,int]", ptr %2, i32 0, i32 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 1 }, ptr %3, align 8
|
||||
store i64 1, ptr %4, align 4
|
||||
%5 = load %"main.T[string,int]", ptr %2, align 8
|
||||
%6 = load ptr, ptr @"_llgo_main.T[string,int]", align 8
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
store %"main.T[string,int]" %5, ptr %7, align 8
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %6, 0
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %8, ptr %7, 1
|
||||
%10 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %9, 0
|
||||
%11 = load ptr, ptr @"_llgo_main.T[string,int]", align 8
|
||||
%12 = icmp eq ptr %10, %11
|
||||
br i1 %12, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%13 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %9, 1
|
||||
%14 = load %"main.T[string,int]", ptr %13, align 8
|
||||
%15 = extractvalue %"main.T[string,int]" %14, 0
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %15)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%16 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 24)
|
||||
%17 = getelementptr inbounds %"main.T[string,int]", ptr %16, i32 0, i32 0
|
||||
%18 = getelementptr inbounds %"main.T[string,int]", ptr %16, i32 0, i32 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 5 }, ptr %17, align 8
|
||||
store i64 100, ptr %18, align 4
|
||||
%19 = load ptr, ptr @"*_llgo_main.T[string,int]", align 8
|
||||
%20 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%21 = load ptr, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8
|
||||
%22 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %21, ptr %19)
|
||||
%23 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %22, 0
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %23, ptr %16, 1
|
||||
%25 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %24)
|
||||
%26 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %24, 0
|
||||
%27 = getelementptr ptr, ptr %26, i64 3
|
||||
%28 = load ptr, ptr %27, align 8
|
||||
%29 = insertvalue { ptr, ptr } undef, ptr %28, 0
|
||||
%30 = insertvalue { ptr, ptr } %29, ptr %25, 1
|
||||
%31 = extractvalue { ptr, ptr } %30, 1
|
||||
%32 = extractvalue { ptr, ptr } %30, 0
|
||||
call void %32(ptr %31)
|
||||
%33 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 32)
|
||||
%34 = getelementptr inbounds i64, ptr %33, i64 0
|
||||
%35 = getelementptr inbounds i64, ptr %33, i64 1
|
||||
%36 = getelementptr inbounds i64, ptr %33, i64 2
|
||||
%37 = getelementptr inbounds i64, ptr %33, i64 3
|
||||
store i64 1, ptr %34, align 4
|
||||
store i64 2, ptr %35, align 4
|
||||
store i64 3, ptr %36, align 4
|
||||
store i64 4, ptr %37, align 4
|
||||
%38 = getelementptr [4 x i64], ptr %33, i64 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %38)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%39 = getelementptr [4 x i64], ptr %33, i64 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr %39)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
%40 = load ptr, ptr @_llgo_string, align 8
|
||||
%41 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 21 }, ptr %41, align 8
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %40, 0
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %42, ptr %41, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %43)
|
||||
unreachable
|
||||
}
|
||||
|
||||
define linkonce void @"main.T[string,int].Info"(%"main.T[string,int]" %0) {
|
||||
_llgo_0:
|
||||
%1 = alloca %"main.T[string,int]", align 8
|
||||
call void @llvm.memset(ptr %1, i8 0, i64 24, i1 false)
|
||||
store %"main.T[string,int]" %0, ptr %1, align 8
|
||||
%2 = getelementptr inbounds %"main.T[string,int]", ptr %1, i32 0, i32 0
|
||||
%3 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %2, align 8
|
||||
%4 = getelementptr inbounds %"main.T[string,int]", ptr %1, i32 0, i32 1
|
||||
%5 = load i64, ptr %4, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %3)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %5)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define linkonce void @"main.(*T[string,int]).Demo"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = getelementptr inbounds %"main.T[string,int]", ptr %0, i32 0, i32 0
|
||||
%2 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %1, align 8
|
||||
%3 = getelementptr inbounds %"main.T[string,int]", ptr %0, i32 0, i32 1
|
||||
%4 = load i64, ptr %3, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %2)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %4)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.(*T[string,int]).Info"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load %"main.T[string,int]", ptr %0, align 8
|
||||
call void @"main.T[string,int].Info"(%"main.T[string,int]" %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 1 }, i64 25, i64 24, i64 1, i64 2)
|
||||
%1 = load ptr, ptr @"_llgo_main.T[string,int]", align 8
|
||||
%2 = icmp eq ptr %1, null
|
||||
br i1 %2, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store ptr %0, ptr @"_llgo_main.T[string,int]", align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @_llgo_string, align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %5, ptr @_llgo_string, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @_llgo_string, align 8
|
||||
%7 = load ptr, ptr @_llgo_int, align 8
|
||||
%8 = icmp eq ptr %7, null
|
||||
br i1 %8, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %9, ptr @_llgo_int, align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%10 = load ptr, ptr @_llgo_int, align 8
|
||||
%11 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%12 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 1 }, ptr %11, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%13 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%14 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 1 }, ptr %13, i64 16, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%15 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||
%16 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %15, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %12, ptr %16, align 8
|
||||
%17 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %15, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %14, ptr %17, align 8
|
||||
%18 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %15, 0
|
||||
%19 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %18, i64 2, 1
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %19, i64 2, 2
|
||||
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, i64 24, %"github.com/goplus/llgo/internal/runtime.Slice" %20)
|
||||
store ptr %21, ptr @"main.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8
|
||||
%22 = load ptr, ptr @"main.struct$A2OTYqQyUOqOQ-i_F5iXeAKWtxeWGEuyeN7HCfULCDk", align 8
|
||||
br i1 %2, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%23 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%24 = icmp eq ptr %23, null
|
||||
br i1 %24, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_8: ; preds = %_llgo_10, %_llgo_6
|
||||
%25 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 1 }, i64 25, i64 24, i64 1, i64 2)
|
||||
%26 = load ptr, ptr @"*_llgo_main.T[string,int]", align 8
|
||||
%27 = icmp eq ptr %26, null
|
||||
br i1 %27, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_9: ; preds = %_llgo_7
|
||||
%28 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %28, 0
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %29, i64 0, 1
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %30, i64 0, 2
|
||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%33 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %32, 0
|
||||
%34 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %33, i64 0, 1
|
||||
%35 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %34, i64 0, 2
|
||||
%36 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %31, %"github.com/goplus/llgo/internal/runtime.Slice" %35, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %36)
|
||||
store ptr %36, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_7
|
||||
%37 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%38 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %37, 1
|
||||
%39 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %38, ptr @"main.(*T[string,int]).Demo", 2
|
||||
%40 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %39, ptr @"main.(*T[string,int]).Demo", 3
|
||||
%41 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %41, 1
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %42, ptr @"main.(*T[string,int]).Info", 2
|
||||
%44 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %43, ptr @"main.(*T[string,int]).Info", 3
|
||||
%45 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %41, 1
|
||||
%46 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %45, ptr @"main.(*T[string,int]).Info", 2
|
||||
%47 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %46, ptr @"main.T[string,int].Info", 3
|
||||
%48 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%49 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %48, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %47, ptr %49, align 8
|
||||
%50 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %48, 0
|
||||
%51 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %50, i64 1, 1
|
||||
%52 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %51, i64 1, 2
|
||||
%53 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 80)
|
||||
%54 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %53, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %40, ptr %54, align 8
|
||||
%55 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %53, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %44, ptr %55, align 8
|
||||
%56 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %53, 0
|
||||
%57 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %56, i64 2, 1
|
||||
%58 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %57, i64 2, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, ptr %22, %"github.com/goplus/llgo/internal/runtime.Slice" %52, %"github.com/goplus/llgo/internal/runtime.Slice" %58)
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_11: ; preds = %_llgo_8
|
||||
%59 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %25)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %59)
|
||||
store ptr %59, ptr @"*_llgo_main.T[string,int]", align 8
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_8
|
||||
%60 = load ptr, ptr @"_llgo_func$2_iS07vIlF2_rZqWB5eU0IvP_9HviM4MYZNkXZDvbac", align 8
|
||||
%61 = load ptr, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8
|
||||
%62 = icmp eq ptr %61, null
|
||||
br i1 %62, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
%63 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 4 }, ptr undef }, ptr %60, 1
|
||||
%64 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
%65 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %64, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %63, ptr %65, align 8
|
||||
%66 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %64, 0
|
||||
%67 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %66, i64 1, 1
|
||||
%68 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %67, i64 1, 2
|
||||
%69 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %68)
|
||||
store ptr %69, ptr @"_llgo_iface$BP0p_lUsEd-IbbtJVukGmgrdQkqzcoYzSiwgUvgFvUs", align 8
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintPointer"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
@@ -1,72 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 16)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 8)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64 8)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @"main.main$1"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load i64, ptr %0, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %1)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.main$2"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load i64, ptr %0, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %1)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @"main.main$3"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load i64, ptr %0, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %1)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
define linkonce void @"__llgo_stub.main.main$1"(ptr %0, ptr %1) {
|
||||
_llgo_0:
|
||||
tail call void @"main.main$1"(ptr %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintUint"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
@@ -1,372 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%main.cacheKey = type { i64, %main.T2, %"main.T3[any]", ptr, i64 }
|
||||
%main.T2 = type { i64 }
|
||||
%"main.T3[any]" = type { %"github.com/goplus/llgo/internal/runtime.eface" }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@_llgo_main.cacheKey = linkonce global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@1 = private unnamed_addr constant [8 x i8] c"cacheKey", align 1
|
||||
@_llgo_main.T1 = linkonce global ptr null, align 8
|
||||
@2 = private unnamed_addr constant [2 x i8] c"T1", align 1
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@_llgo_main.T2 = linkonce global ptr null, align 8
|
||||
@3 = private unnamed_addr constant [2 x i8] c"T2", align 1
|
||||
@"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88" = linkonce global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [1 x i8] c"v", align 1
|
||||
@"_llgo_main.T3[any]" = linkonce global ptr null, align 8
|
||||
@5 = private unnamed_addr constant [2 x i8] c"T3", align 1
|
||||
@_llgo_any = linkonce global ptr null, align 8
|
||||
@"main.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo" = linkonce global ptr null, align 8
|
||||
@"*_llgo_int" = linkonce global ptr null, align 8
|
||||
@_llgo_uintptr = linkonce global ptr null, align 8
|
||||
@"main.struct$ZLgMjv1XBA1L4yXCpdouRvQF2okeuHQ-YWVTE34gq4I" = linkonce global ptr null, align 8
|
||||
@6 = private unnamed_addr constant [2 x i8] c"t1", align 1
|
||||
@7 = private unnamed_addr constant [2 x i8] c"t2", align 1
|
||||
@8 = private unnamed_addr constant [2 x i8] c"t3", align 1
|
||||
@9 = private unnamed_addr constant [2 x i8] c"t4", align 1
|
||||
@10 = private unnamed_addr constant [2 x i8] c"t5", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@"map[_llgo_main.cacheKey]_llgo_string" = linkonce global ptr null, align 8
|
||||
@11 = private unnamed_addr constant [7 x i8] c"topbits", align 1
|
||||
@12 = private unnamed_addr constant [4 x i8] c"keys", align 1
|
||||
@13 = private unnamed_addr constant [5 x i8] c"elems", align 1
|
||||
@14 = private unnamed_addr constant [8 x i8] c"overflow", align 1
|
||||
@15 = private unnamed_addr constant [5 x i8] c"world", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = load ptr, ptr @_llgo_main.cacheKey, align 8
|
||||
%3 = load ptr, ptr @_llgo_string, align 8
|
||||
%4 = load ptr, ptr @"map[_llgo_main.cacheKey]_llgo_string", align 8
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.MakeMap"(ptr %4, i64 0)
|
||||
%6 = alloca %main.cacheKey, align 8
|
||||
call void @llvm.memset(ptr %6, i8 0, i64 48, i1 false)
|
||||
%7 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 0
|
||||
%8 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 1
|
||||
%9 = getelementptr inbounds %main.T2, ptr %8, i32 0, i32 0
|
||||
%10 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 2
|
||||
%11 = getelementptr inbounds %"main.T3[any]", ptr %10, i32 0, i32 0
|
||||
%12 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 3
|
||||
%13 = getelementptr inbounds %main.cacheKey, ptr %6, i32 0, i32 4
|
||||
store i64 0, ptr %7, align 4
|
||||
store i64 0, ptr %9, align 4
|
||||
%14 = load ptr, ptr @_llgo_int, align 8
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %14, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %15, ptr null, 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %16, ptr %11, align 8
|
||||
store ptr null, ptr %12, align 8
|
||||
store i64 0, ptr %13, align 4
|
||||
%17 = load %main.cacheKey, ptr %6, align 8
|
||||
%18 = load ptr, ptr @"map[_llgo_main.cacheKey]_llgo_string", align 8
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
store %main.cacheKey %17, ptr %19, align 8
|
||||
%20 = call ptr @"github.com/goplus/llgo/internal/runtime.MapAssign"(ptr %18, ptr %5, ptr %19)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @15, i64 5 }, ptr %20, align 8
|
||||
%21 = alloca %main.cacheKey, align 8
|
||||
call void @llvm.memset(ptr %21, i8 0, i64 48, i1 false)
|
||||
%22 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 0
|
||||
%23 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 1
|
||||
%24 = getelementptr inbounds %main.T2, ptr %23, i32 0, i32 0
|
||||
%25 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 2
|
||||
%26 = getelementptr inbounds %"main.T3[any]", ptr %25, i32 0, i32 0
|
||||
%27 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 3
|
||||
%28 = getelementptr inbounds %main.cacheKey, ptr %21, i32 0, i32 4
|
||||
store i64 0, ptr %22, align 4
|
||||
store i64 0, ptr %24, align 4
|
||||
%29 = load ptr, ptr @_llgo_int, align 8
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %29, 0
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %30, ptr null, 1
|
||||
store %"github.com/goplus/llgo/internal/runtime.eface" %31, ptr %26, align 8
|
||||
store ptr null, ptr %27, align 8
|
||||
store i64 0, ptr %28, align 4
|
||||
%32 = load %main.cacheKey, ptr %21, align 8
|
||||
%33 = load ptr, ptr @"map[_llgo_main.cacheKey]_llgo_string", align 8
|
||||
%34 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 48)
|
||||
store %main.cacheKey %32, ptr %34, align 8
|
||||
%35 = call { ptr, i1 } @"github.com/goplus/llgo/internal/runtime.MapAccess2"(ptr %33, ptr %5, ptr %34)
|
||||
%36 = extractvalue { ptr, i1 } %35, 0
|
||||
%37 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %36, align 8
|
||||
%38 = extractvalue { ptr, i1 } %35, 1
|
||||
%39 = insertvalue { %"github.com/goplus/llgo/internal/runtime.String", i1 } undef, %"github.com/goplus/llgo/internal/runtime.String" %37, 0
|
||||
%40 = insertvalue { %"github.com/goplus/llgo/internal/runtime.String", i1 } %39, i1 %38, 1
|
||||
%41 = extractvalue { %"github.com/goplus/llgo/internal/runtime.String", i1 } %40, 0
|
||||
%42 = extractvalue { %"github.com/goplus/llgo/internal/runtime.String", i1 } %40, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %41)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %42)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0)
|
||||
store ptr %0, ptr @_llgo_main.cacheKey, align 8
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0)
|
||||
%2 = load ptr, ptr @_llgo_main.T1, align 8
|
||||
%3 = icmp eq ptr %2, null
|
||||
br i1 %3, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store ptr %1, ptr @_llgo_main.T1, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%4 = load ptr, ptr @_llgo_int, align 8
|
||||
%5 = icmp eq ptr %4, null
|
||||
br i1 %5, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%6 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %6, ptr @_llgo_int, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%7 = load ptr, ptr @_llgo_int, align 8
|
||||
br i1 %3, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %1, ptr %7, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%8 = load ptr, ptr @_llgo_main.T1, align 8
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0)
|
||||
%10 = load ptr, ptr @_llgo_main.T2, align 8
|
||||
%11 = icmp eq ptr %10, null
|
||||
br i1 %11, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
store ptr %9, ptr @_llgo_main.T2, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%12 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%13 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 1 }, ptr %12, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56)
|
||||
%15 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %14, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %13, ptr %15, align 8
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %14, 0
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %16, i64 1, 1
|
||||
%18 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %17, i64 1, 2
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, i64 8, %"github.com/goplus/llgo/internal/runtime.Slice" %18)
|
||||
store ptr %19, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
|
||||
%20 = load ptr, ptr @"main.struct$MYpsoM99ZwFY087IpUOkIw1zjBA_sgFXVodmn1m-G88", align 8
|
||||
br i1 %11, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %9, ptr %20, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
||||
%21 = load ptr, ptr @_llgo_main.T2, align 8
|
||||
%22 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 2 }, i64 25, i64 16, i64 0, i64 0)
|
||||
%23 = load ptr, ptr @"_llgo_main.T3[any]", align 8
|
||||
%24 = icmp eq ptr %23, null
|
||||
br i1 %24, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
store ptr %22, ptr @"_llgo_main.T3[any]", align 8
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
||||
%25 = load ptr, ptr @_llgo_any, align 8
|
||||
%26 = icmp eq ptr %25, null
|
||||
br i1 %26, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
%27 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %27, 0
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %28, i64 0, 1
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %29, i64 0, 2
|
||||
%31 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %30)
|
||||
store ptr %31, ptr @_llgo_any, align 8
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
%32 = load ptr, ptr @_llgo_any, align 8
|
||||
%33 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%34 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %33, 0
|
||||
%35 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %34, i64 0, 1
|
||||
%36 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %35, i64 0, 2
|
||||
%37 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %36)
|
||||
%38 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 1 }, ptr %37, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%39 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56)
|
||||
%40 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %39, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %38, ptr %40, align 8
|
||||
%41 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %39, 0
|
||||
%42 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %41, i64 1, 1
|
||||
%43 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %42, i64 1, 2
|
||||
%44 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %43)
|
||||
store ptr %44, ptr @"main.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8
|
||||
%45 = load ptr, ptr @"main.struct$op7q0963ur0ih9ul6OteH-C75UVydPxwKOVpX1hUjzo", align 8
|
||||
br i1 %24, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_15: ; preds = %_llgo_14
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %22, ptr %45, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_16
|
||||
|
||||
_llgo_16: ; preds = %_llgo_15, %_llgo_14
|
||||
%46 = load ptr, ptr @"_llgo_main.T3[any]", align 8
|
||||
%47 = load ptr, ptr @"*_llgo_int", align 8
|
||||
%48 = icmp eq ptr %47, null
|
||||
br i1 %48, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_17: ; preds = %_llgo_16
|
||||
%49 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%50 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %49)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %50)
|
||||
store ptr %50, ptr @"*_llgo_int", align 8
|
||||
br label %_llgo_18
|
||||
|
||||
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
||||
%51 = load ptr, ptr @"*_llgo_int", align 8
|
||||
%52 = load ptr, ptr @_llgo_uintptr, align 8
|
||||
%53 = icmp eq ptr %52, null
|
||||
br i1 %53, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
%54 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 44)
|
||||
store ptr %54, ptr @_llgo_uintptr, align 8
|
||||
br label %_llgo_20
|
||||
|
||||
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
||||
%55 = load ptr, ptr @_llgo_uintptr, align 8
|
||||
%56 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 2 }, i64 2, i64 8, i64 0, i64 0)
|
||||
%57 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 2 }, i64 25, i64 8, i64 0, i64 0)
|
||||
%58 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 2 }, i64 25, i64 16, i64 0, i64 0)
|
||||
%59 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 2 }, ptr %56, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%60 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 2 }, ptr %57, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%61 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 2 }, ptr %58, i64 16, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%62 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%63 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %62)
|
||||
%64 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @9, i64 2 }, ptr %63, i64 32, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%65 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 44)
|
||||
%66 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @10, i64 2 }, ptr %65, i64 40, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%67 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 280)
|
||||
%68 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %67, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %59, ptr %68, align 8
|
||||
%69 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %67, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %60, ptr %69, align 8
|
||||
%70 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %67, i64 2
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %61, ptr %70, align 8
|
||||
%71 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %67, i64 3
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %64, ptr %71, align 8
|
||||
%72 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %67, i64 4
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %66, ptr %72, align 8
|
||||
%73 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %67, 0
|
||||
%74 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %73, i64 5, 1
|
||||
%75 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %74, i64 5, 2
|
||||
%76 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, i64 48, %"github.com/goplus/llgo/internal/runtime.Slice" %75)
|
||||
store ptr %76, ptr @"main.struct$ZLgMjv1XBA1L4yXCpdouRvQF2okeuHQ-YWVTE34gq4I", align 8
|
||||
%77 = load ptr, ptr @"main.struct$ZLgMjv1XBA1L4yXCpdouRvQF2okeuHQ-YWVTE34gq4I", align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, ptr %77, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
%78 = load ptr, ptr @_llgo_string, align 8
|
||||
%79 = icmp eq ptr %78, null
|
||||
br i1 %79, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_21: ; preds = %_llgo_20
|
||||
%80 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %80, ptr @_llgo_string, align 8
|
||||
br label %_llgo_22
|
||||
|
||||
_llgo_22: ; preds = %_llgo_21, %_llgo_20
|
||||
%81 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0)
|
||||
%82 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 8 }, i64 25, i64 48, i64 0, i64 0)
|
||||
%83 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%84 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 40)
|
||||
%85 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %84)
|
||||
%86 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @11, i64 7 }, ptr %85, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%87 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %82)
|
||||
%88 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @12, i64 4 }, ptr %87, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%89 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
%90 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 8, ptr %89)
|
||||
%91 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @13, i64 5 }, ptr %90, i64 392, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%92 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
%93 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @14, i64 8 }, ptr %92, i64 520, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%94 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 224)
|
||||
%95 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %94, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %86, ptr %95, align 8
|
||||
%96 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %94, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %88, ptr %96, align 8
|
||||
%97 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %94, i64 2
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %91, ptr %97, align 8
|
||||
%98 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %94, i64 3
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %93, ptr %98, align 8
|
||||
%99 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %94, 0
|
||||
%100 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %99, i64 4, 1
|
||||
%101 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %100, i64 4, 2
|
||||
%102 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 4 }, i64 528, %"github.com/goplus/llgo/internal/runtime.Slice" %101)
|
||||
%103 = call ptr @"github.com/goplus/llgo/internal/runtime.MapOf"(ptr %81, ptr %83, ptr %102, i64 24)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %103)
|
||||
store ptr %103, ptr @"map[_llgo_main.cacheKey]_llgo_string", align 8
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MapOf"(ptr, ptr, ptr, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64, ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MakeMap"(ptr, i64)
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.MapAssign"(ptr, ptr, ptr)
|
||||
|
||||
declare { ptr, i1 } @"github.com/goplus/llgo/internal/runtime.MapAccess2"(ptr, ptr, ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
@@ -1,514 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.iface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"main.Tuple[error]" = type { %"github.com/goplus/llgo/internal/runtime.iface" }
|
||||
%"main.future[main.Tuple[error]]" = type { { ptr, ptr } }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
%"github.com/goplus/llgo/internal/abi.Imethod" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr }
|
||||
%"github.com/goplus/llgo/internal/abi.StructField" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1 }
|
||||
%"github.com/goplus/llgo/internal/abi.Method" = type { %"github.com/goplus/llgo/internal/runtime.String", ptr, ptr, ptr }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [7 x i8] c"foo.txt", align 1
|
||||
@"_llgo_main.future[main.Tuple[error]]" = linkonce global ptr null, align 8
|
||||
@1 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@2 = private unnamed_addr constant [6 x i8] c"future", align 1
|
||||
@"_llgo_main.Tuple[error]" = linkonce global ptr null, align 8
|
||||
@3 = private unnamed_addr constant [5 x i8] c"Tuple", align 1
|
||||
@_llgo_error = linkonce global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [5 x i8] c"error", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to" = linkonce global ptr null, align 8
|
||||
@5 = private unnamed_addr constant [5 x i8] c"Error", align 1
|
||||
@"main.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo" = linkonce global ptr null, align 8
|
||||
@6 = private unnamed_addr constant [1 x i8] c"v", align 1
|
||||
@7 = private unnamed_addr constant [3 x i8] c"Get", align 1
|
||||
@"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w" = linkonce global ptr null, align 8
|
||||
@"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU" = linkonce global ptr null, align 8
|
||||
@_llgo_Pointer = linkonce global ptr null, align 8
|
||||
@"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4" = linkonce global ptr null, align 8
|
||||
@8 = private unnamed_addr constant [2 x i8] c"$f", align 1
|
||||
@9 = private unnamed_addr constant [5 x i8] c"$data", align 1
|
||||
@"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s" = linkonce global ptr null, align 8
|
||||
@"main.struct$awGH2Wh33bS1v_s7SNAwKW27E20HcwiiPPzh9UA7QDs" = linkonce global ptr null, align 8
|
||||
@"main.struct$N1awC7qGapVTS_NFj1Q0jk6nCjATrIK-60oOEyDjabo" = linkonce global ptr null, align 8
|
||||
@10 = private unnamed_addr constant [2 x i8] c"fn", align 1
|
||||
@11 = private unnamed_addr constant [4 x i8] c"Then", align 1
|
||||
@"*_llgo_main.future[main.Tuple[error]]" = linkonce global ptr null, align 8
|
||||
@"_llgo_iface$pTofAxYfPZHsCMD5T70nrOx1gjHf9m2QCLNvEOl1py0" = linkonce global ptr null, align 8
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.iface" @main.ReadFile(%"github.com/goplus/llgo/internal/runtime.String" %0) {
|
||||
_llgo_0:
|
||||
%1 = call %"github.com/goplus/llgo/internal/runtime.iface" @"main.Async[main.Tuple[error]]"({ ptr, ptr } { ptr @"__llgo_stub.main.ReadFile$1", ptr null })
|
||||
ret %"github.com/goplus/llgo/internal/runtime.iface" %1
|
||||
}
|
||||
|
||||
define void @"main.ReadFile$1"({ ptr, ptr } %0) {
|
||||
_llgo_0:
|
||||
%1 = alloca %"main.Tuple[error]", align 8
|
||||
call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false)
|
||||
%2 = getelementptr inbounds %"main.Tuple[error]", ptr %1, i32 0, i32 0
|
||||
store %"github.com/goplus/llgo/internal/runtime.iface" zeroinitializer, ptr %2, align 8
|
||||
%3 = load %"main.Tuple[error]", ptr %1, align 8
|
||||
%4 = extractvalue { ptr, ptr } %0, 1
|
||||
%5 = extractvalue { ptr, ptr } %0, 0
|
||||
call void %5(ptr %4, %"main.Tuple[error]" %3)
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = call %"github.com/goplus/llgo/internal/runtime.iface" @main.ReadFile(%"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 7 })
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface" %2)
|
||||
%4 = extractvalue %"github.com/goplus/llgo/internal/runtime.iface" %2, 0
|
||||
%5 = getelementptr ptr, ptr %4, i64 3
|
||||
%6 = load ptr, ptr %5, align 8
|
||||
%7 = insertvalue { ptr, ptr } undef, ptr %6, 0
|
||||
%8 = insertvalue { ptr, ptr } %7, ptr %3, 1
|
||||
%9 = extractvalue { ptr, ptr } %8, 1
|
||||
%10 = extractvalue { ptr, ptr } %8, 0
|
||||
call void %10(ptr %9, { ptr, ptr } { ptr @"__llgo_stub.main.main$1", ptr null })
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
define void @"main.main$1"(%"main.Tuple[error]" %0) {
|
||||
_llgo_0:
|
||||
%1 = call %"github.com/goplus/llgo/internal/runtime.iface" @"main.Tuple[error].Get"(%"main.Tuple[error]" %0)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface" %1)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret void
|
||||
}
|
||||
|
||||
define linkonce %"github.com/goplus/llgo/internal/runtime.iface" @"main.Tuple[error].Get"(%"main.Tuple[error]" %0) {
|
||||
_llgo_0:
|
||||
%1 = alloca %"main.Tuple[error]", align 8
|
||||
call void @llvm.memset(ptr %1, i8 0, i64 16, i1 false)
|
||||
store %"main.Tuple[error]" %0, ptr %1, align 8
|
||||
%2 = getelementptr inbounds %"main.Tuple[error]", ptr %1, i32 0, i32 0
|
||||
%3 = load %"github.com/goplus/llgo/internal/runtime.iface", ptr %2, align 8
|
||||
ret %"github.com/goplus/llgo/internal/runtime.iface" %3
|
||||
}
|
||||
|
||||
define %"github.com/goplus/llgo/internal/runtime.iface" @"main.(*Tuple[error]).Get"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load %"main.Tuple[error]", ptr %0, align 8
|
||||
%2 = call %"github.com/goplus/llgo/internal/runtime.iface" @"main.Tuple[error].Get"(%"main.Tuple[error]" %1)
|
||||
ret %"github.com/goplus/llgo/internal/runtime.iface" %2
|
||||
}
|
||||
|
||||
define linkonce void @"main.(*future[main.Tuple[error]]).Then"(ptr %0, { ptr, ptr } %1) {
|
||||
_llgo_0:
|
||||
%2 = getelementptr inbounds %"main.future[main.Tuple[error]]", ptr %0, i32 0, i32 0
|
||||
%3 = load { ptr, ptr }, ptr %2, align 8
|
||||
%4 = extractvalue { ptr, ptr } %3, 1
|
||||
%5 = extractvalue { ptr, ptr } %3, 0
|
||||
call void %5(ptr %4, { ptr, ptr } %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
define linkonce %"github.com/goplus/llgo/internal/runtime.iface" @"main.Async[main.Tuple[error]]"({ ptr, ptr } %0) {
|
||||
_llgo_0:
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
%2 = getelementptr inbounds %"main.future[main.Tuple[error]]", ptr %1, i32 0, i32 0
|
||||
store { ptr, ptr } %0, ptr %2, align 8
|
||||
%3 = load ptr, ptr @"_llgo_main.future[main.Tuple[error]]", align 8
|
||||
%4 = load ptr, ptr @"*_llgo_main.future[main.Tuple[error]]", align 8
|
||||
%5 = load ptr, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
|
||||
%6 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
|
||||
%7 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
|
||||
%8 = load ptr, ptr @"_llgo_iface$pTofAxYfPZHsCMD5T70nrOx1gjHf9m2QCLNvEOl1py0", align 8
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr %8, ptr %4)
|
||||
%10 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" undef, ptr %9, 0
|
||||
%11 = insertvalue %"github.com/goplus/llgo/internal/runtime.iface" %10, ptr %1, 1
|
||||
ret %"github.com/goplus/llgo/internal/runtime.iface" %11
|
||||
}
|
||||
|
||||
define linkonce void @"__llgo_stub.main.ReadFile$1"(ptr %0, { ptr, ptr } %1) {
|
||||
_llgo_0:
|
||||
tail call void @"main.ReadFile$1"({ ptr, ptr } %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.IfacePtrData"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
define linkonce void @"__llgo_stub.main.main$1"(ptr %0, %"main.Tuple[error]" %1) {
|
||||
_llgo_0:
|
||||
tail call void @"main.main$1"(%"main.Tuple[error]" %1)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintIface"(%"github.com/goplus/llgo/internal/runtime.iface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 6 }, i64 25, i64 24, i64 0, i64 1)
|
||||
store ptr %0, ptr @"_llgo_main.future[main.Tuple[error]]", align 8
|
||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 5 }, i64 25, i64 16, i64 1, i64 1)
|
||||
%2 = load ptr, ptr @"_llgo_main.Tuple[error]", align 8
|
||||
%3 = icmp eq ptr %2, null
|
||||
br i1 %3, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store ptr %1, ptr @"_llgo_main.Tuple[error]", align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%4 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 5 })
|
||||
%5 = load ptr, ptr @_llgo_error, align 8
|
||||
%6 = icmp eq ptr %5, null
|
||||
br i1 %6, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
store ptr %4, ptr @_llgo_error, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%7 = load ptr, ptr @_llgo_string, align 8
|
||||
%8 = icmp eq ptr %7, null
|
||||
br i1 %8, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%9 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %9, ptr @_llgo_string, align 8
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%10 = load ptr, ptr @_llgo_string, align 8
|
||||
%11 = load ptr, ptr @_llgo_string, align 8
|
||||
%12 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
%13 = icmp eq ptr %12, null
|
||||
br i1 %13, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%15 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %14, 0
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %15, i64 0, 1
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %16, i64 0, 2
|
||||
%18 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%19 = getelementptr ptr, ptr %18, i64 0
|
||||
store ptr %11, ptr %19, align 8
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %18, 0
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %20, i64 1, 1
|
||||
%22 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %21, i64 1, 2
|
||||
%23 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %17, %"github.com/goplus/llgo/internal/runtime.Slice" %22, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %23)
|
||||
store ptr %23, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%24 = load ptr, ptr @"_llgo_func$zNDVRsWTIpUPKouNUS805RGX--IV9qVK8B31IZbg5to", align 8
|
||||
br i1 %6, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @5, i64 5 }, ptr undef }, ptr %24, 1
|
||||
%26 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
%27 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %26, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %25, ptr %27, align 8
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %26, 0
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %28, i64 1, 1
|
||||
%30 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %29, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr %4, %"github.com/goplus/llgo/internal/runtime.Slice" %30)
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
||||
%31 = load ptr, ptr @_llgo_error, align 8
|
||||
%32 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 5 })
|
||||
%33 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @6, i64 1 }, ptr %32, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%34 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56)
|
||||
%35 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %34, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %33, ptr %35, align 8
|
||||
%36 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %34, 0
|
||||
%37 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %36, i64 1, 1
|
||||
%38 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %37, i64 1, 2
|
||||
%39 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %38)
|
||||
store ptr %39, ptr @"main.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8
|
||||
%40 = load ptr, ptr @"main.struct$ddtj0teo4LtYcagzh1w6BsSZ7226uefXlqreeHsfVRo", align 8
|
||||
br i1 %3, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
%41 = load ptr, ptr @_llgo_error, align 8
|
||||
%42 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%43 = icmp eq ptr %42, null
|
||||
br i1 %43, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_12: ; preds = %_llgo_14, %_llgo_10
|
||||
%44 = load ptr, ptr @"_llgo_main.Tuple[error]", align 8
|
||||
%45 = load ptr, ptr @"_llgo_main.Tuple[error]", align 8
|
||||
%46 = load ptr, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
|
||||
%47 = icmp eq ptr %46, null
|
||||
br i1 %47, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_13: ; preds = %_llgo_11
|
||||
%48 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%49 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %48, 0
|
||||
%50 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %49, i64 0, 1
|
||||
%51 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %50, i64 0, 2
|
||||
%52 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%53 = getelementptr ptr, ptr %52, i64 0
|
||||
store ptr %41, ptr %53, align 8
|
||||
%54 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %52, 0
|
||||
%55 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %54, i64 1, 1
|
||||
%56 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %55, i64 1, 2
|
||||
%57 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %51, %"github.com/goplus/llgo/internal/runtime.Slice" %56, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %57)
|
||||
store ptr %57, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_11
|
||||
%58 = load ptr, ptr @"_llgo_func$8rsrSd_r3UHd_2DiYTyaOKR7BYkei4zw5ysG35KF38w", align 8
|
||||
%59 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1
|
||||
%60 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %59, ptr @"main.(*Tuple[error]).Get", 2
|
||||
%61 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %60, ptr @"main.(*Tuple[error]).Get", 3
|
||||
%62 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @7, i64 3 }, ptr undef, ptr undef, ptr undef }, ptr %58, 1
|
||||
%63 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %62, ptr @"main.(*Tuple[error]).Get", 2
|
||||
%64 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %63, ptr @"main.Tuple[error].Get", 3
|
||||
%65 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%66 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %65, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %64, ptr %66, align 8
|
||||
%67 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %65, 0
|
||||
%68 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %67, i64 1, 1
|
||||
%69 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %68, i64 1, 2
|
||||
%70 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%71 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %70, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %61, ptr %71, align 8
|
||||
%72 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %70, 0
|
||||
%73 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %72, i64 1, 1
|
||||
%74 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %73, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %1, ptr %40, %"github.com/goplus/llgo/internal/runtime.Slice" %69, %"github.com/goplus/llgo/internal/runtime.Slice" %74)
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_15: ; preds = %_llgo_12
|
||||
%75 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%76 = getelementptr ptr, ptr %75, i64 0
|
||||
store ptr %45, ptr %76, align 8
|
||||
%77 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %75, 0
|
||||
%78 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %77, i64 1, 1
|
||||
%79 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %78, i64 1, 2
|
||||
%80 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%81 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %80, 0
|
||||
%82 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %81, i64 0, 1
|
||||
%83 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %82, i64 0, 2
|
||||
%84 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %79, %"github.com/goplus/llgo/internal/runtime.Slice" %83, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %84)
|
||||
store ptr %84, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
|
||||
br label %_llgo_16
|
||||
|
||||
_llgo_16: ; preds = %_llgo_15, %_llgo_12
|
||||
%85 = load ptr, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
|
||||
%86 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%87 = icmp eq ptr %86, null
|
||||
br i1 %87, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_17: ; preds = %_llgo_16
|
||||
%88 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %88)
|
||||
store ptr %88, ptr @_llgo_Pointer, align 8
|
||||
br label %_llgo_18
|
||||
|
||||
_llgo_18: ; preds = %_llgo_17, %_llgo_16
|
||||
%89 = load ptr, ptr @_llgo_Pointer, align 8
|
||||
%90 = load ptr, ptr @"_llgo_main.Tuple[error]", align 8
|
||||
%91 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%92 = getelementptr ptr, ptr %91, i64 0
|
||||
store ptr %90, ptr %92, align 8
|
||||
%93 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %91, 0
|
||||
%94 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %93, i64 1, 1
|
||||
%95 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %94, i64 1, 2
|
||||
%96 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%97 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %96, 0
|
||||
%98 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %97, i64 0, 1
|
||||
%99 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %98, i64 0, 2
|
||||
%100 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %95, %"github.com/goplus/llgo/internal/runtime.Slice" %99, i1 false)
|
||||
%101 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 2 }, ptr %100, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%102 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
%103 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @9, i64 5 }, ptr %102, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%104 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||
%105 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %104, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %101, ptr %105, align 8
|
||||
%106 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %104, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %103, ptr %106, align 8
|
||||
%107 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %104, 0
|
||||
%108 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %107, i64 2, 1
|
||||
%109 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %108, i64 2, 2
|
||||
%110 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %109)
|
||||
store ptr %110, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
|
||||
%111 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
|
||||
%112 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
|
||||
%113 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
|
||||
%114 = icmp eq ptr %113, null
|
||||
br i1 %114, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
%115 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%116 = getelementptr ptr, ptr %115, i64 0
|
||||
store ptr %112, ptr %116, align 8
|
||||
%117 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %115, 0
|
||||
%118 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %117, i64 1, 1
|
||||
%119 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %118, i64 1, 2
|
||||
%120 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%121 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %120, 0
|
||||
%122 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %121, i64 0, 1
|
||||
%123 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %122, i64 0, 2
|
||||
%124 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %119, %"github.com/goplus/llgo/internal/runtime.Slice" %123, i1 false)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %124)
|
||||
store ptr %124, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
|
||||
br label %_llgo_20
|
||||
|
||||
_llgo_20: ; preds = %_llgo_19, %_llgo_18
|
||||
%125 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
|
||||
%126 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
|
||||
%127 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%128 = getelementptr ptr, ptr %127, i64 0
|
||||
store ptr %126, ptr %128, align 8
|
||||
%129 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %127, 0
|
||||
%130 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %129, i64 1, 1
|
||||
%131 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %130, i64 1, 2
|
||||
%132 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%133 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %132, 0
|
||||
%134 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %133, i64 0, 1
|
||||
%135 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %134, i64 0, 2
|
||||
%136 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %131, %"github.com/goplus/llgo/internal/runtime.Slice" %135, i1 false)
|
||||
%137 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 2 }, ptr %136, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%138 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
%139 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @9, i64 5 }, ptr %138, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%140 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||
%141 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %140, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %137, ptr %141, align 8
|
||||
%142 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %140, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %139, ptr %142, align 8
|
||||
%143 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %140, 0
|
||||
%144 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %143, i64 2, 1
|
||||
%145 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %144, i64 2, 2
|
||||
%146 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %145)
|
||||
store ptr %146, ptr @"main.struct$awGH2Wh33bS1v_s7SNAwKW27E20HcwiiPPzh9UA7QDs", align 8
|
||||
%147 = load ptr, ptr @"main.struct$awGH2Wh33bS1v_s7SNAwKW27E20HcwiiPPzh9UA7QDs", align 8
|
||||
%148 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
|
||||
%149 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
||||
%150 = getelementptr ptr, ptr %149, i64 0
|
||||
store ptr %148, ptr %150, align 8
|
||||
%151 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %149, 0
|
||||
%152 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %151, i64 1, 1
|
||||
%153 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %152, i64 1, 2
|
||||
%154 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 0)
|
||||
%155 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %154, 0
|
||||
%156 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %155, i64 0, 1
|
||||
%157 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %156, i64 0, 2
|
||||
%158 = call ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice" %153, %"github.com/goplus/llgo/internal/runtime.Slice" %157, i1 false)
|
||||
%159 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @8, i64 2 }, ptr %158, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%160 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 58)
|
||||
%161 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @9, i64 5 }, ptr %160, i64 8, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%162 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 112)
|
||||
%163 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %162, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %159, ptr %163, align 8
|
||||
%164 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %162, i64 1
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %161, ptr %164, align 8
|
||||
%165 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %162, 0
|
||||
%166 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %165, i64 2, 1
|
||||
%167 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %166, i64 2, 2
|
||||
%168 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %167)
|
||||
%169 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @10, i64 2 }, ptr %168, i64 0, %"github.com/goplus/llgo/internal/runtime.String" zeroinitializer, i1 false)
|
||||
%170 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 56)
|
||||
%171 = getelementptr %"github.com/goplus/llgo/internal/abi.StructField", ptr %170, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.StructField" %169, ptr %171, align 8
|
||||
%172 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %170, 0
|
||||
%173 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %172, i64 1, 1
|
||||
%174 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %173, i64 1, 2
|
||||
%175 = call ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, i64 16, %"github.com/goplus/llgo/internal/runtime.Slice" %174)
|
||||
store ptr %175, ptr @"main.struct$N1awC7qGapVTS_NFj1Q0jk6nCjATrIK-60oOEyDjabo", align 8
|
||||
%176 = load ptr, ptr @"main.struct$N1awC7qGapVTS_NFj1Q0jk6nCjATrIK-60oOEyDjabo", align 8
|
||||
%177 = load ptr, ptr @"_llgo_func$1BeCdGdxwWG-Dtl1HbNuSy2_sb8rBMTmu7zhcPPofmU", align 8
|
||||
%178 = load ptr, ptr @"main.struct$vwhCZhgsid50r1SsT8OmKpRI0Cpljg78h5JlpD1CTR4", align 8
|
||||
%179 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
|
||||
%180 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @11, i64 4 }, ptr undef, ptr undef, ptr undef }, ptr %179, 1
|
||||
%181 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %180, ptr @"main.(*future[main.Tuple[error]]).Then", 2
|
||||
%182 = insertvalue %"github.com/goplus/llgo/internal/abi.Method" %181, ptr @"main.(*future[main.Tuple[error]]).Then", 3
|
||||
%183 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 40)
|
||||
%184 = getelementptr %"github.com/goplus/llgo/internal/abi.Method", ptr %183, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Method" %182, ptr %184, align 8
|
||||
%185 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %183, 0
|
||||
%186 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %185, i64 1, 1
|
||||
%187 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %186, i64 1, 2
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, ptr %176, { ptr, i64, i64 } zeroinitializer, %"github.com/goplus/llgo/internal/runtime.Slice" %187)
|
||||
%188 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 6 }, i64 25, i64 24, i64 0, i64 1)
|
||||
%189 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %188)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %189)
|
||||
store ptr %189, ptr @"*_llgo_main.future[main.Tuple[error]]", align 8
|
||||
%190 = load ptr, ptr @"_llgo_func$_so3zZGPIhTQghxFcf7CCCVzSOk2lxOt7xgGKcTzc0s", align 8
|
||||
%191 = load ptr, ptr @"_llgo_iface$pTofAxYfPZHsCMD5T70nrOx1gjHf9m2QCLNvEOl1py0", align 8
|
||||
%192 = icmp eq ptr %191, null
|
||||
br i1 %192, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_21: ; preds = %_llgo_20
|
||||
%193 = insertvalue %"github.com/goplus/llgo/internal/abi.Imethod" { %"github.com/goplus/llgo/internal/runtime.String" { ptr @11, i64 4 }, ptr undef }, ptr %190, 1
|
||||
%194 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 24)
|
||||
%195 = getelementptr %"github.com/goplus/llgo/internal/abi.Imethod", ptr %194, i64 0
|
||||
store %"github.com/goplus/llgo/internal/abi.Imethod" %193, ptr %195, align 8
|
||||
%196 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %194, 0
|
||||
%197 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %196, i64 1, 1
|
||||
%198 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %197, i64 1, 2
|
||||
%199 = call ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.Slice" %198)
|
||||
store ptr %199, ptr @"_llgo_iface$pTofAxYfPZHsCMD5T70nrOx1gjHf9m2QCLNvEOl1py0", align 8
|
||||
br label %_llgo_22
|
||||
|
||||
_llgo_22: ; preds = %_llgo_21, %_llgo_20
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamedInterface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Func"(%"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice", i1)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamedInterface"(ptr, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr, ptr)
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
@@ -1,234 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [5 x i8] c"hello", align 1
|
||||
@_llgo_main.T = linkonce global ptr null, align 8
|
||||
@1 = private unnamed_addr constant [4 x i8] c"main", align 1
|
||||
@2 = private unnamed_addr constant [1 x i8] c"T", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@3 = private unnamed_addr constant [21 x i8] c"type assertion failed", align 1
|
||||
@_llgo_main.A = linkonce global ptr null, align 8
|
||||
@4 = private unnamed_addr constant [1 x i8] c"A", align 1
|
||||
@_llgo_int = linkonce global ptr null, align 8
|
||||
@"[2]_llgo_int" = linkonce global ptr null, align 8
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
%2 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %3, align 8
|
||||
%4 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %2, 0
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %4, ptr %3, 1
|
||||
%6 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, 0
|
||||
%7 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%8 = icmp eq ptr %6, %7
|
||||
br i1 %8, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%9 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, 1
|
||||
%10 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %9, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %10)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%11 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, 0
|
||||
%12 = load ptr, ptr @_llgo_string, align 8
|
||||
%13 = icmp eq ptr %11, %12
|
||||
br i1 %13, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
%14 = load ptr, ptr @_llgo_string, align 8
|
||||
%15 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @3, i64 21 }, ptr %15, align 8
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %14, 0
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %16, ptr %15, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %17)
|
||||
unreachable
|
||||
|
||||
_llgo_3: ; preds = %_llgo_1
|
||||
%18 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %5, 1
|
||||
%19 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %18, align 8
|
||||
%20 = insertvalue { %"github.com/goplus/llgo/internal/runtime.String", i1 } undef, %"github.com/goplus/llgo/internal/runtime.String" %19, 0
|
||||
%21 = insertvalue { %"github.com/goplus/llgo/internal/runtime.String", i1 } %20, i1 true, 1
|
||||
br label %_llgo_5
|
||||
|
||||
_llgo_4: ; preds = %_llgo_1
|
||||
br label %_llgo_5
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4, %_llgo_3
|
||||
%22 = phi { %"github.com/goplus/llgo/internal/runtime.String", i1 } [ %21, %_llgo_3 ], [ zeroinitializer, %_llgo_4 ]
|
||||
%23 = extractvalue { %"github.com/goplus/llgo/internal/runtime.String", i1 } %22, 0
|
||||
%24 = extractvalue { %"github.com/goplus/llgo/internal/runtime.String", i1 } %22, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String" %23)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %24)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
%25 = alloca [2 x i64], align 8
|
||||
call void @llvm.memset(ptr %25, i8 0, i64 16, i1 false)
|
||||
%26 = getelementptr inbounds i64, ptr %25, i64 0
|
||||
%27 = getelementptr inbounds i64, ptr %25, i64 1
|
||||
store i64 1, ptr %26, align 4
|
||||
store i64 2, ptr %27, align 4
|
||||
%28 = load [2 x i64], ptr %25, align 4
|
||||
%29 = load ptr, ptr @_llgo_main.A, align 8
|
||||
%30 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store [2 x i64] %28, ptr %30, align 4
|
||||
%31 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %29, 0
|
||||
%32 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %31, ptr %30, 1
|
||||
%33 = alloca [2 x i64], align 8
|
||||
call void @llvm.memset(ptr %33, i8 0, i64 16, i1 false)
|
||||
%34 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %32, 0
|
||||
%35 = load ptr, ptr @_llgo_main.A, align 8
|
||||
%36 = icmp eq ptr %34, %35
|
||||
br i1 %36, label %_llgo_6, label %_llgo_7
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5
|
||||
%37 = extractvalue %"github.com/goplus/llgo/internal/runtime.eface" %32, 1
|
||||
%38 = load [2 x i64], ptr %37, align 4
|
||||
%39 = insertvalue { [2 x i64], i1 } undef, [2 x i64] %38, 0
|
||||
%40 = insertvalue { [2 x i64], i1 } %39, i1 true, 1
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_5
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%41 = phi { [2 x i64], i1 } [ %40, %_llgo_6 ], [ zeroinitializer, %_llgo_7 ]
|
||||
%42 = extractvalue { [2 x i64], i1 } %41, 0
|
||||
store [2 x i64] %42, ptr %33, align 4
|
||||
%43 = extractvalue { [2 x i64], i1 } %41, 1
|
||||
%44 = getelementptr inbounds i64, ptr %33, i64 0
|
||||
%45 = load i64, ptr %44, align 4
|
||||
%46 = getelementptr inbounds i64, ptr %33, i64 1
|
||||
%47 = load i64, ptr %46, align 4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %45)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64 %47)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 32)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1 %43)
|
||||
call void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8 10)
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 1 }, i64 24, i64 16, i64 0, i64 0)
|
||||
%1 = load ptr, ptr @_llgo_main.T, align 8
|
||||
%2 = icmp eq ptr %1, null
|
||||
br i1 %2, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store ptr %0, ptr @_llgo_main.T, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
%3 = load ptr, ptr @_llgo_string, align 8
|
||||
%4 = icmp eq ptr %3, null
|
||||
br i1 %4, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%5 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %5, ptr @_llgo_string, align 8
|
||||
br label %_llgo_4
|
||||
|
||||
_llgo_4: ; preds = %_llgo_3, %_llgo_2
|
||||
%6 = load ptr, ptr @_llgo_string, align 8
|
||||
br i1 %2, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %0, ptr %6, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_6
|
||||
|
||||
_llgo_6: ; preds = %_llgo_5, %_llgo_4
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 4 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @4, i64 1 }, i64 17, i64 16, i64 0, i64 0)
|
||||
%8 = load ptr, ptr @_llgo_main.A, align 8
|
||||
%9 = icmp eq ptr %8, null
|
||||
br i1 %9, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
store ptr %7, ptr @_llgo_main.A, align 8
|
||||
br label %_llgo_8
|
||||
|
||||
_llgo_8: ; preds = %_llgo_7, %_llgo_6
|
||||
%10 = load ptr, ptr @_llgo_int, align 8
|
||||
%11 = icmp eq ptr %10, null
|
||||
br i1 %11, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%12 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
store ptr %12, ptr @_llgo_int, align 8
|
||||
br label %_llgo_10
|
||||
|
||||
_llgo_10: ; preds = %_llgo_9, %_llgo_8
|
||||
%13 = load ptr, ptr @_llgo_int, align 8
|
||||
%14 = load ptr, ptr @"[2]_llgo_int", align 8
|
||||
%15 = icmp eq ptr %14, null
|
||||
br i1 %15, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
%16 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 34)
|
||||
%17 = call ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64 2, ptr %16)
|
||||
store ptr %17, ptr @"[2]_llgo_int", align 8
|
||||
br label %_llgo_12
|
||||
|
||||
_llgo_12: ; preds = %_llgo_11, %_llgo_10
|
||||
%18 = load ptr, ptr @"[2]_llgo_int", align 8
|
||||
br i1 %9, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
call void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr %7, ptr %18, { ptr, i64, i64 } zeroinitializer, { ptr, i64, i64 } zeroinitializer)
|
||||
br label %_llgo_14
|
||||
|
||||
_llgo_14: ; preds = %_llgo_13, %_llgo_12
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", i64, i64, i64, i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.InitNamed"(ptr, ptr, %"github.com/goplus/llgo/internal/runtime.Slice", %"github.com/goplus/llgo/internal/runtime.Slice")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintString"(%"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintByte"(i8)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintBool"(i1)
|
||||
|
||||
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
|
||||
declare void @llvm.memset(ptr nocapture writeonly, i8, i64, i1 immarg) #0
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.ArrayOf"(i64, ptr)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.PrintInt"(i64)
|
||||
|
||||
attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: write) }
|
||||
@@ -1,289 +0,0 @@
|
||||
; ModuleID = 'main'
|
||||
source_filename = "main"
|
||||
|
||||
%"github.com/goplus/llgo/internal/runtime.String" = type { ptr, i64 }
|
||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
||||
%"github.com/goplus/llgo/internal/runtime.Slice" = type { ptr, i64, i64 }
|
||||
|
||||
@"main.init$guard" = global i1 false, align 1
|
||||
@__llgo_argc = global i32 0, align 4
|
||||
@__llgo_argv = global ptr null, align 8
|
||||
@0 = private unnamed_addr constant [5 x i8] c"error", align 1
|
||||
@_llgo_string = linkonce global ptr null, align 8
|
||||
@1 = private unnamed_addr constant [4 x i8] c"abc\00", align 1
|
||||
@2 = private unnamed_addr constant [3 x i8] c"abc", align 1
|
||||
|
||||
define void @main.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"main.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"main.init$guard", align 1
|
||||
call void @"main.init$after"()
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @main(i32 %0, ptr %1) {
|
||||
_llgo_0:
|
||||
store i32 %0, ptr @__llgo_argc, align 4
|
||||
store ptr %1, ptr @__llgo_argv, align 8
|
||||
call void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
call void @main.init()
|
||||
br i1 false, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = load ptr, ptr @_llgo_string, align 8
|
||||
%3 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %3, align 8
|
||||
%4 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %2, 0
|
||||
%5 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %4, ptr %3, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %5)
|
||||
unreachable
|
||||
|
||||
_llgo_2: ; preds = %_llgo_0
|
||||
br i1 false, label %_llgo_3, label %_llgo_4
|
||||
|
||||
_llgo_3: ; preds = %_llgo_2
|
||||
%6 = load ptr, ptr @_llgo_string, align 8
|
||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %7, align 8
|
||||
%8 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %6, 0
|
||||
%9 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %8, ptr %7, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %9)
|
||||
unreachable
|
||||
|
||||
_llgo_4: ; preds = %_llgo_2
|
||||
br i1 false, label %_llgo_5, label %_llgo_6
|
||||
|
||||
_llgo_5: ; preds = %_llgo_4
|
||||
%10 = load ptr, ptr @_llgo_string, align 8
|
||||
%11 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %11, align 8
|
||||
%12 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %10, 0
|
||||
%13 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %12, ptr %11, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %13)
|
||||
unreachable
|
||||
|
||||
_llgo_6: ; preds = %_llgo_4
|
||||
br i1 false, label %_llgo_7, label %_llgo_8
|
||||
|
||||
_llgo_7: ; preds = %_llgo_6
|
||||
%14 = load ptr, ptr @_llgo_string, align 8
|
||||
%15 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %15, align 8
|
||||
%16 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %14, 0
|
||||
%17 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %16, ptr %15, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %17)
|
||||
unreachable
|
||||
|
||||
_llgo_8: ; preds = %_llgo_6
|
||||
br i1 false, label %_llgo_9, label %_llgo_10
|
||||
|
||||
_llgo_9: ; preds = %_llgo_8
|
||||
%18 = load ptr, ptr @_llgo_string, align 8
|
||||
%19 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %19, align 8
|
||||
%20 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %18, 0
|
||||
%21 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %20, ptr %19, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %21)
|
||||
unreachable
|
||||
|
||||
_llgo_10: ; preds = %_llgo_8
|
||||
br i1 false, label %_llgo_11, label %_llgo_12
|
||||
|
||||
_llgo_11: ; preds = %_llgo_10
|
||||
%22 = load ptr, ptr @_llgo_string, align 8
|
||||
%23 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %23, align 8
|
||||
%24 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %22, 0
|
||||
%25 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %24, ptr %23, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %25)
|
||||
unreachable
|
||||
|
||||
_llgo_12: ; preds = %_llgo_10
|
||||
br i1 false, label %_llgo_13, label %_llgo_14
|
||||
|
||||
_llgo_13: ; preds = %_llgo_12
|
||||
%26 = load ptr, ptr @_llgo_string, align 8
|
||||
%27 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %27, align 8
|
||||
%28 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %26, 0
|
||||
%29 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %28, ptr %27, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %29)
|
||||
unreachable
|
||||
|
||||
_llgo_14: ; preds = %_llgo_12
|
||||
br i1 false, label %_llgo_15, label %_llgo_16
|
||||
|
||||
_llgo_15: ; preds = %_llgo_14
|
||||
%30 = load ptr, ptr @_llgo_string, align 8
|
||||
%31 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %31, align 8
|
||||
%32 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %30, 0
|
||||
%33 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %32, ptr %31, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %33)
|
||||
unreachable
|
||||
|
||||
_llgo_16: ; preds = %_llgo_14
|
||||
br i1 false, label %_llgo_17, label %_llgo_18
|
||||
|
||||
_llgo_17: ; preds = %_llgo_16
|
||||
%34 = load ptr, ptr @_llgo_string, align 8
|
||||
%35 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %35, align 8
|
||||
%36 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %34, 0
|
||||
%37 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %36, ptr %35, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %37)
|
||||
unreachable
|
||||
|
||||
_llgo_18: ; preds = %_llgo_16
|
||||
br i1 false, label %_llgo_19, label %_llgo_20
|
||||
|
||||
_llgo_19: ; preds = %_llgo_18
|
||||
%38 = load ptr, ptr @_llgo_string, align 8
|
||||
%39 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %39, align 8
|
||||
%40 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %38, 0
|
||||
%41 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %40, ptr %39, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %41)
|
||||
unreachable
|
||||
|
||||
_llgo_20: ; preds = %_llgo_18
|
||||
%42 = call i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String" { ptr @1, i64 3 }, %"github.com/goplus/llgo/internal/runtime.String" { ptr @2, i64 3 })
|
||||
%43 = xor i1 %42, true
|
||||
br i1 %43, label %_llgo_21, label %_llgo_22
|
||||
|
||||
_llgo_21: ; preds = %_llgo_20
|
||||
%44 = load ptr, ptr @_llgo_string, align 8
|
||||
%45 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %45, align 8
|
||||
%46 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %44, 0
|
||||
%47 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %46, ptr %45, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %47)
|
||||
unreachable
|
||||
|
||||
_llgo_22: ; preds = %_llgo_20
|
||||
%48 = load i8, ptr @1, align 1
|
||||
%49 = icmp ne i8 %48, 97
|
||||
br i1 %49, label %_llgo_23, label %_llgo_26
|
||||
|
||||
_llgo_23: ; preds = %_llgo_25, %_llgo_26, %_llgo_22
|
||||
%50 = load ptr, ptr @_llgo_string, align 8
|
||||
%51 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %51, align 8
|
||||
%52 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %50, 0
|
||||
%53 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %52, ptr %51, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %53)
|
||||
unreachable
|
||||
|
||||
_llgo_24: ; preds = %_llgo_25
|
||||
%54 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64 16)
|
||||
%55 = getelementptr inbounds i64, ptr %54, i64 0
|
||||
%56 = getelementptr inbounds i64, ptr %54, i64 1
|
||||
store i64 1, ptr %55, align 4
|
||||
store i64 2, ptr %56, align 4
|
||||
%57 = getelementptr inbounds i64, ptr %54, i64 0
|
||||
%58 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" undef, ptr %57, 0
|
||||
%59 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %58, i64 2, 1
|
||||
%60 = insertvalue %"github.com/goplus/llgo/internal/runtime.Slice" %59, i64 2, 2
|
||||
%61 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %60, 0
|
||||
%62 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %60, 1
|
||||
%63 = icmp sge i64 0, %62
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %63)
|
||||
%64 = getelementptr inbounds i64, ptr %61, i64 0
|
||||
%65 = load i64, ptr %64, align 4
|
||||
%66 = icmp ne i64 %65, 1
|
||||
br i1 %66, label %_llgo_27, label %_llgo_29
|
||||
|
||||
_llgo_25: ; preds = %_llgo_26
|
||||
%67 = load i8, ptr getelementptr inbounds (i8, ptr @1, i64 2), align 1
|
||||
%68 = icmp ne i8 %67, 99
|
||||
br i1 %68, label %_llgo_23, label %_llgo_24
|
||||
|
||||
_llgo_26: ; preds = %_llgo_22
|
||||
%69 = load i8, ptr getelementptr inbounds (i8, ptr @1, i64 1), align 1
|
||||
%70 = icmp ne i8 %69, 98
|
||||
br i1 %70, label %_llgo_23, label %_llgo_25
|
||||
|
||||
_llgo_27: ; preds = %_llgo_29, %_llgo_24
|
||||
%71 = load ptr, ptr @_llgo_string, align 8
|
||||
%72 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %72, align 8
|
||||
%73 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %71, 0
|
||||
%74 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %73, ptr %72, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %74)
|
||||
unreachable
|
||||
|
||||
_llgo_28: ; preds = %_llgo_29
|
||||
%75 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %60, 0
|
||||
%76 = load i64, ptr %75, align 4
|
||||
%77 = icmp ne i64 %76, 1
|
||||
br i1 %77, label %_llgo_30, label %_llgo_31
|
||||
|
||||
_llgo_29: ; preds = %_llgo_24
|
||||
%78 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %60, 0
|
||||
%79 = extractvalue %"github.com/goplus/llgo/internal/runtime.Slice" %60, 1
|
||||
%80 = icmp sge i64 1, %79
|
||||
call void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1 %80)
|
||||
%81 = getelementptr inbounds i64, ptr %78, i64 1
|
||||
%82 = load i64, ptr %81, align 4
|
||||
%83 = icmp ne i64 %82, 2
|
||||
br i1 %83, label %_llgo_27, label %_llgo_28
|
||||
|
||||
_llgo_30: ; preds = %_llgo_28
|
||||
%84 = load ptr, ptr @_llgo_string, align 8
|
||||
%85 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %85, align 8
|
||||
%86 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %84, 0
|
||||
%87 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %86, ptr %85, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %87)
|
||||
unreachable
|
||||
|
||||
_llgo_31: ; preds = %_llgo_28
|
||||
br i1 icmp ne (i64 ptrtoint (ptr getelementptr (i8, ptr null, i64 1) to i64), i64 1), label %_llgo_32, label %_llgo_33
|
||||
|
||||
_llgo_32: ; preds = %_llgo_31
|
||||
%88 = load ptr, ptr @_llgo_string, align 8
|
||||
%89 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 16)
|
||||
store %"github.com/goplus/llgo/internal/runtime.String" { ptr @0, i64 5 }, ptr %89, align 8
|
||||
%90 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" undef, ptr %88, 0
|
||||
%91 = insertvalue %"github.com/goplus/llgo/internal/runtime.eface" %90, ptr %89, 1
|
||||
call void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface" %91)
|
||||
unreachable
|
||||
|
||||
_llgo_33: ; preds = %_llgo_31
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.init"()
|
||||
|
||||
define void @"main.init$after"() {
|
||||
_llgo_0:
|
||||
%0 = load ptr, ptr @_llgo_string, align 8
|
||||
%1 = icmp eq ptr %0, null
|
||||
br i1 %1, label %_llgo_1, label %_llgo_2
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 24)
|
||||
store ptr %2, ptr @_llgo_string, align 8
|
||||
br label %_llgo_2
|
||||
|
||||
_llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.Panic"(%"github.com/goplus/llgo/internal/runtime.eface")
|
||||
|
||||
declare i1 @"github.com/goplus/llgo/internal/runtime.StringEqual"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String")
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
declare void @"github.com/goplus/llgo/internal/runtime.AssertIndexRange"(i1)
|
||||
@@ -31,10 +31,24 @@ $LLDB_PATH --version
|
||||
export LLDB_PATH
|
||||
|
||||
# Default package path
|
||||
export DEFAULT_PACKAGE_PATH="./cl/_testdata/debug"
|
||||
export DEFAULT_PACKAGE_PATH="./_lldb/lldbtest"
|
||||
|
||||
# Function to build the project
|
||||
build_project() {
|
||||
local package_path="$1"
|
||||
LLGO_DEBUG=1 go run ./cmd/llgo build -o "${package_path}/debug.out" "${package_path}"
|
||||
# package_path parameter is kept for backward compatibility
|
||||
local current_dir
|
||||
current_dir=$(pwd) || return
|
||||
|
||||
if ! cd "${DEFAULT_PACKAGE_PATH}"; then
|
||||
echo "Failed to change directory to ${DEFAULT_PACKAGE_PATH}" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
LLGO_DEBUG=1 llgo build -o "debug.out" . || {
|
||||
local ret=$?
|
||||
cd "$current_dir" || return
|
||||
return $ret
|
||||
}
|
||||
|
||||
cd "$current_dir" || return
|
||||
}
|
||||
3
compiler/_lldb/lldbtest/go.mod
Normal file
3
compiler/_lldb/lldbtest/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module lldbtest
|
||||
|
||||
go 1.20
|
||||
@@ -73,9 +73,9 @@ func FuncWithAllTypeStructParam(s StructWithAllTypeFields) {
|
||||
// s.c128: complex128{real = 15, imag = 16}
|
||||
// s.slice: []int{21, 22, 23}
|
||||
// s.arr: [3]int{24, 25, 26}
|
||||
// s.arr2: [3]github.com/goplus/llgo/cl/_testdata/debug.E{{i = 27}, {i = 28}, {i = 29}}
|
||||
// s.arr2: [3]lldbtest.E{{i = 27}, {i = 28}, {i = 29}}
|
||||
// s.s: "hello"
|
||||
// s.e: github.com/goplus/llgo/cl/_testdata/debug.E{i = 30}
|
||||
// s.e: lldbtest.E{i = 30}
|
||||
// s.pad1: 100
|
||||
// s.pad2: 200
|
||||
s.i8 = '\b'
|
||||
@@ -128,7 +128,7 @@ func FuncWithAllTypeParams(
|
||||
// f64: 12
|
||||
// slice: []int{21, 22, 23}
|
||||
// arr: [3]int{24, 25, 26}
|
||||
// arr2: [3]github.com/goplus/llgo/cl/_testdata/debug.E{{i = 27}, {i = 28}, {i = 29}}
|
||||
// arr2: [3]lldbtest.E{{i = 27}, {i = 28}, {i = 29}}
|
||||
// slice[0]: 21
|
||||
// slice[1]: 22
|
||||
// slice[2]: 23
|
||||
@@ -138,7 +138,7 @@ func FuncWithAllTypeParams(
|
||||
// arr2[0].i: 27
|
||||
// arr2[1].i: 28
|
||||
// arr2[2].i: 29
|
||||
// e: github.com/goplus/llgo/cl/_testdata/debug.E{i = 30}
|
||||
// e: lldbtest.E{i = 30}
|
||||
|
||||
// Expected(skip):
|
||||
// i8: '\b'
|
||||
@@ -207,9 +207,9 @@ func FuncWithAllTypeParams(
|
||||
// c64: complex64{real = 21, imag = 22}
|
||||
// c128: complex128{real = 23, imag = 24}
|
||||
// slice: []int{31, 32, 33}
|
||||
// arr2: [3]github.com/goplus/llgo/cl/_testdata/debug.E{{i = 37}, {i = 38}, {i = 39}}
|
||||
// arr2: [3]lldbtest.E{{i = 37}, {i = 38}, {i = 39}}
|
||||
// s: "world"
|
||||
// e: github.com/goplus/llgo/cl/_testdata/debug.E{i = 40}
|
||||
// e: lldbtest.E{i = 40}
|
||||
|
||||
// Expected(skip):
|
||||
// arr: [3]int{34, 35, 36}
|
||||
@@ -512,9 +512,9 @@ func main() {
|
||||
// s.c128: complex128{real = 15, imag = 16}
|
||||
// s.slice: []int{21, 22, 23}
|
||||
// s.arr: [3]int{24, 25, 26}
|
||||
// s.arr2: [3]github.com/goplus/llgo/cl/_testdata/debug.E{{i = 27}, {i = 28}, {i = 29}}
|
||||
// s.arr2: [3]lldbtest.E{{i = 27}, {i = 28}, {i = 29}}
|
||||
// s.s: "hello"
|
||||
// s.e: github.com/goplus/llgo/cl/_testdata/debug.E{i = 30}
|
||||
// s.e: lldbtest.E{i = 30}
|
||||
// s.pf.i16: 100
|
||||
// *(s.pf).i16: 100
|
||||
// *(s.pi): 100
|
||||
@@ -42,19 +42,19 @@ result_file="/tmp/lldb_exit_code"
|
||||
|
||||
# Prepare LLDB commands
|
||||
lldb_commands=(
|
||||
"command script import _lldb/llgo_plugin.py"
|
||||
"command script import _lldb/test.py"
|
||||
"script test.run_tests_with_result('${package_path}/debug.out', ['${package_path}/in.go'], $verbose, $interactive, $plugin_path, '$result_file')"
|
||||
"command script import ../llgo_plugin.py"
|
||||
"command script import ../test.py"
|
||||
"script test.run_tests_with_result('./debug.out', ['main.go'], $verbose, $interactive, $plugin_path, '$result_file')"
|
||||
"quit"
|
||||
)
|
||||
|
||||
# Run LLDB with prepared commands
|
||||
# Run LLDB with prepared commands
|
||||
lldb_command_string=""
|
||||
for cmd in "${lldb_commands[@]}"; do
|
||||
lldb_command_string+=" -o \"$cmd\""
|
||||
done
|
||||
|
||||
|
||||
cd "$package_path"
|
||||
# Run LLDB with the test script
|
||||
eval "$LLDB_PATH $lldb_command_string"
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/goplus/llgo/internal/llgen"
|
||||
"github.com/goplus/llgo/compiler/internal/llgen"
|
||||
"github.com/goplus/mod"
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/goplus/llgo/internal/llgen"
|
||||
"github.com/goplus/llgo/compiler/internal/llgen"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -29,8 +29,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/goplus/gogen"
|
||||
"github.com/goplus/llgo/chore/llpyg/pysig"
|
||||
"github.com/goplus/llgo/ssa"
|
||||
"github.com/goplus/llgo/compiler/chore/llpyg/pysig"
|
||||
"github.com/goplus/llgo/compiler/ssa"
|
||||
)
|
||||
|
||||
type symbol struct {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user