[mlgo][nfc] Refactor the log_reader.py utility
authorMircea Trofin <mtrofin@google.com>
Thu, 2 Feb 2023 22:41:55 +0000 (14:41 -0800)
committerMircea Trofin <mtrofin@google.com>
Thu, 2 Feb 2023 22:41:55 +0000 (14:41 -0800)
commit954cf9a7d485b729198c0f6aff1580b83f273397
treec58af5b9b20260b011f1c0230c71e51be2c6beca
parent63b02271a8916c8ed8ce240ac5823825329755a6
[mlgo][nfc] Refactor the log_reader.py utility

Small refactoring in preparation for tests for the interactive mode.
This allows reading the header, and performing observations, as explicit
steps. The latter is in particular necessary because the exit condition
for the interactive host will be that the child process (the compiler)
exited.
llvm/lib/Analysis/models/log_reader.py