diff options
author | Adam Nemet <anemet@apple.com> | 2017-07-27 16:54:13 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2017-07-27 16:54:13 +0000 |
commit | 6374331a8c55353e5a08f757176c8cca30dabafa (patch) | |
tree | 83a41ed7961a92a7b03678c051ca1104a834ef68 | |
parent | d256538b3a3c96e96d112b02a87ab380d61ef96f (diff) | |
download | bcm5719-llvm-6374331a8c55353e5a08f757176c8cca30dabafa.tar.gz bcm5719-llvm-6374331a8c55353e5a08f757176c8cca30dabafa.zip |
[OptRemark] Allow streaming of 64-bit integers
llvm-svn: 309293
-rw-r--r-- | llvm/include/llvm/IR/DiagnosticInfo.h | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/DiagnosticInfo.cpp | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/llvm/include/llvm/IR/DiagnosticInfo.h b/llvm/include/llvm/IR/DiagnosticInfo.h index 15d33257711..c0bfe681e05 100644 --- a/llvm/include/llvm/IR/DiagnosticInfo.h +++ b/llvm/include/llvm/IR/DiagnosticInfo.h @@ -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") {} }; diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index b9a1010e46f..63c839fcb0b 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -963,7 +963,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { 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); } diff --git a/llvm/lib/IR/DiagnosticInfo.cpp b/llvm/lib/IR/DiagnosticInfo.cpp index 5129d6b9b00..6feeb2911e3 100644 --- a/llvm/lib/IR/DiagnosticInfo.cpp +++ b/llvm/lib/IR/DiagnosticInfo.cpp @@ -221,9 +221,15 @@ DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, const Type *T) 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) |