Skip to content
Commit 982c5eb3 authored by Ahmed Bougacha's avatar Ahmed Bougacha
Browse files

[GlobalISel] Return an Expected<RuleMatcher> for each SDAG pattern. NFC.

Instead of emitting the matcher code directly, return the rule matcher
and the skip reason as an Expected<RuleMatcher>.

This will let us record all matchers and process them before emission.

It's a somewhat unconventional use of Error, but it's nicer than, say,
std::pair, because of the bool conversions.

Differential Revision: https://reviews.llvm.org/D29743

llvm-svn: 294706
parent fb9ae0e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment