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

Side by Side Diff: src/IceInst.cpp

Issue 2116213002: Subzero: Allow deeper levels of variable splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 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/IceCfg.cpp ('k') | src/IceOperand.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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 1087
1088 bool checkForRedundantAssign(const Variable *Dest, const Operand *Source) { 1088 bool checkForRedundantAssign(const Variable *Dest, const Operand *Source) {
1089 const auto *SrcVar = llvm::dyn_cast<const Variable>(Source); 1089 const auto *SrcVar = llvm::dyn_cast<const Variable>(Source);
1090 if (!SrcVar) 1090 if (!SrcVar)
1091 return false; 1091 return false;
1092 if (Dest->hasReg() && Dest->getRegNum() == SrcVar->getRegNum()) { 1092 if (Dest->hasReg() && Dest->getRegNum() == SrcVar->getRegNum()) {
1093 // TODO: On x86-64, instructions like "mov eax, eax" are used to clear the 1093 // TODO: On x86-64, instructions like "mov eax, eax" are used to clear the
1094 // upper 32 bits of rax. We need to recognize and preserve these. 1094 // upper 32 bits of rax. We need to recognize and preserve these.
1095 return true; 1095 return true;
1096 } 1096 }
1097 if (!Dest->hasReg() && !SrcVar->hasReg() && 1097 if (!Dest->hasReg() && !SrcVar->hasReg()) {
1098 Dest->getStackOffset() == SrcVar->getStackOffset()) 1098 if (!Dest->hasStackOffset() || !SrcVar->hasStackOffset()) {
1099 return false;
1100 }
1101 if (Dest->getStackOffset() != SrcVar->getStackOffset()) {
1102 return false;
1103 }
1099 return true; 1104 return true;
1105 }
1100 return false; 1106 return false;
1101 } 1107 }
1102 1108
1103 } // end of namespace Ice 1109 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698