[MLGO] ML Regalloc Priority Advisor
authorEric Wang <flpha0830@gmail.com>
Fri, 9 Sep 2022 19:20:27 +0000 (14:20 -0500)
committerEric Wang <flpha0830@gmail.com>
Thu, 29 Sep 2022 21:55:15 +0000 (16:55 -0500)
commit8f4f26ba5bd04f7b335836021e5e63b4236c0305
tree3cb8a46e5c71c06f29141ef1cc9a22f4b7bcdae4
parent7653586d88d8fb45008dd1f89c197592e1ce7c31
[MLGO] ML Regalloc Priority Advisor

The bulk of the implementation is common between 'release' mode (==AOT-ed
model) and 'development' mode (for training), the main difference is
that in development mode, we may also log features (for training logs),
inject scoring information and then produce the log file.

Differential Revision: https://reviews.llvm.org/D133616
llvm/lib/Analysis/models/gen-regalloc-priority-test-model.py [new file with mode: 0644]
llvm/lib/CodeGen/CMakeLists.txt
llvm/lib/CodeGen/MLRegallocPriorityAdvisor.cpp [new file with mode: 0644]
llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp
llvm/test/CodeGen/MLRegalloc/Inputs/reference-prio-log-noml.txt [new file with mode: 0644]
llvm/test/CodeGen/MLRegalloc/dev-mode-prio-logging.ll [new file with mode: 0644]