Cursor library.

Add a new cursor module and define an EncCursor data type in it. An
EncCursor is a cursor that inserts instructions with a valid encoding
for the ISA. This is useful for passes generating code after
legalization.

Implement a builder interface via the new InstInserterBase trait such
that the EncCursor builders support with_result().

Use EncCursor in coalescing.rs instead of the layout cursor as a proof
of concept.
This commit is contained in:
Jakob Stoklund Olesen
2017-08-03 21:08:36 -07:00
parent 621abb5026
commit 87cee86acb
3 changed files with 122 additions and 39 deletions

View File

@@ -34,6 +34,7 @@ pub mod verifier;
mod abi;
mod constant_hash;
mod context;
mod cursor;
mod iterators;
mod legalizer;
mod licm;