HomePhabricator

[PHIEliminate] Move dbg values after phi and label

Authored by yechunliang on Jan 16 2020, 3:40 AM.

Description

[PHIEliminate] Move dbg values after phi and label

If there are DBG_VALUEs between phi and label (after phi and before label),
DBG_VALUE will block PHI lowering after the LABEL. Moving all DBG_VALUEs
after Labels in the function ScheduleDAGSDNodes::EmitSchedule to avoid
impacting PHI lowering.

before:
   PHI
   DBG_VALUE
   LABEL
after: (move DBG_VALUE after label)
   PHI
   LABEL
   DBG_VALUE
then: (phi lowering after label)
   LABEL
   COPY
   DBG_VALUE

Fixes the issue: https://bugs.llvm.org/show_bug.cgi?id=43859

Differential Revision: https://reviews.llvm.org/D70597