alive2
alive2 copied to clipboard
Cleanup loop unroll implementation
We produce spurious phi nodes, e.g. the example in https://github.com/AliveToolkit/alive2/issues/571
and tests/alive-tv/loops/issue561.srctgt.ll
New GVN uses a clever trick to sort BBs: it uses RPO to sort the dom tree branches. We can probably use that instead of the current hackish topsort: https://github.com/llvm/llvm-project/blob/2fe81edef6f0b35abffbbc59b649b30ea9c15a62/llvm/lib/Transforms/Scalar/NewGVN.cpp#L3445-L3467