GlobalISel: use multi-dimensional arrays for legalize actions.
authorTim Northover <tnorthover@apple.com>
Mon, 29 Aug 2016 21:00:00 +0000 (21:00 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 29 Aug 2016 21:00:00 +0000 (21:00 +0000)
commitf8bab1ce0cac4c802372af46cd4c0045eab6fdb4
treefd823fb350c7044d853edfe44d714a6f0754a28a
parentb3b5a7362c525c9e195e49cba31f4300aa491443
GlobalISel: use multi-dimensional arrays for legalize actions.

Instead of putting all possible requests into a single table, we can perform
the extremely dense lookup based on opcode and type-index in constant time
using multi-dimensional array-like things.

This roughly halves the time spent doing legalization, which was dominated by
queries against the Actions table.

llvm-svn: 280011
llvm/include/llvm/CodeGen/GlobalISel/MachineLegalizer.h
llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp
llvm/unittests/CodeGen/GlobalISel/MachineLegalizerTest.cpp