OSDN Git Service

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)
commit7c20af79cac9059790ef98876cc83cdaef2b6625
tree7c5255cd19cdcec1a47387c290016c665d66ee15
parent0d977a1eb5f6c6a8aaf39b0292df35acc88dfe94
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280011 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/GlobalISel/MachineLegalizer.h
lib/CodeGen/GlobalISel/MachineLegalizer.cpp
unittests/CodeGen/GlobalISel/MachineLegalizerTest.cpp