[PATCH] D44700: [GlobalISel] Improving InstructionSelect's performance by reducing MatchTable

Roman Tereshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 20 14:11:49 PDT 2018


rtereshin created this revision.
rtereshin added reviewers: qcolombet, dsanders, bogner, aemerson.
Herald added subscribers: kristof.beyls, rovka.

This patch decreases time spent by GlobalISel in its InstructionSelect pass by roughly 60% for -O0 builds for large inputs as measured on sqlite3-amalgamation (http://sqlite.org/download.html) targeting AArch64.

The performance improvement is achieved solely by reducing the number of matching GIM_* opcodes executed by the MatchTable's interpreter during the selection by approx. a factor of 30, which also brings contribution of this particular part of the selection process to the overall runtime of InstructionSelect pass down from approx. 60-70% to 5-7%, thus making further improvements in this particular direction not very profitable.

The patch loosely depends on Testgen patches and relies on additional testing provided by it (see https://reviews.llvm.org/D43962)


Repository:
  rL LLVM

https://reviews.llvm.org/D44700

Files:
  include/llvm/CodeGen/GlobalISel/InstructionSelector.h
  include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
  lib/CodeGen/GlobalISel/InstructionSelectorTestgen.cpp
  test/TableGen/GlobalISelEmitter.td
  utils/TableGen/GlobalISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44700.139191.patch
Type: text/x-patch
Size: 186547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180320/82d16e94/attachment-0001.bin>


More information about the llvm-commits mailing list