<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 25, 2012, at 2:05 PM, Pasi Parviainen <<a href="mailto:pasi.parviainen@iki.fi">pasi.parviainen@iki.fi</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">How about generating single enumerator which contains all the instructions with help of 'include/llvm/Instruction.def'. Then create switch over that enumerator, where each case would return ISD value and lastly inserting 'llvm_unreachable' at the end of the function. With this approach compiler would take care of generating the table, warn about missing cases and lastly catch possible run-time errors.</span></blockquote></div><div><br></div><div>I assumed that a table would generate smaller code, but I also like your approach. Can you send a patch ?</div></body></html>