summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocFast.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-02 07:17:37 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-07-02 07:17:37 +0000
commit54f7c59c1ab4e9b8116d86df9f5a401f62b44f8c (patch)
tree495084998f5f22139e70f796f0deb42596fac0ea /llvm/lib/CodeGen/RegAllocFast.cpp
parent36e11ff81935beb783b93e6c556dffd181c83a26 (diff)
downloadbcm5719-llvm-54f7c59c1ab4e9b8116d86df9f5a401f62b44f8c.tar.gz
bcm5719-llvm-54f7c59c1ab4e9b8116d86df9f5a401f62b44f8c.zip
Better diagnostics when inline asm fails to allocate.
asm.c:2:7: error: ran out of registers during register allocation asm(""::"r"(0), "r"(1), "r"(2), "r"(3), "r"(4), "r"(5), "r"(6), "r"(7), "r"(8), "r"(9)); ^ llvm-svn: 134310
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocFast.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocFast.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp
index ee23194c058..b36a445291b 100644
--- a/llvm/lib/CodeGen/RegAllocFast.cpp
+++ b/llvm/lib/CodeGen/RegAllocFast.cpp
@@ -530,16 +530,10 @@ void RAFast::allocVirtReg(MachineInstr *MI, LiveRegEntry &LRE, unsigned Hint) {
return assignVirtToPhysReg(LRE, BestReg);
}
- // Nothing we can do.
- std::string msg;
- raw_string_ostream Msg(msg);
- Msg << "Ran out of registers during register allocation!";
- if (MI->isInlineAsm()) {
- Msg << "\nPlease check your inline asm statement for "
- << "invalid constraints:\n";
- MI->print(Msg, TM);
- }
- report_fatal_error(Msg.str());
+ // Nothing we can do. Report an error and keep going with a bad allocation.
+ MI->emitError("ran out of registers during register allocation");
+ definePhysReg(MI, *AO.begin(), regFree);
+ assignVirtToPhysReg(LRE, *AO.begin());
}
/// defineVirtReg - Allocate a register for VirtReg and mark it as dirty.
OpenPOWER on IntegriCloud