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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 680733002: Subzero: Allow delaying Phi lowering until after register allocation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix vector const undef lowering for phis. Created 6 years, 1 month 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 26 matching lines...) Expand all
37 "max-nops-per-instruction", 37 "max-nops-per-instruction",
38 cl::desc("Max number of nops to insert per instruction"), cl::init(1)); 38 cl::desc("Max number of nops to insert per instruction"), cl::init(1));
39 39
40 cl::opt<int> NopProbabilityAsPercentage( 40 cl::opt<int> NopProbabilityAsPercentage(
41 "nop-insertion-percentage", 41 "nop-insertion-percentage",
42 cl::desc("Nop insertion probability as percentage"), cl::init(10)); 42 cl::desc("Nop insertion probability as percentage"), cl::init(10));
43 } // end of anonymous namespace 43 } // end of anonymous namespace
44 44
45 void LoweringContext::init(CfgNode *N) { 45 void LoweringContext::init(CfgNode *N) {
46 Node = N; 46 Node = N;
47 Begin = getNode()->getInsts().begin();
48 Cur = Begin;
49 End = getNode()->getInsts().end(); 47 End = getNode()->getInsts().end();
50 skipDeleted(Cur); 48 rewind();
51 Next = Cur;
52 advanceForward(Next); 49 advanceForward(Next);
53 } 50 }
54 51
52 void LoweringContext::rewind() {
53 Begin = getNode()->getInsts().begin();
54 Cur = Begin;
55 skipDeleted(Cur);
56 Next = Cur;
57 }
58
55 void LoweringContext::insert(Inst *Inst) { 59 void LoweringContext::insert(Inst *Inst) {
56 getNode()->getInsts().insert(Next, Inst); 60 getNode()->getInsts().insert(Next, Inst);
57 LastInserted = Inst; 61 LastInserted = Inst;
58 } 62 }
59 63
60 void LoweringContext::skipDeleted(InstList::iterator &I) const { 64 void LoweringContext::skipDeleted(InstList::iterator &I) const {
61 while (I != End && (*I)->isDeleted()) 65 while (I != End && (*I)->isDeleted())
62 ++I; 66 ++I;
63 } 67 }
64 68
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (Target == Target_ARM64) 253 if (Target == Target_ARM64)
250 return IceTargetGlobalInitARM64::create(Ctx); 254 return IceTargetGlobalInitARM64::create(Ctx);
251 #endif 255 #endif
252 llvm_unreachable("Unsupported target"); 256 llvm_unreachable("Unsupported target");
253 return NULL; 257 return NULL;
254 } 258 }
255 259
256 TargetGlobalInitLowering::~TargetGlobalInitLowering() {} 260 TargetGlobalInitLowering::~TargetGlobalInitLowering() {}
257 261
258 } // end of namespace Ice 262 } // 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