BranchFolder removes implicit defs from blocks where they are the only instructions, potentially aside from an unconditional branch. This can lead to the liveness information becoming incorrect.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Heh, this obviously solves the problems of the broken/missing liveness updates :)
The next question of course is whether this will degrade codegen quality. Do the jumps in those empty-but-implicit-defs blocks removed so we just have a fall-through? Does MachineBlockPlacement help with that?
I think a convincing answer would require diffing assembly generated with/without this patch on a set of benchmarks. test-suite with -save-temps=obj flag maybe?.
I built test-suite with and without this patch. Out 466 .s files, there were differences in 3:
MultiSource/Benchmarks/MiBench/consumer-typeset/z23.s
Clicked the wrong button. Once again:
I built test-suite with and without this patch. Out 466 .s files, there were differences in 3:
MultiSource/Benchmarks/MiBench/consumer-typeset/z23.s
MultiSource/Benchmarks/MiBench/consumer-typeset/z37.s
MultiSource/Benchmarks/MiBench/consumer-typeset/z44.s
I looked at the actual differences:
z23.s: one small block is located in a different place. It's not on a fall-through (either in or out) path in either case.
z37.s: block numbering differences, no codegen differences
z44.s: same as z37.s, i.e. no codegen differences