[PATCH] D33562: MachineLICM: Add new condition for hoisting of caller preserved registers
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 26 14:19:14 PDT 2017
MatzeB added a comment.
Instead of introducing yet another target callback, how about some simple heuristic like `MRI.hasOneDef(Reg) && !MRI.getUsedPhysRegsMask().test(Reg)`[1] allowing hoisting up to the point of that definition (which you can find out with `MRI.def_instr_begin(Reg)` or similar).
[1] We really oughta rename UsedPhysRegMask to something that makes sense (it's simply the union of call regmask operands in the function).
https://reviews.llvm.org/D33562
More information about the llvm-commits
mailing list