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

Side by Side Diff: src/IceInst.cpp

Issue 1866463002: Subzero: Improve non-MINIMAL string performance. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 8 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/IceCfgNode.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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 llvm_unreachable("Phi operand not found for specified target node"); 445 llvm_unreachable("Phi operand not found for specified target node");
446 } 446 }
447 447
448 // Change "a=phi(...)" to "a_phi=phi(...)" and return a new instruction 448 // Change "a=phi(...)" to "a_phi=phi(...)" and return a new instruction
449 // "a=a_phi". 449 // "a=a_phi".
450 Inst *InstPhi::lower(Cfg *Func) { 450 Inst *InstPhi::lower(Cfg *Func) {
451 Variable *Dest = getDest(); 451 Variable *Dest = getDest();
452 assert(Dest); 452 assert(Dest);
453 Variable *NewSrc = Func->makeVariable(Dest->getType()); 453 Variable *NewSrc = Func->makeVariable(Dest->getType());
454 if (BuildDefs::dump()) 454 if (BuildDefs::dump())
455 NewSrc->setName(Func, Dest->getName(Func) + "_phi"); 455 NewSrc->setName(Func, Dest->getName() + "_phi");
456 if (auto *NewSrc64On32 = llvm::dyn_cast<Variable64On32>(NewSrc)) 456 if (auto *NewSrc64On32 = llvm::dyn_cast<Variable64On32>(NewSrc))
457 NewSrc64On32->initHiLo(Func); 457 NewSrc64On32->initHiLo(Func);
458 this->Dest = NewSrc; 458 this->Dest = NewSrc;
459 return InstAssign::create(Func, Dest, NewSrc); 459 return InstAssign::create(Func, Dest, NewSrc);
460 } 460 }
461 461
462 InstRet::InstRet(Cfg *Func, Operand *RetValue) 462 InstRet::InstRet(Cfg *Func, Operand *RetValue)
463 : InstHighLevel(Func, Ret, RetValue ? 1 : 0, nullptr) { 463 : InstHighLevel(Func, Ret, RetValue ? 1 : 0, nullptr) {
464 if (RetValue) 464 if (RetValue)
465 addSource(RetValue); 465 addSource(RetValue);
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 // upper 32 bits of rax. We need to recognize and preserve these. 1033 // upper 32 bits of rax. We need to recognize and preserve these.
1034 return true; 1034 return true;
1035 } 1035 }
1036 if (!Dest->hasReg() && !SrcVar->hasReg() && 1036 if (!Dest->hasReg() && !SrcVar->hasReg() &&
1037 Dest->getStackOffset() == SrcVar->getStackOffset()) 1037 Dest->getStackOffset() == SrcVar->getStackOffset())
1038 return true; 1038 return true;
1039 return false; 1039 return false;
1040 } 1040 }
1041 1041
1042 } // end of namespace Ice 1042 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698