| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |