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

Side by Side Diff: src/IceInst.cpp

Issue 1318553003: Compute the loop nest depth of each CfgNode and weight Variables by it. (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/IceInst.h ('k') | src/IceLoopAnalyzer.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/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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 425 }
426 426
427 InstStore::InstStore(Cfg *Func, Operand *Data, Operand *Addr) 427 InstStore::InstStore(Cfg *Func, Operand *Data, Operand *Addr)
428 : InstHighLevel(Func, Inst::Store, 3, nullptr) { 428 : InstHighLevel(Func, Inst::Store, 3, nullptr) {
429 addSource(Data); 429 addSource(Data);
430 addSource(Addr); 430 addSource(Addr);
431 // The 3rd operand is a dummy placeholder for the RMW beacon. 431 // The 3rd operand is a dummy placeholder for the RMW beacon.
432 addSource(Data); 432 addSource(Data);
433 } 433 }
434 434
435 Variable *InstStore::getRmwBeacon() const {
436 return llvm::dyn_cast<Variable>(getSrc(2));
437 }
438
435 void InstStore::setRmwBeacon(Variable *Beacon) { 439 void InstStore::setRmwBeacon(Variable *Beacon) {
436 Dest = llvm::dyn_cast<Variable>(getData()); 440 Dest = llvm::dyn_cast<Variable>(getData());
437 Srcs[2] = Beacon; 441 Srcs[2] = Beacon;
438 } 442 }
439 443
440 InstSwitch::InstSwitch(Cfg *Func, SizeT NumCases, Operand *Source, 444 InstSwitch::InstSwitch(Cfg *Func, SizeT NumCases, Operand *Source,
441 CfgNode *LabelDefault) 445 CfgNode *LabelDefault)
442 : InstHighLevel(Func, Inst::Switch, 1, nullptr), LabelDefault(LabelDefault), 446 : InstHighLevel(Func, Inst::Switch, 1, nullptr), LabelDefault(LabelDefault),
443 NumCases(NumCases) { 447 NumCases(NumCases) {
444 addSource(Source); 448 addSource(Source);
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 // preserve these. 978 // preserve these.
975 return true; 979 return true;
976 } 980 }
977 if (!Dest->hasReg() && !SrcVar->hasReg() && 981 if (!Dest->hasReg() && !SrcVar->hasReg() &&
978 Dest->getStackOffset() == SrcVar->getStackOffset()) 982 Dest->getStackOffset() == SrcVar->getStackOffset())
979 return true; 983 return true;
980 return false; 984 return false;
981 } 985 }
982 986
983 } // end of namespace Ice 987 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.h ('k') | src/IceLoopAnalyzer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698