[llvm] r194475 - SimplifyCFG: Use existing constant folding logic when forming switch tables.

Hans Wennborg hans at chromium.org
Wed Nov 13 16:55:09 PST 2013


On Tue, Nov 12, 2013 at 4:24 AM, Benjamin Kramer
<benny.kra at googlemail.com> wrote:
> Author: d0k
> Date: Tue Nov 12 06:24:36 2013
> New Revision: 194475
>
> URL: http://llvm.org/viewvc/llvm-project?rev=194475&view=rev
> Log:
> SimplifyCFG: Use existing constant folding logic when forming switch tables.
>
> Both simpler and more powerful than the hand-rolled folding logic.

Thanks!

I'm really hoping that some day one of the main passes (GVN?) could
exploit the fact that the value of x is known inside the case blocks
of switch(x) and we wouldn't have to do the constant propagation here
at all.

 - Hans



More information about the llvm-commits mailing list