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

Unified Diff: include/llvm/Bitcode/NaCl/NaClBitcodeSubblockDist.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClBitcodeSizeDist.h ('k') | include/llvm/Bitcode/NaCl/NaClBitcodeValueDist.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/llvm/Bitcode/NaCl/NaClBitcodeSubblockDist.h
diff --git a/include/llvm/Bitcode/NaCl/NaClBitcodeSubblockDist.h b/include/llvm/Bitcode/NaCl/NaClBitcodeSubblockDist.h
new file mode 100644
index 0000000000000000000000000000000000000000..0ca8de570ace02378afa48f777853f6189dcdb75
--- /dev/null
+++ b/include/llvm/Bitcode/NaCl/NaClBitcodeSubblockDist.h
@@ -0,0 +1,76 @@
+//===-- NaClBitcodeSubblockDist.h -----------------------------------------===//
+// Defines distribution maps for subblock values within an
+// (externally specified) block.
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Defines the notion subblock distribution map. Shows what subblocks appear
+// within a given block (defined externally to the distribution map).
+
+#ifndef LLVM_BITCODE_NACL_NACLBITCODESUBBLOCKDIST_H
+#define LLVM_BITCODE_NACL_NACLBITCODESUBBLOCKDIST_H
+
+#include "llvm/Bitcode/NaCl/NaClBitcodeDist.h"
+
+namespace llvm {
+
+/// Collects the distribution of subblocks within an (externally defined)
+/// block.
+class NaClBitcodeSubblockDistElement : public NaClBitcodeDistElement {
+ NaClBitcodeSubblockDistElement(const NaClBitcodeSubblockDistElement &)
+ LLVM_DELETED_FUNCTION;
+ void operator=(const NaClBitcodeSubblockDistElement&);
+
+public:
+ static bool classof(const NaClBitcodeDistElement *Element) {
+ return Element->getKind() >= RDE_SubblockDist &&
+ Element->getKind() < RDE_SubblockDistLast;
+ }
+
+ NaClBitcodeSubblockDistElement()
+ : NaClBitcodeDistElement(RDE_SubblockDist) {}
+
+ virtual ~NaClBitcodeSubblockDistElement();
+
+ virtual NaClBitcodeDistElement *CreateElement(
+ NaClBitcodeDistValue Value) const;
+
+ virtual const char *GetTitle() const;
+
+ virtual const char *GetValueHeader() const;
+
+ virtual void PrintRowValue(raw_ostream &Stream,
+ NaClBitcodeDistValue Value,
+ const NaClBitcodeDist *Distribution) const;
+};
+
+/// Collects the distribution of subblocks within an (externally
+/// defined) block. Assumes distribution elements are instances of
+/// NaClBitcodeSubblockDistElement.
+class NaClBitcodeSubblockDist : public NaClBitcodeDist {
+ NaClBitcodeSubblockDist(const NaClBitcodeSubblockDist&) LLVM_DELETED_FUNCTION;
+ void operator=(const NaClBitcodeSubblockDist&) LLVM_DELETED_FUNCTION;
+
+public:
+ static bool classof(const NaClBitcodeDist *Dist) {
+ return Dist->getKind() >= RD_SubblockDist &&
+ Dist->getKind() < RD_SubblockDistLast;
+ }
+
+ static NaClBitcodeSubblockDistElement DefaultSentinal;
+
+ NaClBitcodeSubblockDist()
+ : NaClBitcodeDist(BlockStorage, &DefaultSentinal, RD_SubblockDist)
+ {}
+
+ virtual ~NaClBitcodeSubblockDist();
+};
+
+}
+
+#endif
« no previous file with comments | « include/llvm/Bitcode/NaCl/NaClBitcodeSizeDist.h ('k') | include/llvm/Bitcode/NaCl/NaClBitcodeValueDist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698