Hi, all
I am interested in how jump-table representated in DAG.
I find the method visitJumpTable will Emit JumpTable node in the current MBB.
visitJumpTableHeader - This function emits necessary code to produce index in the JumpTable from switch case.
but how switch case emits?
I would like to make this clearly.
Thanks,
yaoxiao
Hi Yao,
Hi, all
I am interested in how jump-table representated in DAG.
I find the method visitJumpTable will Emit JumpTable node in the current
MBB.
visitJumpTableHeader - This function emits necessary code to produce index
in the JumpTable from switch case.
but how switch case emits?
I would like to make this clearly.
It sounds like you're already looking in the right places.
The switch lowering starts in SelectionDAGBuilder::visitSwitch which
analyses the switch and decides how to lower it. For jump tables, it
calls SelectionDAGBuilder::buildJumpTable which creates and populates
the JumpTable and JumpTableHeader
Hope this helps,
Hans