This is an archive of the discontinued LLVM Phabricator instance.

TableGen: Remove Init::resolveListElementReference
ClosedPublic

Authored by nhaehnle on Feb 21 2018, 2:45 AM.

Details

Summary

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

Diff Detail

Repository
rL LLVM

Event Timeline

nhaehnle created this revision.Feb 21 2018, 2:45 AM
tra added a comment.Feb 22 2018, 10:07 AM

I'd fold D43561 into this patch.

Are you okay with this now?

tra accepted this revision.Feb 23 2018, 10:48 AM
This revision is now accepted and ready to land.Feb 23 2018, 10:48 AM
This revision was automatically updated to reflect the committed changes.