mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
[llvm-mca] Improve debugging (NFC)
llvm-svn: 350661
This commit is contained in:
parent
2dd391bb95
commit
ec2dad0049
@ -28,6 +28,7 @@
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
namespace mca {
|
||||
|
||||
constexpr int UNKNOWN_CYCLES = -512;
|
||||
@ -347,6 +348,11 @@ struct InstrDesc {
|
||||
InstrDesc() = default;
|
||||
InstrDesc(const InstrDesc &Other) = delete;
|
||||
InstrDesc &operator=(const InstrDesc &Other) = delete;
|
||||
|
||||
#ifndef NDEBUG
|
||||
// Original instruction name for debugging purposes.
|
||||
StringRef Name;
|
||||
#endif
|
||||
};
|
||||
|
||||
/// Base class for instructions consumed by the simulation pipeline.
|
||||
|
@ -169,6 +169,7 @@ unsigned ResourceManager::getNumUnits(uint64_t ResourceID) const {
|
||||
// Second, is the specific sub-resource ID.
|
||||
ResourceRef ResourceManager::selectPipe(uint64_t ResourceID) {
|
||||
unsigned Index = getResourceStateIndex(ResourceID);
|
||||
assert(Index < Resources.size() && "Invalid resource use!");
|
||||
ResourceState &RS = *Resources[Index];
|
||||
assert(RS.isReady() && "No available units to select!");
|
||||
|
||||
|
@ -558,6 +558,9 @@ InstrBuilder::createInstrDescImpl(const MCInst &MCI) {
|
||||
populateWrites(*ID, MCI, SchedClassID);
|
||||
populateReads(*ID, MCI, SchedClassID);
|
||||
|
||||
#ifndef NDEBUG
|
||||
ID->Name = MCII.getName(Opcode);
|
||||
#endif
|
||||
LLVM_DEBUG(dbgs() << "\t\tMaxLatency=" << ID->MaxLatency << '\n');
|
||||
LLVM_DEBUG(dbgs() << "\t\tNumMicroOps=" << ID->NumMicroOps << '\n');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user