llvm.org GIT mirror llvm / 6fbbd58
[llvm-mca] Improve debugging (NFC) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350661 91177308-0d34-0410-b5e6-96231b3b80d8 Evandro Menezes 1 year, 10 months ago
3 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
2727 #include
2828
2929 namespace llvm {
30
3031 namespace mca {
3132
3233 constexpr int UNKNOWN_CYCLES = -512;
346347 InstrDesc() = default;
347348 InstrDesc(const InstrDesc &Other) = delete;
348349 InstrDesc &operator=(const InstrDesc &Other) = delete;
350
351 #ifndef NDEBUG
352 // Original instruction name for debugging purposes.
353 StringRef Name;
354 #endif
349355 };
350356
351357 /// Base class for instructions consumed by the simulation pipeline.
168168 // Second, is the specific sub-resource ID.
169169 ResourceRef ResourceManager::selectPipe(uint64_t ResourceID) {
170170 unsigned Index = getResourceStateIndex(ResourceID);
171 assert(Index < Resources.size() && "Invalid resource use!");
171172 ResourceState &RS = *Resources[Index];
172173 assert(RS.isReady() && "No available units to select!");
173174
557557 populateWrites(*ID, MCI, SchedClassID);
558558 populateReads(*ID, MCI, SchedClassID);
559559
560 #ifndef NDEBUG
561 ID->Name = MCII.getName(Opcode);
562 #endif
560563 LLVM_DEBUG(dbgs() << "\t\tMaxLatency=" << ID->MaxLatency << '\n');
561564 LLVM_DEBUG(dbgs() << "\t\tNumMicroOps=" << ID->NumMicroOps << '\n');
562565