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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 413903002: Subzero: Add a peephole to fuse cmpxchg w/ later cmp+branch. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: blank Created 6 years, 4 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/IceTargetLowering.h ('k') | src/IceTargetLoweringX8632.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/IceTargetLowering.cpp - Basic lowering implementation --===// 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering 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 skeleton of the TargetLowering class, 10 // This file implements the skeleton of the TargetLowering class,
(...skipping 20 matching lines...) Expand all
31 skipDeleted(Cur); 31 skipDeleted(Cur);
32 Next = Cur; 32 Next = Cur;
33 advance(Next); 33 advance(Next);
34 } 34 }
35 35
36 void LoweringContext::insert(Inst *Inst) { 36 void LoweringContext::insert(Inst *Inst) {
37 getNode()->getInsts().insert(Next, Inst); 37 getNode()->getInsts().insert(Next, Inst);
38 Inst->updateVars(getNode()); 38 Inst->updateVars(getNode());
39 } 39 }
40 40
41 void LoweringContext::skipDeleted(InstList::iterator &I) { 41 void LoweringContext::skipDeleted(InstList::iterator &I) const {
42 while (I != End && (*I)->isDeleted()) 42 while (I != End && (*I)->isDeleted())
43 ++I; 43 ++I;
44 } 44 }
45 45
46 void LoweringContext::advance(InstList::iterator &I) { 46 void LoweringContext::advance(InstList::iterator &I) const {
47 if (I != End) { 47 if (I != End) {
48 ++I; 48 ++I;
49 skipDeleted(I); 49 skipDeleted(I);
50 } 50 }
51 } 51 }
52 52
53 TargetLowering *TargetLowering::createLowering(TargetArch Target, Cfg *Func) { 53 TargetLowering *TargetLowering::createLowering(TargetArch Target, Cfg *Func) {
54 // These statements can be #ifdef'd to specialize the code generator 54 // These statements can be #ifdef'd to specialize the code generator
55 // to a subset of the available targets. TODO: use CRTP. 55 // to a subset of the available targets. TODO: use CRTP.
56 if (Target == Target_X8632) 56 if (Target == Target_X8632)
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (Target == Target_ARM64) 194 if (Target == Target_ARM64)
195 return IceTargetGlobalInitARM64::create(Ctx); 195 return IceTargetGlobalInitARM64::create(Ctx);
196 #endif 196 #endif
197 llvm_unreachable("Unsupported target"); 197 llvm_unreachable("Unsupported target");
198 return NULL; 198 return NULL;
199 } 199 }
200 200
201 TargetGlobalInitLowering::~TargetGlobalInitLowering() {} 201 TargetGlobalInitLowering::~TargetGlobalInitLowering() {}
202 202
203 } // end of namespace Ice 203 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698