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

Side by Side Diff: src/IceGlobalContext.h

Issue 1747333002: Subzero: Print constant pool info with --szstats. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | src/IceGlobalContext.cpp » ('j') | src/IceGlobalContext.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===// 1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 CodeStats() { reset(); } 92 CodeStats() { reset(); }
93 void reset() { Stats.fill(0); } 93 void reset() { Stats.fill(0); }
94 void update(CSTag Tag, uint32_t Count = 1) { 94 void update(CSTag Tag, uint32_t Count = 1) {
95 assert(Tag < Stats.size()); 95 assert(Tag < Stats.size());
96 Stats[Tag] += Count; 96 Stats[Tag] += Count;
97 } 97 }
98 void add(const CodeStats &Other) { 98 void add(const CodeStats &Other) {
99 for (uint32_t i = 0; i < Stats.size(); ++i) 99 for (uint32_t i = 0; i < Stats.size(); ++i)
100 Stats[i] += Other.Stats[i]; 100 Stats[i] += Other.Stats[i];
101 } 101 }
102 void dump(const IceString &Name, Ostream &Str); 102 void dump(const IceString &Name, GlobalContext *Ctx);
103 103
104 private: 104 private:
105 std::array<uint32_t, CS_NUM> Stats; 105 std::array<uint32_t, CS_NUM> Stats;
106 }; 106 };
107 107
108 /// TimerList is a vector of TimerStack objects, with extra methods 108 /// TimerList is a vector of TimerStack objects, with extra methods
109 /// to initialize and merge these vectors. 109 /// to initialize and merge these vectors.
110 class TimerList : public std::vector<TimerStack> { 110 class TimerList : public std::vector<TimerStack> {
111 TimerList(const TimerList &) = delete; 111 TimerList(const TimerList &) = delete;
112 TimerList &operator=(const TimerList &) = delete; 112 TimerList &operator=(const TimerList &) = delete;
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } 604 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); }
605 ~OstreamLocker() { Ctx->unlockStr(); } 605 ~OstreamLocker() { Ctx->unlockStr(); }
606 606
607 private: 607 private:
608 GlobalContext *const Ctx; 608 GlobalContext *const Ctx;
609 }; 609 };
610 610
611 } // end of namespace Ice 611 } // end of namespace Ice
612 612
613 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H 613 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H
OLDNEW
« no previous file with comments | « no previous file | src/IceGlobalContext.cpp » ('j') | src/IceGlobalContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698