[llvm-commits] [llvm] r166642 - in /llvm/trunk: include/llvm/Target/TargetLowering.h include/llvm/Target/TargetTransformImpl.h lib/Target/TargetTransformImpl.cpp lib/Transforms/IPO/PassManagerBuilder.cpp lib/Transforms/Vectorize/LoopVectorize.cpp test/Transforms/LoopVectorize/cost-model.ll

Nadav Rotem nrotem at apple.com
Thu Oct 25 14:13:25 PDT 2012


On Oct 25, 2012, at 2:05 PM, Pasi Parviainen <pasi.parviainen at iki.fi> wrote:

> 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.


I assumed that a table would generate smaller code, but I also like your approach. Can you send a patch ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121025/daa34f7a/attachment.html>


More information about the llvm-commits mailing list