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

Side by Side Diff: src/IceInstARM32.cpp

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/IceInstARM32.h ('k') | src/IceInstX86Base.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/IceInstARM32.cpp - ARM32 instruction implementation ----===// 1 //===- subzero/src/IceInstARM32.cpp - ARM32 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 if (getTargetTrue() == NextNode) { 270 if (getTargetTrue() == NextNode) {
271 assert(Predicate != CondARM32::AL); 271 assert(Predicate != CondARM32::AL);
272 setPredicate(getOppositeCondition(getPredicate())); 272 setPredicate(getOppositeCondition(getPredicate()));
273 TargetTrue = getTargetFalse(); 273 TargetTrue = getTargetFalse();
274 TargetFalse = nullptr; 274 TargetFalse = nullptr;
275 return true; 275 return true;
276 } 276 }
277 return false; 277 return false;
278 } 278 }
279 279
280 bool InstARM32Br::repointEdge(CfgNode *OldNode, CfgNode *NewNode) { 280 bool InstARM32Br::repointEdges(CfgNode *OldNode, CfgNode *NewNode) {
281 bool Found = false;
281 if (TargetFalse == OldNode) { 282 if (TargetFalse == OldNode) {
282 TargetFalse = NewNode; 283 TargetFalse = NewNode;
283 return true; 284 Found = true;
284 } else if (TargetTrue == OldNode) { 285 }
286 if (TargetTrue == OldNode) {
285 TargetTrue = NewNode; 287 TargetTrue = NewNode;
286 return true; 288 Found = true;
287 } 289 }
288 return false; 290 return Found;
289 } 291 }
290 292
291 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget) 293 InstARM32Call::InstARM32Call(Cfg *Func, Variable *Dest, Operand *CallTarget)
292 : InstARM32(Func, InstARM32::Call, 1, Dest) { 294 : InstARM32(Func, InstARM32::Call, 1, Dest) {
293 HasSideEffects = true; 295 HasSideEffects = true;
294 addSource(CallTarget); 296 addSource(CallTarget);
295 } 297 }
296 298
297 InstARM32Label::InstARM32Label(Cfg *Func, TargetARM32 *Target) 299 InstARM32Label::InstARM32Label(Cfg *Func, TargetARM32 *Target)
298 : InstARM32(Func, InstARM32::Label, 0, nullptr), 300 : InstARM32(Func, InstARM32::Label, 0, nullptr),
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 if (getShiftOp() != kNoShift) { 933 if (getShiftOp() != kNoShift) {
932 Str << ", " << InstARM32ShiftAttributes[getShiftOp()].EmitString << " "; 934 Str << ", " << InstARM32ShiftAttributes[getShiftOp()].EmitString << " ";
933 if (Func) 935 if (Func)
934 getShiftAmt()->dump(Func); 936 getShiftAmt()->dump(Func);
935 else 937 else
936 getShiftAmt()->dump(Str); 938 getShiftAmt()->dump(Str);
937 } 939 }
938 } 940 }
939 941
940 } // end of namespace Ice 942 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstARM32.h ('k') | src/IceInstX86Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698