|
36 | 36 | #define LLVM_VM_BASE_H_ |
37 | 37 |
|
38 | 38 | #include "jit_helper.h" |
39 | | -#include <absl/container/flat_hash_map.h> |
40 | 39 | #include <iss/arch/traits.h> |
41 | 40 | #include <iss/arch_if.h> |
42 | 41 | #include <iss/debugger/target_adapter_base.h> |
43 | 42 | #include <iss/debugger_if.h> |
| 43 | +#include <iss/log_categories.h> |
44 | 44 | #include <iss/vm_if.h> |
45 | 45 | #include <iss/vm_plugin.h> |
46 | 46 | #include <util/ities.h> |
|
55 | 55 | #include <array> |
56 | 56 | #include <chrono> |
57 | 57 | #include <iostream> |
58 | | -#include <map> |
59 | | -#include <sstream> |
60 | | -#include <stack> |
| 58 | +#include <unordered_map> |
| 59 | + |
61 | 60 | #include <utility> |
62 | 61 | #include <vector> |
63 | 62 |
|
@@ -214,8 +213,8 @@ template <typename ARCH> class vm_base : public debugger_if, public vm_if { |
214 | 213 | auto elapsed = end - start; |
215 | 214 | auto millis = std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count(); |
216 | 215 | uint64_t& cur_icount = get_reg<uint64_t>(reg_e::ICOUNT); |
217 | | - CLOG(INFO) << "Executed " << cur_icount << " instructions in " << func_map.size(, dbt_rise_iss) << " code blocks during " << millis |
218 | | - << "ms resulting in " << (cur_icount * 0.001 / millis) << "MIPS"; |
| 216 | + CLOG(INFO, dbt_rise_iss) << "Executed " << cur_icount << " instructions in " << func_map.size() << " code blocks during " << millis |
| 217 | + << "ms resulting in " << (cur_icount * 0.001 / millis) << "MIPS"; |
219 | 218 | return error; |
220 | 219 | } |
221 | 220 |
|
@@ -362,14 +361,6 @@ template <typename ARCH> class vm_base : public debugger_if, public vm_if { |
362 | 361 | builder.CreateCall(mod->getFunction("set_flag"), args); |
363 | 362 | } |
364 | 363 |
|
365 | | - inline void gen_update_flags(iss::arch_if::operations op, Value* oper1, Value* oper2) { |
366 | | - std::vector<Value*> args{ |
367 | | - core_ptr, ConstantInt::get(::iss::llvm::getContext(), APInt(16, op)), |
368 | | - oper1->getType()->getScalarSizeInBits() == 64 ? oper1 : builder.CreateZExt(oper1, IntegerType::get(mod->getContext(), 64)), |
369 | | - oper2->getType()->getScalarSizeInBits() == 64 ? oper2 : builder.CreateZExt(oper2, IntegerType::get(mod->getContext(), 64))}; |
370 | | - builder.CreateCall(mod->getFunction("update_flags"), args); |
371 | | - } |
372 | | - |
373 | 364 | inline Value* gen_read_mem(mem_type_e type, uint64_t addr, uint32_t length, const char* nm = "") { |
374 | 365 | return gen_read_mem(type, gen_const(64, addr), length, nm); |
375 | 366 | } |
@@ -551,7 +542,7 @@ template <typename ARCH> class vm_base : public debugger_if, public vm_if { |
551 | 542 | unsigned cluster_id = 0; |
552 | 543 | uint8_t* regs_base_ptr; |
553 | 544 | sync_type sync_exec{sync_type::NO_SYNC}; |
554 | | - absl::flat_hash_map<uint64_t, translation_block> func_map; |
| 545 | + std::unordered_map<uint64_t, translation_block> func_map; |
555 | 546 | IRBuilder<> builder{iss::llvm::getContext()}; |
556 | 547 | // non-owning pointers |
557 | 548 | Module* mod{nullptr}; |
|
0 commit comments