[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Changes in directory llvm/tools/llvm-prof: llvm-prof.cpp updated: 1.34 - 1.35 --- Log message: Initialize variable to null so it has a value in the off chance that a memory buffer couldn't be allocated. --- Diffs of the changes: (+1 -1) llvm-prof.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm-prof/llvm-prof.cpp diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.34 llvm/tools/llvm-prof/llvm-prof.cpp:1.35 --- llvm/tools/llvm-prof/llvm-prof.cpp:1.34 Sun May 6 18:45:49 2007 +++ llvm/tools/llvm-prof/llvm-prof.cpp Mon May 7 13:50:07 2007 @@ -117,7 +117,7 @@ // Read in the bytecode file... std::string ErrorMessage; -Module *M; +Module *M = 0; if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(BytecodeFile, ErrorMessage)) { M = ParseBitcodeFile(Buffer, ErrorMessage); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Changes in directory llvm/tools/llvm-prof: llvm-prof.cpp updated: 1.33 - 1.34 --- Log message: use the new MemoryBuffer interfaces to simplify error reporting in clients. --- Diffs of the changes: (+4 -6) llvm-prof.cpp | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) Index: llvm/tools/llvm-prof/llvm-prof.cpp diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.33 llvm/tools/llvm-prof/llvm-prof.cpp:1.34 --- llvm/tools/llvm-prof/llvm-prof.cpp:1.33 Sun May 6 04:29:57 2007 +++ llvm/tools/llvm-prof/llvm-prof.cpp Sun May 6 18:45:49 2007 @@ -118,13 +118,11 @@ // Read in the bytecode file... std::string ErrorMessage; Module *M; -MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(BytecodeFile[0], -BytecodeFile.size()); -if (Buffer == 0) - ErrorMessage = Error reading file ' + BytecodeFile + '; -else +if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(BytecodeFile, +ErrorMessage)) { M = ParseBitcodeFile(Buffer, ErrorMessage); -delete Buffer; + delete Buffer; +} if (M == 0) { std::cerr argv[0] : BytecodeFile : ErrorMessage \n; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Changes in directory llvm/tools/llvm-prof: llvm-prof.cpp updated: 1.30 - 1.31 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+1 -0) llvm-prof.cpp |1 + 1 files changed, 1 insertion(+) Index: llvm/tools/llvm-prof/llvm-prof.cpp diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.30 llvm/tools/llvm-prof/llvm-prof.cpp:1.31 --- llvm/tools/llvm-prof/llvm-prof.cpp:1.30 Wed Feb 7 15:41:02 2007 +++ llvm/tools/llvm-prof/llvm-prof.cpp Sun Mar 4 18:00:42 2007 @@ -21,6 +21,7 @@ #include llvm/Support/CommandLine.h #include llvm/Support/ManagedStatic.h #include llvm/System/Signals.h +#include algorithm #include iostream #include iomanip #include map ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Changes in directory llvm/tools/llvm-prof: llvm-prof.cpp updated: 1.29 - 1.30 --- Log message: push bytecode decompressor out through APIs. Now the bytecode reader api's look like this: ModuleProvider *getBytecodeModuleProvider( const std::string Filename, /// Name of file to be read BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer, std::string* ErrMsg = 0, /// Optional error message holder BytecodeHandler* H = 0/// Optional handler for reader events ); This is ugly, but allows a client to say: getBytecodeModuleProvider(foo, 0); If they do this, there is no dependency on the compression libraries, saving codesize. --- Diffs of the changes: (+3 -1) llvm-prof.cpp |4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/tools/llvm-prof/llvm-prof.cpp diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.29 llvm/tools/llvm-prof/llvm-prof.cpp:1.30 --- llvm/tools/llvm-prof/llvm-prof.cpp:1.29 Tue Dec 5 19:18:01 2006 +++ llvm/tools/llvm-prof/llvm-prof.cpp Wed Feb 7 15:41:02 2007 @@ -115,7 +115,9 @@ // Read in the bytecode file... std::string ErrorMessage; -Module *M = ParseBytecodeFile(BytecodeFile, ErrorMessage); +Module *M = ParseBytecodeFile(BytecodeFile, + Compressor::decompressToNewBuffer, + ErrorMessage); if (M == 0) { std::cerr argv[0] : BytecodeFile : ErrorMessage \n; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Changes in directory llvm/tools/llvm-prof: llvm-prof.cpp updated: 1.28 - 1.29 --- Log message: make all llvm tools call llvm_shutdown when they exit, static'ify some stuff. With this change, I can now move -stats to print when llvm_shutdown is called. --- Diffs of the changes: (+2 -0) llvm-prof.cpp |2 ++ 1 files changed, 2 insertions(+) Index: llvm/tools/llvm-prof/llvm-prof.cpp diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.28 llvm/tools/llvm-prof/llvm-prof.cpp:1.29 --- llvm/tools/llvm-prof/llvm-prof.cpp:1.28 Wed May 24 14:21:12 2006 +++ llvm/tools/llvm-prof/llvm-prof.cpp Tue Dec 5 19:18:01 2006 @@ -19,6 +19,7 @@ #include llvm/Analysis/ProfileInfoLoader.h #include llvm/Bytecode/Reader.h #include llvm/Support/CommandLine.h +#include llvm/Support/ManagedStatic.h #include llvm/System/Signals.h #include iostream #include iomanip @@ -107,6 +108,7 @@ int main(int argc, char **argv) { + llvm_shutdown_obj X; // Call llvm_shutdown() on exit. try { cl::ParseCommandLineOptions(argc, argv, llvm profile dump decoder\n); sys::PrintStackTraceOnErrorSignal(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Changes in directory llvm/tools/llvm-prof: llvm-prof.cpp updated: 1.27 - 1.28 --- Log message: For PR786: http://llvm.cs.uiuc.edu/PR786 : Minor tweaks in public headers and a few .cpp files so that LLVM can build successfully with -pedantic and projects using LLVM with -pedantic don't get warnings from LLVM. There's still more -pedantic warnings to fix. --- Diffs of the changes: (+1 -1) llvm-prof.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm-prof/llvm-prof.cpp diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.27 llvm/tools/llvm-prof/llvm-prof.cpp:1.28 --- llvm/tools/llvm-prof/llvm-prof.cpp:1.27 Fri Dec 30 03:07:29 2005 +++ llvm/tools/llvm-prof/llvm-prof.cpp Wed May 24 14:21:12 2006 @@ -139,7 +139,7 @@ sort(FunctionCounts.begin(), FunctionCounts.end(), PairSecondSortReverseFunction*()); -unsigned long long TotalExecutions = 0; +uint64_t TotalExecutions = 0; for (unsigned i = 0, e = FunctionCounts.size(); i != e; ++i) TotalExecutions += FunctionCounts[i].second; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits