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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 /// predecessor and successor edges, in the form of CfgNode::InEdges[] and | 178 /// predecessor and successor edges, in the form of CfgNode::InEdges[] and |
179 /// CfgNode::OutEdges[]. | 179 /// CfgNode::OutEdges[]. |
180 void computeInOutEdges(); | 180 void computeInOutEdges(); |
181 void renumberInstructions(); | 181 void renumberInstructions(); |
182 void placePhiLoads(); | 182 void placePhiLoads(); |
183 void placePhiStores(); | 183 void placePhiStores(); |
184 void deletePhis(); | 184 void deletePhis(); |
185 void advancedPhiLowering(); | 185 void advancedPhiLowering(); |
186 void reorderNodes(); | 186 void reorderNodes(); |
187 void shuffleNodes(); | 187 void shuffleNodes(); |
188 void sortAllocas(CfgVector<Inst *> &Allocas, InstList &Insts, | 188 |
189 bool IsKnownFrameOffset); | 189 enum AllocaBaseVariableType { |
190 /// Merge all the fixed-size allocas in the entry block. | 190 BVT_StackPointer, |
191 void processAllocas(); | 191 BVT_FramePointer, |
| 192 BVT_UserPointer |
| 193 }; |
| 194 void sortAndCombineAllocas(CfgVector<Inst *> &Allocas, |
| 195 uint32_t CombinedAlignment, InstList &Insts, |
| 196 AllocaBaseVariableType BaseVariableType); |
| 197 /// Scan allocas to determine whether we need to use a frame pointer. |
| 198 /// If SortAndCombine == true, merge all the fixed-size allocas in the |
| 199 /// entry block and emit stack or frame pointer-relative addressing. |
| 200 void processAllocas(bool SortAndCombine); |
192 void doAddressOpt(); | 201 void doAddressOpt(); |
193 void doArgLowering(); | 202 void doArgLowering(); |
194 void doNopInsertion(); | 203 void doNopInsertion(); |
195 void genCode(); | 204 void genCode(); |
196 void genFrame(); | 205 void genFrame(); |
197 void computeLoopNestDepth(); | 206 void computeLoopNestDepth(); |
198 void livenessLightweight(); | 207 void livenessLightweight(); |
199 void liveness(LivenessMode Mode); | 208 void liveness(LivenessMode Mode); |
200 bool validateLiveness() const; | 209 bool validateLiveness() const; |
201 void contractEmptyNodes(); | 210 void contractEmptyNodes(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 301 |
293 public: | 302 public: |
294 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } | 303 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } |
295 }; | 304 }; |
296 | 305 |
297 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); | 306 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); |
298 | 307 |
299 } // end of namespace Ice | 308 } // end of namespace Ice |
300 | 309 |
301 #endif // SUBZERO_SRC_ICECFG_H | 310 #endif // SUBZERO_SRC_ICECFG_H |
OLD | NEW |