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

Side by Side Diff: src/IceTargetLoweringX8632.cpp

Issue 1411583007: Combine allocas (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix a typo. 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
OLDNEW
1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===//
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 XmmArgs.push_back(Arg); 144 XmmArgs.push_back(Arg);
145 } else { 145 } else {
146 StackArgs.push_back(Arg); 146 StackArgs.push_back(Arg);
147 if (isVectorType(Arg->getType())) { 147 if (isVectorType(Arg->getType())) {
148 ParameterAreaSizeBytes = 148 ParameterAreaSizeBytes =
149 Traits::applyStackAlignment(ParameterAreaSizeBytes); 149 Traits::applyStackAlignment(ParameterAreaSizeBytes);
150 } 150 }
151 Variable *esp = 151 Variable *esp =
152 Func->getTarget()->getPhysicalRegister(Traits::RegisterSet::Reg_esp); 152 Func->getTarget()->getPhysicalRegister(Traits::RegisterSet::Reg_esp);
153 Constant *Loc = Ctx->getConstantInt32(ParameterAreaSizeBytes); 153 Constant *Loc = Ctx->getConstantInt32(ParameterAreaSizeBytes);
154 StackArgLocations.push_back( 154 auto *Mem = Traits::X86OperandMem::create(Func, Ty, esp, Loc);
155 Traits::X86OperandMem::create(Func, Ty, esp, Loc)); 155 // Stack stores for arguments are fixed to esp.
156 Mem->setIgnoreStackAdjust(true);
157 StackArgLocations.push_back(Mem);
156 ParameterAreaSizeBytes += typeWidthInBytesOnStack(Arg->getType()); 158 ParameterAreaSizeBytes += typeWidthInBytesOnStack(Arg->getType());
157 } 159 }
158 } 160 }
159 161
160 // Adjust the parameter area so that the stack is aligned. It is assumed that 162 // Adjust the parameter area so that the stack is aligned. It is assumed that
161 // the stack is already aligned at the start of the calling sequence. 163 // the stack is already aligned at the start of the calling sequence.
162 ParameterAreaSizeBytes = Traits::applyStackAlignment(ParameterAreaSizeBytes); 164 ParameterAreaSizeBytes = Traits::applyStackAlignment(ParameterAreaSizeBytes);
163 165
164 // Subtract the appropriate amount for the argument area. This also takes 166 // Subtract the appropriate amount for the argument area. This also takes
165 // care of setting the stack adjustment during emission. 167 // care of setting the stack adjustment during emission.
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 // case the high-level table has extra entries. 974 // case the high-level table has extra entries.
973 #define X(tag, sizeLog2, align, elts, elty, str) \ 975 #define X(tag, sizeLog2, align, elts, elty, str) \
974 static_assert(_table1_##tag == _table2_##tag, \ 976 static_assert(_table1_##tag == _table2_##tag, \
975 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE"); 977 "Inconsistency between ICETYPEX8632_TABLE and ICETYPE_TABLE");
976 ICETYPE_TABLE 978 ICETYPE_TABLE
977 #undef X 979 #undef X
978 } // end of namespace dummy3 980 } // end of namespace dummy3
979 } // end of anonymous namespace 981 } // end of anonymous namespace
980 982
981 } // end of namespace Ice 983 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698