[PATCH] D91632: [TableGen] [ISel Matcher Emitter] Rework with two passes: one to size, one to emit

Paul C. Anagnostopoulos via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 07:32:57 PST 2020


Paul-C-Anagnostopoulos created this revision.
Paul-C-Anagnostopoulos added reviewers: lattner, nhaehnle, madhur13490, arsenm, tstellar.
Herald added subscribers: llvm-commits, tpr.
Herald added a project: LLVM.
Paul-C-Anagnostopoulos requested review of this revision.
Herald added a subscriber: wdng.

This patch reworks DAGISelMatcherEmitter.cpp in order to speed it up. It now makes two passes over the matcher tree: one to size the matchers and one to emit them. This eliminates the relaxation method that was used to size the matchers previously. The emitter produces exactly the same output as before.

For the AMDGPU target, the emitting phase took 88.5% of the TableGen run; now it takes 3.5% of the time. On my machine the run went from 751 seconds to 89 seconds.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91632

Files:
  llvm/utils/TableGen/DAGISelMatcher.h
  llvm/utils/TableGen/DAGISelMatcherEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91632.305791.patch
Type: text/x-patch
Size: 15505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201117/874404ff/attachment.bin>


More information about the llvm-commits mailing list