[PATCH] D70597: [PHIEliminate] skip dbg instruction when LowerPHINode
Chris Ye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 16:41:10 PST 2019
yechunliang added a comment.
In D70597#1769185 <https://reviews.llvm.org/D70597#1769185>, @jmorse wrote:
> In D70597#1768869 <https://reviews.llvm.org/D70597#1768869>, @yechunliang wrote:
>
> > Another idea is to add one more helper like getFirstNonPHIsAndLabels(), replace getFirstNonPHI in ScheduleDAGSDNodes.cpp#L935.
> > Insert dbg_values after PHIs and Labels, so that there will be no dbg_values barrier between PHI and LABELS.
>
>
> This sounds good to me -- there's an existing "SkipPHIsLabelsAndDebug" method in MachineBasicBlock, would that be sufficient?
>
> Not creating this scenario in the first place sounds is a good plan.
Yes, SkipPHIsAndLabels is workable as below,
MachineBasicBlock::iterator BBBegin = BB->SkipPHIsAndLabels(BB->begin());
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70597/new/
https://reviews.llvm.org/D70597
More information about the llvm-commits
mailing list