Fix null reference creation in ScheduleDAGInstrs constructor call.
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 20 Aug 2014 19:36:05 +0000 (19:36 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 20 Aug 2014 19:36:05 +0000 (19:36 +0000)
commitada5f2a2c751a11f771cfbca690a769ca1f219c1
tree45c2720bf6c8969f8a9288577ba389cf0ea7297d
parent4b1cddbaf030af33fc25259b4afefb56141a8a59
Fix null reference creation in ScheduleDAGInstrs constructor call.

Both MachineLoopInfo and MachineDominatorTree may be null in ScheduleDAGMI
constructor call. It is undefined behavior to take references to these values.

This bug is reported by UBSan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216118 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineScheduler.h
include/llvm/CodeGen/ScheduleDAGInstrs.h
lib/CodeGen/DFAPacketizer.cpp
lib/CodeGen/PostRASchedulerList.cpp
lib/CodeGen/ScheduleDAGInstrs.cpp
lib/Target/Hexagon/HexagonMachineScheduler.cpp