Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions llvm/include/llvm/MCA/Instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,9 @@ class Instruction : public InstructionBase {
// True if this instruction has been optimized at register renaming stage.
bool IsEliminated;

// Client-dependent identifier for this instruction.
std::optional<uint64_t> Identifier;

public:
Instruction(const InstrDesc &D, const unsigned Opcode)
: InstructionBase(D, Opcode), Stage(IS_INVALID),
Expand Down Expand Up @@ -690,6 +693,9 @@ class Instruction : public InstructionBase {
bool isRetired() const { return Stage == IS_RETIRED; }
bool isEliminated() const { return IsEliminated; }

std::optional<uint64_t> getIdentifier() const { return Identifier; }
void setIdentifier(uint64_t Id) { Identifier = Id; }

// Forces a transition from state IS_DISPATCHED to state IS_EXECUTED.
void forceExecuted();
void setEliminated() { IsEliminated = true; }
Expand Down