MachineScheduler: Restrict macroop fusion to data-dependent instructions.
authorMatthias Braun <matze@braunis.de>
Mon, 20 Jul 2015 22:34:44 +0000 (22:34 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 20 Jul 2015 22:34:44 +0000 (22:34 +0000)
commit679d26ce5620bdf85161ec957739e2d92acc07bc
tree71d143e73491a21fa59ac61440e15e65e62566f3
parent85e9772512e67c463ba0cdc7d63f835443ac6002
MachineScheduler: Restrict macroop fusion to data-dependent instructions.

Before creating a schedule edge to encourage MacroOpFusion check that:
- The predecessor actually writes a register that the branch reads.
- The predecessor has no successors in the ScheduleDAG so we can
  schedule it in front of the branch.

This avoids skewing the scheduling heuristic in cases where macroop
fusion cannot happen.

Differential Revision: http://reviews.llvm.org/D10745

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242723 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineScheduler.cpp
test/CodeGen/AArch64/arm64-ccmp.ll