[llvm] r337700 - [SystemZ] Fix dumpSU() method in SystemZHazardRecognizer.
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 23 08:08:35 PDT 2018
Author: jonpa
Date: Mon Jul 23 08:08:35 2018
New Revision: 337700
URL: http://llvm.org/viewvc/llvm-project?rev=337700&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
Modified: llvm/trunk/lib/Target/SystemZ/SystemZHazardRecognizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZHazardRecognizer.cpp?rev=337700&r1=337699&r2=337700&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZHazardRecognizer.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZHazardRecognizer.cpp Mon Jul 23 08:08:35 2018
@@ -151,7 +151,11 @@ void SystemZHazardRecognizer::dumpSU(SUn
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)
More information about the llvm-commits
mailing list