[PATCH] PR4256

Hello,

This patch fixes PR4256.

Regards

pr4256.patch (4.21 KB)

Hi Jakub, please only use spaces for indentation and
not tabs. I guess Owen is the right guy to review
this patch.

Ciao,

Duncan.

Thanks Jakub!

This patch does two things: refactoring the sort method, and fixing the sort to happen on all paths through the phi translation code. I split them into two patches, the first of which is here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090713/080852.html

and the bug fix is here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090713/080851.html

For the bug fix part, I chose to hoist the existing two different places that do sort up above all the phi translation stuff. Since the sort has to happen before phi translation anyway, this is simpler and more foolproof. Thank you for your patch, it was a great fix, I hope you don't mind that I tweaked it a bit.

-Chris