[llvm-commits] [PATCH] Preserve branch weight metadata when creating switches in SimplifyCFG

Alastair Murray alastairmurray42 at gmail.com
Sun Aug 19 09:05:57 PDT 2012


Hi Manman,

Thank you for the comments.

On 18/08/12 06:55, Manman Ren wrote:
> Some of the logic is not clear to me.
> <snip>

Yes, you are correct.  I have added both of your examples to the test 
case and they both produce incorrect branch weights.

The first example actually discards all weights for those switches as it 
cannot determine a weight for one branch (that is a bug in itself), and 
after fixing that they both produce the wrong weights (the main bug).

Rewritten patch to follow, once your comments have been incorporated.

Regards,
Alastair.



More information about the llvm-commits mailing list