Skip to content

go-llvm: add PHI incoming block replacement - #5

Merged
zhouguangyuan0718 merged 1 commit into
masterfrom
codex/phi-replace-incoming-block
Aug 2, 2026
Merged

go-llvm: add PHI incoming block replacement#5
zhouguangyuan0718 merged 1 commit into
masterfrom
codex/phi-replace-incoming-block

Conversation

@zhouguangyuan0718

@zhouguangyuan0718 zhouguangyuan0718 commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • expose PHINode::replaceIncomingBlockWith through the additional C bindings
  • add Value.ReplaceIncomingBlock(old, new) to the Go API
  • verify the rewritten PHI predecessor with LLVM module verification

This is the minimal binding needed by goallc/go#38 to split nilcheck CFG blocks after normal PHI construction without rebuilding PHI nodes.

Validation

  • go test -tags="llvm23 dynamicllvm" -count=1 ./...
  • gofmt
  • git diff --check

@zhouguangyuan0718
zhouguangyuan0718 merged commit e0a85f0 into master Aug 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant