diff options
author | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2018-07-23 15:08:35 +0000 |
---|---|---|
committer | Jonas Paulsson <paulsson@linux.vnet.ibm.com> | 2018-07-23 15:08:35 +0000 |
commit | 59c94bec0d32ea62027f9d2adbc7cb8135bd2fbc (patch) | |
tree | 4074b937f659ada8f1055e00f0be6f39f3528762 | |
parent | 26037539e432de43fe52d0ecfd6c36852f773c3d (diff) | |
download | bcm5719-llvm-59c94bec0d32ea62027f9d2adbc7cb8135bd2fbc.tar.gz bcm5719-llvm-59c94bec0d32ea62027f9d2adbc7cb8135bd2fbc.zip |
[SystemZ] Fix dumpSU() method in SystemZHazardRecognizer.
Two minor issues: The new MCD SchedWrite name does not contain "Unit" like
all the others, so a check is needed. Also, print "LSU" instead of "LS".
Review: Ulrich Weigand
llvm-svn: 337700
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp b/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp index 9e8acdaabd9..d300d1d88ab 100644 --- a/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp +++ b/llvm/lib/Target/SystemZ/SystemZHazardRecognizer.cpp @@ -151,7 +151,11 @@ void SystemZHazardRecognizer::dumpSU(SUnit *SU, raw_ostream &OS) const { std::string FU(PRD.Name); // trim e.g. Z13_FXaUnit -> FXa FU = FU.substr(FU.find("_") + 1); - FU.resize(FU.find("Unit")); + size_t Pos = FU.find("Unit"); + if (Pos != std::string::npos) + FU.resize(Pos); + if (FU == "LS") // LSUnit -> LSU + FU = "LSU"; OS << "/" << FU; if (PI->Cycles > 1) |