[llvm] r309293 - [OptRemark] Allow streaming of 64-bit integers

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 09:54:13 PDT 2017


Author: anemet
Date: Thu Jul 27 09:54:13 2017
New Revision: 309293

URL: http://llvm.org/viewvc/llvm-project?rev=309293&view=rev
Log:
[OptRemark] Allow streaming of 64-bit integers

Modified:
    llvm/trunk/include/llvm/IR/DiagnosticInfo.h
    llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
    llvm/trunk/lib/IR/DiagnosticInfo.cpp

Modified: llvm/trunk/include/llvm/IR/DiagnosticInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DiagnosticInfo.h?rev=309293&r1=309292&r2=309293&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DiagnosticInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DiagnosticInfo.h Thu Jul 27 09:54:13 2017
@@ -420,7 +420,9 @@ public:
     Argument(StringRef Key, const Value *V);
     Argument(StringRef Key, const Type *T);
     Argument(StringRef Key, int N);
+    Argument(StringRef Key, int64_t N);
     Argument(StringRef Key, unsigned N);
+    Argument(StringRef Key, uint64_t N);
     Argument(StringRef Key, bool B) : Key(Key), Val(B ? "true" : "false") {}
   };
 

Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=309293&r1=309292&r2=309293&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original)
+++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Thu Jul 27 09:54:13 2017
@@ -963,7 +963,7 @@ void PEI::calculateFrameObjectOffsets(Ma
 
   MachineOptimizationRemarkAnalysis R(
       DEBUG_TYPE, "StackSize", Fn.getFunction()->getSubprogram(), &Fn.front());
-  R << ore::NV("NumStackBytes", static_cast<unsigned>(StackSize))
+  R << ore::NV("NumStackBytes", StackSize)
     << " stack bytes in function";
   ORE->emit(R);
 }

Modified: llvm/trunk/lib/IR/DiagnosticInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DiagnosticInfo.cpp?rev=309293&r1=309292&r2=309293&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DiagnosticInfo.cpp (original)
+++ llvm/trunk/lib/IR/DiagnosticInfo.cpp Thu Jul 27 09:54:13 2017
@@ -221,9 +221,15 @@ DiagnosticInfoOptimizationBase::Argument
 DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, int N)
     : Key(Key), Val(itostr(N)) {}
 
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, int64_t N)
+    : Key(Key), Val(itostr(N)) {}
+
 DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, unsigned N)
     : Key(Key), Val(utostr(N)) {}
 
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, uint64_t N)
+    : Key(Key), Val(utostr(N)) {}
+
 void DiagnosticInfoOptimizationBase::print(DiagnosticPrinter &DP) const {
   DP << getLocationStr() << ": " << getMsg();
   if (Hotness)




More information about the llvm-commits mailing list