[llvm] r242551 - Use llvm_unreachable() instead of report_fatal_error() if the machine model is incomplete
Matthias Braun
matze at braunis.de
Fri Jul 17 10:50:11 PDT 2015
Author: matze
Date: Fri Jul 17 12:50:11 2015
New Revision: 242551
URL: http://llvm.org/viewvc/llvm-project?rev=242551&view=rev
Log:
Use llvm_unreachable() instead of report_fatal_error() if the machine model is incomplete
This error is for developers only so it makes sense to abort and get a
backtrace.
Modified:
llvm/trunk/lib/CodeGen/TargetSchedule.cpp
Modified: llvm/trunk/lib/CodeGen/TargetSchedule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetSchedule.cpp?rev=242551&r1=242550&r2=242551&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetSchedule.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetSchedule.cpp Fri Jul 17 12:50:11 2015
@@ -211,11 +211,9 @@ unsigned TargetSchedModel::computeOperan
if (SCDesc->isValid() && !DefMI->getOperand(DefOperIdx).isImplicit()
&& !DefMI->getDesc().OpInfo[DefOperIdx].isOptionalDef()
&& SchedModel.isComplete()) {
- std::string Err;
- raw_string_ostream ss(Err);
- ss << "DefIdx " << DefIdx << " exceeds machine model writes for "
- << *DefMI;
- report_fatal_error(ss.str());
+ errs() << "DefIdx " << DefIdx << " exceeds machine model writes for "
+ << *DefMI;
+ llvm_unreachable("incomplete machine model");
}
#endif
// FIXME: Automatically giving all implicit defs defaultDefLatency is
More information about the llvm-commits
mailing list