OSDN Git Service

LiveRangeCalc: Fix reporting of invalid vreg usage in liveness calculation
authorMatthias Braun <matze@braunis.de>
Mon, 19 Sep 2016 16:49:45 +0000 (16:49 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 19 Sep 2016 16:49:45 +0000 (16:49 +0000)
commitb0731963da78b4b139825a45ca8606401466c308
treeacad77bf6b653ab96193039c4d6ed514da824ae9
parentba3d957955dcba7a35eda72c6bb301bdf753a482
LiveRangeCalc: Fix reporting of invalid vreg usage in liveness calculation

Machine programs need a definition of each vreg before reaching a use
(the definition may come from an IMPLICIT_DEF instruction). This class
of errors is not detected by the MachineVerifier because of efficiency
concerns. LiveRangeCalc used to report these problems, make it do that
again (followup to r279625).

Also use report_fatal_error() instead of llvm_unreachable() as the error
reporting is only present in asserts build anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281914 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveRangeCalc.cpp
test/CodeGen/X86/invalid-liveness.mir [new file with mode: 0644]