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

Side by Side Diff: src/IceCfg.h

Issue 1837663002: Initial Subzero WASM prototype. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review feedback and merging master Created 4 years, 8 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 | « src/IceBuildDefs.h ('k') | src/IceCfg.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- C++ -*-===// 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 /// Deallocate data that was allocated via allocate<T>(). 249 /// Deallocate data that was allocated via allocate<T>().
250 template <typename T> void deallocate(T *Object) { 250 template <typename T> void deallocate(T *Object) {
251 Allocator->Deallocate(Object); 251 Allocator->Deallocate(Object);
252 } 252 }
253 253
254 /// Deallocate data that was allocated via allocateArrayOf<T>(). 254 /// Deallocate data that was allocated via allocateArrayOf<T>().
255 template <typename T> void deallocateArrayOf(T *Array) { 255 template <typename T> void deallocateArrayOf(T *Array) {
256 Allocator->Deallocate(Array); 256 Allocator->Deallocate(Array);
257 } 257 }
258 258
259 /// Update Phi labels with InEdges.
260 ///
261 /// The WASM translator cannot always determine the right incoming edge for a
262 /// value due to the CFG being built incrementally. The fixPhiNodes pass fills
263 /// in the correct information once everything is known.
264 void fixPhiNodes();
265
259 private: 266 private:
260 friend class CfgAllocatorTraits; // for Allocator access. 267 friend class CfgAllocatorTraits; // for Allocator access.
261 268
262 Cfg(GlobalContext *Ctx, uint32_t SequenceNumber); 269 Cfg(GlobalContext *Ctx, uint32_t SequenceNumber);
263 270
264 /// Adds a call to the ProfileSummary runtime function as the first 271 /// Adds a call to the ProfileSummary runtime function as the first
265 /// instruction in this CFG's entry block. 272 /// instruction in this CFG's entry block.
266 void addCallToProfileSummary(); 273 void addCallToProfileSummary();
267 274
268 /// Iterates over the basic blocks in this CFG, adding profiling code to each 275 /// Iterates over the basic blocks in this CFG, adding profiling code to each
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 using OwnerType = Cfg; 351 using OwnerType = Cfg;
345 static StringPool *getStrings(const OwnerType *PoolOwner) { 352 static StringPool *getStrings(const OwnerType *PoolOwner) {
346 return PoolOwner->getVarStrings(); 353 return PoolOwner->getVarStrings();
347 } 354 }
348 }; 355 };
349 using VariableString = StringID<VariableStringPoolTraits>; 356 using VariableString = StringID<VariableStringPoolTraits>;
350 357
351 } // end of namespace Ice 358 } // end of namespace Ice
352 359
353 #endif // SUBZERO_SRC_ICECFG_H 360 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « src/IceBuildDefs.h ('k') | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698