]> git.lizzy.rs Git - rust.git/commit
Auto merge of #94123 - bjorn3:cg_ssa_singleton_builder, r=tmiasko
authorbors <bors@rust-lang.org>
Thu, 24 Feb 2022 12:28:19 +0000 (12:28 +0000)
committerbors <bors@rust-lang.org>
Thu, 24 Feb 2022 12:28:19 +0000 (12:28 +0000)
commit648d038c867a7650a68794940842aa6ab6df6962
treef34d7f10fd2d84cb6c76785f16e22f67eba6345e
parente855e2d15c8fcb4d6b9ffddb5f408acf008cc96f
parent18c34e41a40f0d4ae531211364d81c47867d9067
Auto merge of #94123 - bjorn3:cg_ssa_singleton_builder, r=tmiasko

Partially move cg_ssa towards using a single builder

Not all codegen backends can handle hopping between blocks well. For example Cranelift requires blocks to be terminated before switching to building a new block. Rust-gpu requires a `RefCell` to allow hopping between blocks and cg_gcc currently has a buggy implementation of hopping between blocks. This PR reduces the amount of cases where cg_ssa switches between blocks before they are finished and mostly fixes the block hopping in cg_gcc. (~~only `scalar_to_backend` doesn't handle it correctly yet in cg_gcc~~ fixed that one.)

`@antoyo` please review the cg_gcc changes.