[TableGen] Don't try to move CheckOpcode before CheckType/CheckChildType in ContractNodes. NFC
It appears that CheckOpcode is already emitted before CheckType so this hasn't been doing anything on any in tree targets.
This commit is contained in:
parent
79762a10e4
commit
31bd82cdcc
@ -135,13 +135,11 @@ static void ContractNodes(std::unique_ptr<Matcher> &MatcherPtr,
|
||||
// variants.
|
||||
}
|
||||
|
||||
// If we have a CheckType/CheckChildType/Record node followed by a
|
||||
// CheckOpcode, invert the two nodes. We prefer to do structural checks
|
||||
// before type checks, as this opens opportunities for factoring on targets
|
||||
// like X86 where many operations are valid on multiple types.
|
||||
if ((isa<CheckTypeMatcher>(N) || isa<CheckChildTypeMatcher>(N) ||
|
||||
isa<RecordMatcher>(N)) &&
|
||||
isa<CheckOpcodeMatcher>(N->getNext())) {
|
||||
// If we have a Record node followed by a CheckOpcode, invert the two nodes.
|
||||
// We prefer to do structural checks before type checks, as this opens
|
||||
// opportunities for factoring on targets like X86 where many operations are
|
||||
// valid on multiple types.
|
||||
if (isa<RecordMatcher>(N) && isa<CheckOpcodeMatcher>(N->getNext())) {
|
||||
// Unlink the two nodes from the list.
|
||||
Matcher *CheckType = MatcherPtr.release();
|
||||
Matcher *CheckOpcode = CheckType->takeNext();
|
||||
|
Loading…
x
Reference in New Issue
Block a user