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

Side by Side Diff: src/IceInstX86BaseImpl.h

Issue 1406593003: Optimize 64-bit compares with zero (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Simplify header file Created 5 years, 2 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
OLDNEW
1 //===- subzero/src/IceInstX86BaseImpl.h - Generic X86 instructions -*- C++ -*=// 1 //===- subzero/src/IceInstX86BaseImpl.h - Generic X86 instructions -*- C++ -*=//
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 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 static const typename InstX86Base< 2085 static const typename InstX86Base<
2086 Machine>::Traits::Assembler::GPREmitterAddrOp AddrEmitter = { 2086 Machine>::Traits::Assembler::GPREmitterAddrOp AddrEmitter = {
2087 &InstX86Base<Machine>::Traits::Assembler::test, 2087 &InstX86Base<Machine>::Traits::Assembler::test,
2088 &InstX86Base<Machine>::Traits::Assembler::test}; 2088 &InstX86Base<Machine>::Traits::Assembler::test};
2089 if (const auto SrcVar0 = llvm::dyn_cast<Variable>(Src0)) { 2089 if (const auto SrcVar0 = llvm::dyn_cast<Variable>(Src0)) {
2090 if (SrcVar0->hasReg()) { 2090 if (SrcVar0->hasReg()) {
2091 emitIASRegOpTyGPR<Machine>(Func, Ty, SrcVar0, Src1, RegEmitter); 2091 emitIASRegOpTyGPR<Machine>(Func, Ty, SrcVar0, Src1, RegEmitter);
2092 return; 2092 return;
2093 } 2093 }
2094 } 2094 }
2095 llvm_unreachable("Nothing actually generates this so it's untested");
2096 emitIASAsAddrOpTyGPR<Machine>(Func, Ty, Src0, Src1, AddrEmitter); 2095 emitIASAsAddrOpTyGPR<Machine>(Func, Ty, Src0, Src1, AddrEmitter);
2097 } 2096 }
2098 2097
2099 template <class Machine> 2098 template <class Machine>
2100 void InstX86Test<Machine>::dump(const Cfg *Func) const { 2099 void InstX86Test<Machine>::dump(const Cfg *Func) const {
2101 if (!BuildDefs::dump()) 2100 if (!BuildDefs::dump())
2102 return; 2101 return;
2103 Ostream &Str = Func->getContext()->getStrDump(); 2102 Ostream &Str = Func->getContext()->getStrDump();
2104 Str << "test." << this->getSrc(0)->getType() << " "; 2103 Str << "test." << this->getSrc(0)->getType() << " ";
2105 this->dumpSources(Func); 2104 this->dumpSources(Func);
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
3310 return; 3309 return;
3311 Ostream &Str = Func->getContext()->getStrDump(); 3310 Ostream &Str = Func->getContext()->getStrDump();
3312 Str << "IACA_END"; 3311 Str << "IACA_END";
3313 } 3312 }
3314 3313
3315 } // end of namespace X86Internal 3314 } // end of namespace X86Internal
3316 3315
3317 } // end of namespace Ice 3316 } // end of namespace Ice
3318 3317
3319 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H 3318 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698