[PATCH] D47655: [MachineOutliner] Don't outline sequences where x16/x17/nzcv are live across
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 22 16:11:00 PDT 2018
efriedma added inline comments.
================
Comment at: include/llvm/CodeGen/MachineOutliner.h:147
+ LRU.addLiveOuts(*MBB);
+ std::for_each(MBB->rbegin(), MBB->rend(),
+ [this](MachineInstr &MI) {
----------------
This is still not right; it's computing the values which are live at the beginning of the block, not the beginning of the outlined sequence.
You need to start at `MBB->rbegin()` (the end of the block), and end at `++(MachineBasicBlock::reverse_iterator)front()` (the beginning of the outlined sequence).
Alternatively, I guess you could conservatively use LiveRegUnits::accumulate.
https://reviews.llvm.org/D47655
More information about the llvm-commits
mailing list