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)
commite1d9628bba5f42790ba73d37fe961d560d921408
tree2a865131aa76709176dc7d3e331fdc30615b3230
parentba8a82dbe42118f3ee51e21e681490fd2042eb0d
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.

llvm-svn: 281914
llvm/lib/CodeGen/LiveRangeCalc.cpp
llvm/test/CodeGen/X86/invalid-liveness.mir [new file with mode: 0644]