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

Side by Side Diff: src/IceOperand.cpp

Issue 372113005: Add support for passing and returning vectors in accordance with the x86 calling convention. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Reset AllowOverlap, add comment on lowerCall() strategies, and use X86_MAX_XMM_ARGS where appropria… Created 6 years, 5 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/IceOperand.h ('k') | src/IceTargetLowering.h » ('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/IceOperand.cpp - High-level operand implementation -----===// 1 //===- subzero/src/IceOperand.cpp - High-level operand 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 // This file implements the Operand class and its target-independent 10 // This file implements the Operand class and its target-independent
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 DefInst = Inst; 152 DefInst = Inst;
153 if (Node != DefNode) 153 if (Node != DefNode)
154 DefNode = NULL; 154 DefNode = NULL;
155 } 155 }
156 156
157 void Variable::replaceDefinition(Inst *Inst, const CfgNode *Node) { 157 void Variable::replaceDefinition(Inst *Inst, const CfgNode *Node) {
158 DefInst = NULL; 158 DefInst = NULL;
159 setDefinition(Inst, Node); 159 setDefinition(Inst, Node);
160 } 160 }
161 161
162 void Variable::setIsArg(Cfg *Func) { 162 void Variable::setIsArg(Cfg *Func, bool IsArg) {
163 IsArgument = true; 163 if (IsArg) {
164 if (DefNode == NULL) 164 IsArgument = true;
165 return; 165 if (DefNode == NULL)
166 CfgNode *Entry = Func->getEntryNode(); 166 return;
167 if (DefNode == Entry) 167 CfgNode *Entry = Func->getEntryNode();
168 return; 168 if (DefNode == Entry)
169 DefNode = NULL; 169 return;
170 DefNode = NULL;
171 } else {
172 IsArgument = false;
173 }
170 } 174 }
171 175
172 IceString Variable::getName() const { 176 IceString Variable::getName() const {
173 if (!Name.empty()) 177 if (!Name.empty())
174 return Name; 178 return Name;
175 char buf[30]; 179 char buf[30];
176 snprintf(buf, llvm::array_lengthof(buf), "__%u", getIndex()); 180 snprintf(buf, llvm::array_lengthof(buf), "__%u", getIndex());
177 return buf; 181 return buf;
178 } 182 }
179 183
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 258
255 Ostream &operator<<(Ostream &Str, const RegWeight &W) { 259 Ostream &operator<<(Ostream &Str, const RegWeight &W) {
256 if (W.getWeight() == RegWeight::Inf) 260 if (W.getWeight() == RegWeight::Inf)
257 Str << "Inf"; 261 Str << "Inf";
258 else 262 else
259 Str << W.getWeight(); 263 Str << W.getWeight();
260 return Str; 264 return Str;
261 } 265 }
262 266
263 } // end of namespace Ice 267 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698