[PATCH] D141931: [BOLT] Consider Code Fragments during regreassign

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 13:44:46 PDT 2023


rafauler accepted this revision.
rafauler added a comment.
This revision is now accepted and ready to land.

Thanks! LGTM with some modifications I made to the test file available here: https://pastebin.com/3abP1S5G

I modified the test to fail if the optimization is applied just to main, but not to main.cold, and vice-versa. Please commit this version. I also used basic block labels when generating FDATA instead of hardcoded offsets, so the test is resilient to changes in it. I further modified main.cold to be a global symbol, so the symbol is not stripped when we run llvm-strip. We do need to run llvm-strip because I'm not declaring bb labels as temp symbols anymore (.L1 <https://reviews.llvm.org/L1>, etc), in order to use their names when generating fdata. That's the way we usually write the tests  (function names are globals, bb names are locals but non-temp so we don't need to hardcode fdata).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141931/new/

https://reviews.llvm.org/D141931



More information about the llvm-commits mailing list