[llvm] r271925 - [MBP] Reduce code size by running tail merging in MBP.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 14:15:59 PDT 2016


> On Jun 14, 2016, at 4:54 AM, Mikael Holmén via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Note that BB#2 both does a conditional jump AND falltrhoughs to BB#3.

Yes this case is very unusual because normally CodeGenPrepare removes such pointless conditional branches. However I remember running into problems with this when the optnone attribute was specified (http://llvm.org/PR24581 <http://llvm.org/PR24581>)

You should be able to to construct a testcase for the existing targets with a .mir test which then just uses "llc -run-pass block-placement".

An alternative to improving our test coverage for these corner cases would be to simply forbid the situation and checking in the machine verifier that when a block only has a single predecessor it must not use a conditional jump. Thereby forcing the code that today creates these situations to deal with them.

- Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160620/cd4222e9/attachment.html>


More information about the llvm-commits mailing list