This hooks up the interactive model runner to the passes that support
ml-based decisions. Because the interface to this runner is the exact
same as the one used during inference, we just reuse the exact same
setup we have for "release mode". This makes "release mode" a misnomer -
and that's something we needed to resolve sooner or later (e.g.
supporting more than one embedded model for the same problem was another
reason to drop that nomenclature). That will happen in a subsequent
change.
To use this evaluator, just enable the pass in (currently) "release"
mode, but also pass the base name for the 2 channel files via the
pass-specific flag.
The 2 files are the responsibilty of the hosting process. The added
tests use a minimal, toy such host, illustrating setup and
communication.
Could you add some comments about what this script is for and how to use it (or a pointer to a .ll test that uses it)?
IIUC, the script invokes the compiler and acts as a bridge between the compiler proper and the user's model. The user is responsible for supplying the complete command line, including the compiler proper (clang, opt, etc) and the -regalloc-priority-interactive-channel-base= option to specify the base name (that is, without .in or .out) of the named pipes.