[PATCH] D119399: [MachineSink] Allow target to adjust sink insertion point
Carl Ritson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 13 18:46:22 PST 2022
critson added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:1397
- MachineBasicBlock::iterator InsertPos = SuccToSinkTo->begin();
- while (InsertPos != SuccToSinkTo->end() && InsertPos->isPHI())
- ++InsertPos;
----------------
ruiling wrote:
> I would suggest we use SkipPHIsAndLabels() to determine the insertion point here. It will make sure we are inserting after prologue instructions. I would also suggest we fix the other two getFirstNonPHI() uses in this file.
Thank you for this suggestion.
It is a much cleaner solution to fix MachineSink to use SkipPHIsAndLabels.
I was unaware of TII->isBasicBlockPrologue.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119399/new/
https://reviews.llvm.org/D119399
More information about the llvm-commits
mailing list