[PATCH] D61489: RegAlloc: try to fail more gracefully when out of registers

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 10:12:43 PDT 2019


efriedma added a comment.

I think there's a fundamental distinction between the two cases of running out of registers.  We expect that the user of a programming language will write inline asm directives, and some of those directives will require more registers than the architecture actually supports.  But for other instructions, the user isn't writing the register inputs/outputs explicitly; we can't run out of registers unless there's a compiler bug (either in the register allocator, or elsewhere).

Given that, there needs to be some way for error reporting to distinguish the two errors.  When we run out of registers due to a non-inline-asm construct in clang, we want to make it clear to the user that the issue is a compiler bug, not user error.  This means we need to trigger the code in the clang driver that asks for a bug report and generates preprocessed source.

Of course, that isn't fundamentally tied to calling abort() from the register allocator; some alternate mechanism for reporting ICEs which doesn't immediately kill the process would be reasonable.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61489/new/

https://reviews.llvm.org/D61489





More information about the llvm-commits mailing list