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 1127963004: Subzero ARM: lowerArguments (GPR), basic legalize(), and lowerRet(i32, i64). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fix warnings, etc Created 5 years, 7 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/IceInstARM32.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 // This file implements the Inst class, primarily the various 10 // This file implements the Inst class, primarily the various
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 } 866 }
867 867
868 void InstTarget::dump(const Cfg *Func) const { 868 void InstTarget::dump(const Cfg *Func) const {
869 if (!ALLOW_DUMP) 869 if (!ALLOW_DUMP)
870 return; 870 return;
871 Ostream &Str = Func->getContext()->getStrDump(); 871 Ostream &Str = Func->getContext()->getStrDump();
872 Str << "[TARGET] "; 872 Str << "[TARGET] ";
873 Inst::dump(Func); 873 Inst::dump(Func);
874 } 874 }
875 875
876 bool checkForRedundantAssign(const Variable *Dest, const Operand *Source) {
877 const auto SrcVar = llvm::dyn_cast<const Variable>(Source);
878 if (!SrcVar)
879 return false;
880 if (Dest->hasReg() && Dest->getRegNum() == SrcVar->getRegNum()) {
881 // TODO: On x86-64, instructions like "mov eax, eax" are used to
882 // clear the upper 32 bits of rax. We need to recognize and
883 // preserve these.
884 return true;
885 }
886 if (!Dest->hasReg() && !SrcVar->hasReg() &&
887 Dest->getStackOffset() == SrcVar->getStackOffset())
888 return true;
889 return false;
890 }
891
876 } // end of namespace Ice 892 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.h ('k') | src/IceInstARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698