[MLGO] Add per-instruction MBB frequencies to regalloc dev features
authorAiden Grossman <agrossman154@yahoo.com>
Wed, 28 Sep 2022 18:18:50 +0000 (18:18 +0000)
committerAiden Grossman <agrossman154@yahoo.com>
Wed, 28 Sep 2022 18:45:04 +0000 (18:45 +0000)
commit8d77f8fde7074639e1146f92e1c1e872316776ed
treee7a580627bc51d7952d8b518e184ccfae54016e3
parent2c12a04bba76e88259b3fae2cf7ce6f033a953ff
[MLGO] Add per-instruction MBB frequencies to regalloc dev features

This commit adds in two new features to the ML regalloc eviction
analysis that can be used in ML models, a vector of MBB frequencies and
a vector of indicies mapping instructions to their corresponding basic
blocks. This will allow for further experimentation with per-instruction
features and give a lot more flexibility for future experimentation over
how we're extracting MBB frequency data currently.

Reviewed By: mtrofin, jacobhegna

Differential Revision: https://reviews.llvm.org/D134166
llvm/lib/CodeGen/MLRegallocEvictAdvisor.cpp
llvm/lib/CodeGen/MLRegallocEvictAdvisor.h
llvm/test/CodeGen/MLRegalloc/dev-mode-extra-features-logging.ll
llvm/unittests/CodeGen/MLRegallocDevelopmentFeatures.cpp