[PATCH] D143218: [mlgo] Hook up the interactive runner to the mlgo-ed passes
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 3 14:47:11 PST 2023
kazu added inline comments.
================
Comment at: llvm/lib/Analysis/models/interactive_host.py:1
+import ctypes
+import log_reader
----------------
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.
================
Comment at: llvm/test/Transforms/Inline/ML/Inputs/interactive_main.py:11
+ def advice(self, _):
+ self.to_return = not self.to_return
+ return int(self.to_return)
----------------
Could you add a comment somewhere in this file?
IIUC, we say "yes, no, yes, no, ..." as expected by `llvm/test/Transforms/Inline/ML/interactive-mode.ll`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143218/new/
https://reviews.llvm.org/D143218
More information about the llvm-commits
mailing list