This is an archive of the discontinued LLVM Phabricator instance.

[Tablegen] Optimize isSubsetOf() in AsmMatcherEmitter.cpp
ClosedPublic

Authored by kariddi on Jul 9 2018, 7:56 PM.

Details

Summary

isSubsetOf() could be very slow if the hierarchy of the RegisterClasses of the target is very complicated.

This is mainly caused by the fact that isSubset() is called multiple times over the same SuperClass of a register class if this ends up being the super class of a register class from multiple paths.

Diff Detail

Repository
rL LLVM

Event Timeline

kariddi created this revision.Jul 9 2018, 7:56 PM

LGTM, with one not-critical comment about comment placement.

utils/TableGen/AsmMatcherEmitter.cpp
278

Perhaps this comment should go about the declarations immediate before it.

278

s/about/above/

Thanks David. I'll address your comment in my commit

This revision was not accepted when it landed; it landed in state Needs Review.Jul 13 2018, 9:41 AM
This revision was automatically updated to reflect the committed changes.