Classify Vars in patterns.

There's 4 classes of variables, depending on whether they have defs in
the source and destination patterns.

Add more XForm verification: In a legalize XForm, all source defs must
be outputs.

Fix a legalize pattern bug caught by this.
This commit is contained in:
Jakob Stoklund Olesen
2016-11-01 16:10:38 -07:00
parent c7d1f90b71
commit 318e3b9b33
5 changed files with 78 additions and 18 deletions

View File

@@ -14,7 +14,7 @@ from cretonne.ast import Def, Apply # noqa
from cretonne.xform import XForm, XFormGroup # noqa
try:
from typing import Union # noqa
from typing import Union
DefApply = Union[Def, Apply]
except ImportError:
pass