Skip to content

Commit f44dd7f

Browse files
committed
[llvm-mca] Add optional identifier field to mca::Instruction
1 parent db782b4 commit f44dd7f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/include/llvm/MCA/Instruction.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,8 @@ class Instruction : public InstructionBase {
643643
// True if this instruction has been optimized at register renaming stage.
644644
bool IsEliminated;
645645

646+
std::optional<uint64_t> Identifier;
647+
646648
public:
647649
Instruction(const InstrDesc &D, const unsigned Opcode)
648650
: InstructionBase(D, Opcode), Stage(IS_INVALID),
@@ -690,6 +692,9 @@ class Instruction : public InstructionBase {
690692
bool isRetired() const { return Stage == IS_RETIRED; }
691693
bool isEliminated() const { return IsEliminated; }
692694

695+
std::optional<uint64_t> getIdentifier() const { return Identifier; }
696+
void setIdentifier(uint64_t Id) { Identifier = Id; }
697+
693698
// Forces a transition from state IS_DISPATCHED to state IS_EXECUTED.
694699
void forceExecuted();
695700
void setEliminated() { IsEliminated = true; }

0 commit comments

Comments
 (0)