llgo/ssa.Phi: AddIncoming fix

This commit is contained in:
xushiwei
2024-05-24 09:20:58 +08:00
parent 97e38255c6
commit 056ad51c24
12 changed files with 555 additions and 470 deletions

View File

@@ -559,7 +559,7 @@ func (p Package) AfterInit(b Builder, ret BasicBlock) {
doAbiInit := len(p.abiini) > 0
doPyLoadModSyms := p.pyHasModSyms()
if doAbiInit || doPyLoadModSyms {
b.SetBlockEx(ret, afterInit)
b.SetBlockEx(ret, afterInit, false)
if doAbiInit {
sigAbiInit := types.NewSignatureType(nil, nil, nil, nil, nil, false)
fn := p.NewFunc(p.abi.Pkg+".init$abi", sigAbiInit, InC)
@@ -743,7 +743,7 @@ func (p Program) tyGetAttrString() *types.Signature {
func (p Package) PyInit() bool {
if fn := p.FuncOf("main"); fn != nil {
b := fn.NewBuilder()
b.SetBlockEx(fn.Block(0), AtStart).callPyInit()
b.SetBlockEx(fn.Block(0), AtStart, false).callPyInit()
b.Dispose()
return true
}