Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 the CFG being build incrementally. The fixPhiNodes pass fills in | |
|
Jim Stichnoth
2016/04/04 23:08:20
built
Jim Stichnoth
2016/04/04 23:08:20
due to the
Eric Holk
2016/04/04 23:16:07
Done.
| |
| 263 /// 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 Loading... | |
| 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 |
| OLD | NEW |