[PATCH] D43562: TableGen: Remove Init::resolveListElementReference

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 02:45:52 PST 2018


nhaehnle created this revision.
nhaehnle added reviewers: arsenm, craig.topper, tra, MartinO.
Herald added a subscriber: wdng.
nhaehnle added a dependency: D43561: TableGen: Avoid using resolveListElementReference in TGParser.

Resolving a VarListElementInit should just resolve the list and then
take its element. This eliminates a lot of duplicated logic and
simplifies the next steps of refactoring resolveReferences.

This does potentially cause sub-elements of the entire list to be
resolved resulting in more work, but I didn't notice a measurable
change in performance, and a later patch adds a caching mechanism that
covers at least the common case of `var[i]` in a more generic way.

Change-Id: I7b59185b855c7368585c329c31e5be38c5749dac


Repository:
  rL LLVM

https://reviews.llvm.org/D43562

Files:
  include/llvm/TableGen/Record.h
  lib/TableGen/Record.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43562.135223.patch
Type: text/x-patch
Size: 12368 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180221/6db21a95/attachment.bin>


More information about the llvm-commits mailing list