diff options
Diffstat (limited to 'llvm/lib/CodeGen/TargetSubtargetInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetSubtargetInfo.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/TargetSubtargetInfo.cpp b/llvm/lib/CodeGen/TargetSubtargetInfo.cpp index a72d7ebaed4..0d7940d767c 100644 --- a/llvm/lib/CodeGen/TargetSubtargetInfo.cpp +++ b/llvm/lib/CodeGen/TargetSubtargetInfo.cpp @@ -68,17 +68,15 @@ bool TargetSubtargetInfo::useAA() const { } static std::string createSchedInfoStr(unsigned Latency, - Optional<double> RThroughput) { + Optional<double> RThroughput) { static const char *SchedPrefix = " sched: ["; std::string Comment; raw_string_ostream CS(Comment); - if (Latency > 0 && RThroughput.hasValue()) + if (RThroughput.hasValue()) CS << SchedPrefix << Latency << format(":%2.2f", RThroughput.getValue()) << "]"; - else if (Latency > 0) + else CS << SchedPrefix << Latency << ":?]"; - else if (RThroughput.hasValue()) - CS << SchedPrefix << "?:" << RThroughput.getValue() << "]"; CS.flush(); return Comment; } |