[mlgo] Make InteractiveModelRunner actually work with named pipes
authorMircea Trofin <mtrofin@google.com>
Wed, 1 Feb 2023 22:01:55 +0000 (14:01 -0800)
committerMircea Trofin <mtrofin@google.com>
Wed, 1 Feb 2023 23:24:44 +0000 (15:24 -0800)
commit83051c5a5f09fe4de5d5b504e5fb864060e9794b
tree678c2eee10c909ba32340bc2816b4c8ab6f14936
parent49b081c827ee44b8dfaf13333a551b70c128108e
[mlgo] Make InteractiveModelRunner actually work with named pipes

Turns out raw_fd_stream doesn't work with named pipes, so we just need
to lower the abstraction. Updated the unittest accordingly. Because
mkfifo's path argument requires a certain naming pattern on Windows
(IIUC), restricted the test to Linux only.

Differential Revision: https://reviews.llvm.org/D143110
llvm/include/llvm/Analysis/InteractiveModelRunner.h
llvm/lib/Analysis/InteractiveModelRunner.cpp
llvm/unittests/Analysis/MLModelRunnerTest.cpp