import-trace: record stats on failed register mappings

The import-trace tool now systematically collects statistics on which
LLVM -> FAIL* register ID mappings failed during import, and presents
those after the import finished.

Change-Id: Ied67853d754483277868fe21bf2c6efeaeb60f09
This commit is contained in:
Horst Schirmeier
2018-07-30 13:48:08 +02:00
parent d581fd27a2
commit 2c7640fe90
3 changed files with 47 additions and 9 deletions

View File

@ -15,8 +15,6 @@ static std::ostream& operator<<(std::ostream& stream, const llvm::StringRef& s)
LLVMtoFailTranslator *LLVMDisassembler::getTranslator() {
if (ltofail == 0) {
std::cout << "ArchType: " << llvm::Triple::getArchTypeName( llvm::Triple::ArchType(object->getArch()) ) << std::endl;
switch ( llvm::Triple::ArchType(object->getArch()) ) {
case llvm::Triple::x86:
case llvm::Triple::x86_64:
@ -26,7 +24,9 @@ LLVMtoFailTranslator *LLVMDisassembler::getTranslator() {
ltofail = new LLVMtoFailGem5(this);
break;
default:
std::cout << " not supported :(";
std::cerr << "ArchType "
<< llvm::Triple::getArchTypeName(llvm::Triple::ArchType(object->getArch()))
<< " not supported\n";
exit(1);
}
}