When a Var is used in an XForm, it can be defined in the src or dst or
both patterns, and it is classified accordingly. When a Var is defined,
it is also useful to be able to find the `Def` that defined it.
Add src_def and dst_def reference members to Var, and initialize them in
the private Var copies that XForm creates for itself.
These two members also replace the defctx bitmask.
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.
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.
The check.sh script always runs the Python unittests with 'python', but
if 'python3' is in the path, run it with that too.
Fix a Python 3 compat issue and avoid passing None to max() and min().
Use an explicit intersect() function instead to intersect intervals.
The check.sh script always runs the Python unittests with 'python', but
if 'python3' is in the path, run it with that too.
Fix a Python 3 compat issue and avoid passing None to max() and min().
Use an explicit intersect() function instead to intersect intervals.
This is a work in progress. The 'legalizer.rs' file generated by
gen_legalizer.py is not used for anything yet.
Add PEP 484 type annotations to a bunch of Python code.
This is a work in progress. The 'legalizer.rs' file generated by
gen_legalizer.py is not used for anything yet.
Add PEP 484 type annotations to a bunch of Python code.
The InstructionFormat objects make their non-value operands available as
FormatField attributes for use by predicates etc.
Compute these on demand instead of up front. This makes it possible for
the mypy tool to infer the types of these attributes from the
__getattr__ signature.
The InstructionFormat objects make their non-value operands available as
FormatField attributes for use by predicates etc.
Compute these on demand instead of up front. This makes it possible for
the mypy tool to infer the types of these attributes from the
__getattr__ signature.
A extended value can now be changed to a third form: An alias of another
value. This is like a copy instruction, but implicit in the value table.
Value aliases are used in lieu of use-def chains which would be used to
implement replace-all-uses-with.
Added new DFG methods:
- change_to_alias() changes an existing extended value into an alias.
Primay values can't be changed, replace their definition with a copy
instruction instead.
- resolve_aliases() find the original non-alias value.
- resolve_copies() like resolve_aliases(), but also sees through
copy/spill/fill instructions.
A extended value can now be changed to a third form: An alias of another
value. This is like a copy instruction, but implicit in the value table.
Value aliases are used in lieu of use-def chains which would be used to
implement replace-all-uses-with.
Added new DFG methods:
- change_to_alias() changes an existing extended value into an alias.
Primay values can't be changed, replace their definition with a copy
instruction instead.
- resolve_aliases() find the original non-alias value.
- resolve_copies() like resolve_aliases(), but also sees through
copy/spill/fill instructions.
Polymorphic single-result instructions don't always return the
controlling type variable as their first result. They may use a derived
type variable, as for example icmp does.
Polymorphic single-result instructions don't always return the
controlling type variable as their first result. They may use a derived
type variable, as for example icmp does.
All scalar types are mapped to b1 which is usually what you want for a
scalar. Vector types have their lanes mapped to the wider boolean types.
Add an as_bool_pedantic() methos that produces the scalar sized boolean
types as before.
Also add a friendlier Debug implementation for Type.
All scalar types are mapped to b1 which is usually what you want for a
scalar. Vector types have their lanes mapped to the wider boolean types.
Add an as_bool_pedantic() methos that produces the scalar sized boolean
types as before.
Also add a friendlier Debug implementation for Type.