Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: include/llvm/Bitcode/NaCl/NaClBitcodeAnalyzer.h

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 //===-- NaClBitcodeAnalyzer.h - Bitcode Analyzer --------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 // Analytical information about a bitcode file. Intended as an aid to developers
9 // of bitcode reading and writing software. It produces a summary of the bitcode
10 // file that shows various statistics about the contents of the file. By default
11 // this information is detailed and contains information about individual
12 // bitcode blocks and the functions in the module. The tool is also able to
13 // print a bitcode file in a straight forward text format that shows the
14 // containment and relationships of the information in the bitcode file (-dump
15 // option).
16 //
17 //===----------------------------------------------------------------------===//
18
19 #ifndef NACL_BITCODE_ANALYZER_H
20 #define NACL_BITCODE_ANALYZER_H
21
22 #include <memory>
23
24 namespace llvm {
25
26 class MemoryBuffer;
27 class StringRef;
28 class raw_ostream;
29
30 // Analysis options. See the command-line documentation in pnacl-bcanalyzer
31 // for a description.
32 struct AnalysisDumpOptions {
33 AnalysisDumpOptions()
34 : DumpRecords(false), DumpDetails(false), OpsPerLine(0)
35 {}
36
37 // When true, dump the records. When false, print out distribution
38 // statistics.
39 bool DumpRecords;
40
41 // When true, print out abbreviations, abbreviation ID's, and
42 // other (non-record specific) details when dumping records.
43 bool DumpDetails;
44
45 // The number of record operands to be dumped per text line.
46 unsigned OpsPerLine;
47
48 // When true, prints block statistics based on block ID rather than
49 // size. When false, prints block statistics base on percentage of
50 // file.
51 bool OrderBlocksByID;
52 };
53
54 /// Run analysis on the given file. Output goes to OS.
55 int AnalyzeBitcodeInFile(const StringRef &InputFilename, raw_ostream &OS,
56 const AnalysisDumpOptions &DumpOptions);
57
58 /// Run analysis on a memory buffer with bitcode. Output goes to
59 /// OS. The buffer is owned by the caller.
60 int AnalyzeBitcodeInBuffer(const std::unique_ptr<MemoryBuffer> &Buf,
61 raw_ostream &OS,
62 const AnalysisDumpOptions &DumpOptions);
63
64 } // namespace llvm
65
66 #endif
OLDNEW
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClBitcodeAbbrevDist.h ('k') | include/llvm/Bitcode/NaCl/NaClBitcodeBitsAndAbbrevsDist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698