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

Side by Side Diff: src/IceInstX86BaseImpl.h

Issue 1234803007: Introduction of improved switch lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Safer check for 0 size type Created 5 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/IceInstX86Base.h ('k') | src/IceRegistersX8632.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/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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 assert(Condition != InstX86Base<Machine>::Traits::Cond::Br_None); 145 assert(Condition != InstX86Base<Machine>::Traits::Cond::Br_None);
146 Condition = this->getOppositeCondition(Condition); 146 Condition = this->getOppositeCondition(Condition);
147 TargetTrue = getTargetFalse(); 147 TargetTrue = getTargetFalse();
148 TargetFalse = nullptr; 148 TargetFalse = nullptr;
149 return true; 149 return true;
150 } 150 }
151 return false; 151 return false;
152 } 152 }
153 153
154 template <class Machine> 154 template <class Machine>
155 bool InstX86Br<Machine>::repointEdge(CfgNode *OldNode, CfgNode *NewNode) { 155 bool InstX86Br<Machine>::repointEdges(CfgNode *OldNode, CfgNode *NewNode) {
156 bool Found = false;
156 if (TargetFalse == OldNode) { 157 if (TargetFalse == OldNode) {
157 TargetFalse = NewNode; 158 TargetFalse = NewNode;
158 return true; 159 Found = true;
159 } else if (TargetTrue == OldNode) { 160 }
161 if (TargetTrue == OldNode) {
160 TargetTrue = NewNode; 162 TargetTrue = NewNode;
161 return true; 163 Found = true;
162 } 164 }
163 return false; 165 return Found;
164 } 166 }
165 167
166 template <class Machine> 168 template <class Machine>
167 InstX86Jmp<Machine>::InstX86Jmp(Cfg *Func, Operand *Target) 169 InstX86Jmp<Machine>::InstX86Jmp(Cfg *Func, Operand *Target)
168 : InstX86Base<Machine>(Func, InstX86Base<Machine>::Jmp, 1, nullptr) { 170 : InstX86Base<Machine>(Func, InstX86Base<Machine>::Jmp, 1, nullptr) {
169 this->addSource(Target); 171 this->addSource(Target);
170 } 172 }
171 173
172 template <class Machine> 174 template <class Machine>
173 InstX86Call<Machine>::InstX86Call(Cfg *Func, Variable *Dest, 175 InstX86Call<Machine>::InstX86Call(Cfg *Func, Variable *Dest,
(...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after
3153 Type Ty = this->getSrc(0)->getType(); 3155 Type Ty = this->getSrc(0)->getType();
3154 Str << "xchg." << Ty << " "; 3156 Str << "xchg." << Ty << " ";
3155 this->dumpSources(Func); 3157 this->dumpSources(Func);
3156 } 3158 }
3157 3159
3158 } // end of namespace X86Internal 3160 } // end of namespace X86Internal
3159 3161
3160 } // end of namespace Ice 3162 } // end of namespace Ice
3161 3163
3162 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H 3164 #endif // SUBZERO_SRC_ICEINSTX86BASEIMPL_H
OLDNEW
« no previous file with comments | « src/IceInstX86Base.h ('k') | src/IceRegistersX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698