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

Side by Side Diff: src/IceInst.cpp

Issue 1435363002: Merge fixed alloca stack adjustments into the prolog (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Final code review comments Created 5 years, 1 month 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/IceInst.h ('k') | src/IceInstX8632.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/IceInst.cpp - High-level instruction implementation ----===// 1 //===- subzero/src/IceInst.cpp - High-level instruction implementation ----===//
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // vector. Instead, livenessPostprocess() verifies this after the 211 // vector. Instead, livenessPostprocess() verifies this after the
212 // vector has been sorted. 212 // vector has been sorted.
213 LiveEnd->push_back(std::make_pair(VarNum, InstNumber)); 213 LiveEnd->push_back(std::make_pair(VarNum, InstNumber));
214 } 214 }
215 } 215 }
216 } 216 }
217 } 217 }
218 return true; 218 return true;
219 } 219 }
220 220
221 InstAlloca::InstAlloca(Cfg *Func, Operand *ByteCount, uint32_t AlignInBytes, 221 InstAlloca::InstAlloca(Cfg *Func, Variable *Dest, Operand *ByteCount,
222 Variable *Dest) 222 uint32_t AlignInBytes)
223 : InstHighLevel(Func, Inst::Alloca, 1, Dest), AlignInBytes(AlignInBytes) { 223 : InstHighLevel(Func, Inst::Alloca, 1, Dest), AlignInBytes(AlignInBytes) {
224 // Verify AlignInBytes is 0 or a power of 2. 224 // Verify AlignInBytes is 0 or a power of 2.
225 assert(AlignInBytes == 0 || llvm::isPowerOf2_32(AlignInBytes)); 225 assert(AlignInBytes == 0 || llvm::isPowerOf2_32(AlignInBytes));
226 addSource(ByteCount); 226 addSource(ByteCount);
227 } 227 }
228 228
229 InstArithmetic::InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest, 229 InstArithmetic::InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest,
230 Operand *Source1, Operand *Source2) 230 Operand *Source1, Operand *Source2)
231 : InstHighLevel(Func, Inst::Arithmetic, 2, Dest), Op(Op) { 231 : InstHighLevel(Func, Inst::Arithmetic, 2, Dest), Op(Op) {
232 addSource(Source1); 232 addSource(Source1);
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 // upper 32 bits of rax. We need to recognize and preserve these. 956 // upper 32 bits of rax. We need to recognize and preserve these.
957 return true; 957 return true;
958 } 958 }
959 if (!Dest->hasReg() && !SrcVar->hasReg() && 959 if (!Dest->hasReg() && !SrcVar->hasReg() &&
960 Dest->getStackOffset() == SrcVar->getStackOffset()) 960 Dest->getStackOffset() == SrcVar->getStackOffset())
961 return true; 961 return true;
962 return false; 962 return false;
963 } 963 }
964 964
965 } // end of namespace Ice 965 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.h ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698