aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
diff options
context:
space:
mode:
authorDjordje Todorovic <djordje.todorovic@syrmia.com>2020-10-28 07:18:14 -0700
committerDjordje Todorovic <djtodoro@cisco.com>2020-10-28 07:39:08 -0700
commit6384378582b429ff86ea10a7e48b4ab2001b1e4b (patch)
treec72b24e5499438d57f31f5767ad10051ae18a673 /llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
parent5d02ca49a294848b533adf7dc1d1275d125ef587 (diff)
downloadllvm-6384378582b429ff86ea10a7e48b4ab2001b1e4b.zip
llvm-6384378582b429ff86ea10a7e48b4ab2001b1e4b.tar.gz
llvm-6384378582b429ff86ea10a7e48b4ab2001b1e4b.tar.bz2
[NFC][IntrRefLDV] Improve the Value printing
Basically, this just improves the dump of the Value stored within a location. If the defining instruction number is zero, it means it is "live-in". Before the patch: ESI --> bb 0 inst 0 loc ESI After: ESI --> Value{bb: 0, inst: live-in, loc: ESI} This is an NFC. Differential Revision: https://reviews.llvm.org/D90309
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
index e737e95..7d593ec 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -343,9 +343,12 @@ public:
bool operator!=(const ValueIDNum &Other) const { return !(*this == Other); }
std::string asString(const std::string &mlocname) const {
- return Twine("bb ")
- .concat(Twine(BlockNo).concat(Twine(" inst ").concat(
- Twine(InstNo).concat(Twine(" loc ").concat(Twine(mlocname))))))
+ return Twine("Value{bb: ")
+ .concat(Twine(BlockNo).concat(
+ Twine(", inst: ")
+ .concat((InstNo ? Twine(InstNo) : Twine("live-in"))
+ .concat(Twine(", loc: ").concat(Twine(mlocname)))
+ .concat(Twine("}")))))
.str();
}