Hello,

The attached patch splits out the code generation bits from
expand_case to two new functions, emit_case_decision_tree and
emit_case_dispatch_table.

I also added some bits of new code to help me better understand how
the code generation for decision trees works (I took dump_case_nodes
taken from a patch by DJ that somehow never made it in [1]), and I've
added a lot of comments about where certain magic numbers originated.

While working on this, I noticed that one of the switch test cases
optimizes to an empty function, so I changed this test case. Also,
some try_casesi ATTRIBUTE_UNUSED markers are no longer necessary.

Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk?

Ciao!
Steven

[1] http://gcc.gnu.org/ml/gcc-patches/2004-07/msg02479.html

Attachment: splitup_expand_case.diff
Description: Binary data

Reply via email to