diff options
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp b/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp index 2f09bc1b0eb..75d85873146 100644 --- a/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp +++ b/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp @@ -175,6 +175,18 @@ bool Instruction::hasAliasingImplicitRegisters() const { return ImplDefRegs.anyCommon(ImplUseRegs); } +bool Instruction::hasAliasingImplicitRegistersThrough( + const Instruction &OtherInstr) const { + return ImplDefRegs.anyCommon(OtherInstr.ImplUseRegs) && + OtherInstr.ImplDefRegs.anyCommon(ImplUseRegs); +} + +bool Instruction::hasAliasingRegistersThrough( + const Instruction &OtherInstr) const { + return AllDefRegs.anyCommon(OtherInstr.AllUseRegs) && + OtherInstr.AllDefRegs.anyCommon(AllUseRegs); +} + bool Instruction::hasTiedRegisters() const { return llvm::any_of( Variables, [](const Variable &Var) { return Var.hasTiedOperands(); }); @@ -215,8 +227,10 @@ void Instruction::dump(const llvm::MCRegisterInfo &RegInfo, } for (const auto &Var : Variables) { Stream << "- Var" << Var.getIndex(); + Stream << " ("; for (auto OperandIndex : Var.TiedOperands) - Stream << " Op" << OperandIndex; + Stream << "Op" << OperandIndex; + Stream << ")"; Stream << "\n"; } if (hasMemoryOperands()) |