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

Side by Side Diff: src/IceCfgNode.cpp

Issue 1315193020: Fix warnings produced by g++ on Windows. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 3 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/IceAssemblerX86Base.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/IceCfgNode.cpp - Basic block (node) implementation -----===// 1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // Repoint Pred's out-edge. 233 // Repoint Pred's out-edge.
234 bool Found = false; 234 bool Found = false;
235 for (CfgNode *&I : Pred->OutEdges) { 235 for (CfgNode *&I : Pred->OutEdges) {
236 if (I == this) { 236 if (I == this) {
237 I = NewNode; 237 I = NewNode;
238 NewNode->InEdges.push_back(Pred); 238 NewNode->InEdges.push_back(Pred);
239 Found = true; 239 Found = true;
240 break; 240 break;
241 } 241 }
242 } 242 }
243 assert(Found); 243 assert(Found);
ascull 2015/09/08 21:16:47 Does this need a `(void)Found` too? Seems to be th
Jim Stichnoth 2015/09/08 21:28:11 Oops, done. I opted to repeat the void-cast at ea
244 // Repoint this node's in-edge. 244 // Repoint this node's in-edge.
245 Found = false; 245 Found = false;
246 for (CfgNode *&I : InEdges) { 246 for (CfgNode *&I : InEdges) {
247 if (I == Pred) { 247 if (I == Pred) {
248 I = NewNode; 248 I = NewNode;
249 NewNode->OutEdges.push_back(this); 249 NewNode->OutEdges.push_back(this);
250 Found = true; 250 Found = true;
251 break; 251 break;
252 } 252 }
253 } 253 }
254 assert(Found); 254 assert(Found);
255 (void)Found;
255 // Repoint all suitable branch instructions' target and return. 256 // Repoint all suitable branch instructions' target and return.
256 Found = false; 257 Found = false;
257 for (Inst &I : Pred->getInsts()) 258 for (Inst &I : Pred->getInsts())
258 if (!I.isDeleted() && I.repointEdges(this, NewNode)) 259 if (!I.isDeleted() && I.repointEdges(this, NewNode))
259 Found = true; 260 Found = true;
260 assert(Found); 261 assert(Found);
262 (void)Found;
261 return NewNode; 263 return NewNode;
262 } 264 }
263 265
264 namespace { 266 namespace {
265 267
266 // Helper function used by advancedPhiLowering(). 268 // Helper function used by advancedPhiLowering().
267 bool sameVarOrReg(const Variable *Var, const Operand *Opnd) { 269 bool sameVarOrReg(const Variable *Var, const Operand *Opnd) {
268 if (Var == Opnd) 270 if (Var == Opnd)
269 return true; 271 return true;
270 if (const auto Var2 = llvm::dyn_cast<Variable>(Opnd)) { 272 if (const auto Var2 = llvm::dyn_cast<Variable>(Opnd)) {
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 InstIntrinsicCall *Inst = InstIntrinsicCall::create( 1282 InstIntrinsicCall *Inst = InstIntrinsicCall::create(
1281 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info); 1283 Func, 5, Func->makeVariable(IceType_i64), RMWI64Name, Info->Info);
1282 Inst->addArg(AtomicRMWOp); 1284 Inst->addArg(AtomicRMWOp);
1283 Inst->addArg(Counter); 1285 Inst->addArg(Counter);
1284 Inst->addArg(One); 1286 Inst->addArg(One);
1285 Inst->addArg(OrderAcquireRelease); 1287 Inst->addArg(OrderAcquireRelease);
1286 Insts.push_front(Inst); 1288 Insts.push_front(Inst);
1287 } 1289 }
1288 1290
1289 } // end of namespace Ice 1291 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerX86Base.h ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698