[llvm] r270233 - Fix error reporting in register scavenger (lack of emergency spill slot)
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 09:38:35 PDT 2016
Author: kparzysz
Date: Fri May 20 11:38:34 2016
New Revision: 270233
URL: http://llvm.org/viewvc/llvm-project?rev=270233&view=rev
Log:
Fix error reporting in register scavenger (lack of emergency spill slot)
- Do not store Twine objects.
- Remove report_fatal_error, since llvm_unreachable does terminate the
program in release mode.
Modified:
llvm/trunk/lib/CodeGen/RegisterScavenging.cpp
Modified: llvm/trunk/lib/CodeGen/RegisterScavenging.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegisterScavenging.cpp?rev=270233&r1=270232&r2=270233&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegisterScavenging.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegisterScavenging.cpp Fri May 20 11:38:34 2016
@@ -440,13 +440,10 @@ unsigned RegScavenger::scavengeRegister(
// Spill the scavenged register before I.
int FI = Scavenged[SI].FrameIndex;
if (FI < FIB || FI >= FIE) {
- Twine Msg = Twine("Error while trying to spill ") + TRI->getName(SReg) +
- " from class " + TRI->getRegClassName(RC) +
- ": Cannot scavenge register without an emergency spill slot!";
- // Keep both error functions, since llvm_unreachable prints the call
- // stack, but it does not terminate program in release mode.
- llvm_unreachable(Msg.str().c_str());
- report_fatal_error(Msg);
+ std::string Msg = std::string("Error while trying to spill ") +
+ TRI->getName(SReg) + " from class " + TRI->getRegClassName(RC) +
+ ": Cannot scavenge register without an emergency spill slot!";
+ llvm_unreachable(Msg.c_str());
}
TII->storeRegToStackSlot(*MBB, I, SReg, true, Scavenged[SI].FrameIndex,
RC, TRI);
More information about the llvm-commits
mailing list