summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2018-10-10 09:12:36 +0000
committerGuillaume Chatelet <gchatelet@google.com>2018-10-10 09:12:36 +0000
commit0c17cbf790cde9ed33b3f225b460194d27b2021a (patch)
tree63351f0af26d0f7d101f34a8ed7e6b79ba8928d9 /llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp
parentf0c286f8fb68e1f9938de601c2a63005f355357e (diff)
downloadbcm5719-llvm-0c17cbf790cde9ed33b3f225b460194d27b2021a.tar.gz
bcm5719-llvm-0c17cbf790cde9ed33b3f225b460194d27b2021a.zip
[llvm-exegesis] Remove unused variable, add more semantic to Instruction.
Reviewers: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D53062 llvm-svn: 344127
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/MCInstrDescView.cpp16
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())
OpenPOWER on IntegriCloud