diff options
author | Matt Davis <Matthew.Davis@sony.com> | 2018-08-13 18:11:48 +0000 |
---|---|---|
committer | Matt Davis <Matthew.Davis@sony.com> | 2018-08-13 18:11:48 +0000 |
commit | 4bcf369d9b7cc2b8452ce42203a82e752c2de795 (patch) | |
tree | 6d9b2fcacaca25f5c3fd5ff5c125eadc26e630e4 /llvm/tools/llvm-mca/RegisterFile.cpp | |
parent | 1a3caef1481a553934d1715da0381893a9541a8d (diff) | |
download | bcm5719-llvm-4bcf369d9b7cc2b8452ce42203a82e752c2de795.tar.gz bcm5719-llvm-4bcf369d9b7cc2b8452ce42203a82e752c2de795.zip |
[llvm-mca] Propagate fatal llvm-mca errors from library classes to driver.
Summary:
This patch introduces error handling to propagate the errors from llvm-mca library classes (or what will become library classes) up to the driver. This patch also introduces an enum to make clearer the intention of the return value for Stage::execute.
This supports PR38101.
Reviewers: andreadb, courbet, RKSimon
Reviewed By: andreadb
Subscribers: llvm-commits, tschuett, gbedwell
Differential Revision: https://reviews.llvm.org/D50561
llvm-svn: 339594
Diffstat (limited to 'llvm/tools/llvm-mca/RegisterFile.cpp')
-rw-r--r-- | llvm/tools/llvm-mca/RegisterFile.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/tools/llvm-mca/RegisterFile.cpp b/llvm/tools/llvm-mca/RegisterFile.cpp index 44de105b899..ea27a8b9b68 100644 --- a/llvm/tools/llvm-mca/RegisterFile.cpp +++ b/llvm/tools/llvm-mca/RegisterFile.cpp @@ -306,8 +306,14 @@ unsigned RegisterFile::isAvailable(ArrayRef<unsigned> Regs) const { // microarchitectural registers in register file #0 was changed by the // users via flag -reg-file-size. Alternatively, the scheduling model // specified a too small number of registers for this register file. - report_fatal_error( - "Not enough microarchitectural registers in the register file"); + LLVM_DEBUG(dbgs() << "Not enough registers in the register file.\n"); + + // FIXME: Normalize the instruction register count to match the + // NumPhysRegs value. This is a highly unusual case, and is not expected + // to occur. This normalization is hiding an inconsistency in either the + // scheduling model or in the value that the user might have specified + // for NumPhysRegs. + NumRegs = RMT.NumPhysRegs; } if (RMT.NumPhysRegs < (RMT.NumUsedPhysRegs + NumRegs)) |