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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 1253833002: Subzero: Cleanly implement register allocation after phi lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Improve translation-time performance Created 5 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/IceTargetLoweringARM32.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 /// \file 10 /// \file
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 break; 204 break;
205 } 205 }
206 206
207 postLower(); 207 postLower();
208 } 208 }
209 209
210 Context.advanceCur(); 210 Context.advanceCur();
211 Context.advanceNext(); 211 Context.advanceNext();
212 } 212 }
213 213
214 void TargetLowering::lowerInst(CfgNode *Node, InstList::iterator Next,
215 InstHighLevel *Instr) {
216 // TODO(stichnot): Consider modifying the design/implementation to avoid
217 // multiple init() calls when using lowerInst() to lower several instructions
218 // in the same node.
219 Context.init(Node);
220 Context.setNext(Next);
221 Context.insert(Instr);
222 --Next;
223 assert(&*Next == Instr);
224 Context.setCur(Next);
225 lower();
226 }
227
214 void TargetLowering::lowerOther(const Inst *Instr) { 228 void TargetLowering::lowerOther(const Inst *Instr) {
215 (void)Instr; 229 (void)Instr;
216 Func->setError("Can't lower unsupported instruction type"); 230 Func->setError("Can't lower unsupported instruction type");
217 } 231 }
218 232
219 // Drives register allocation, allowing all physical registers (except 233 // Drives register allocation, allowing all physical registers (except
220 // perhaps for the frame pointer) to be allocated. This set of 234 // perhaps for the frame pointer) to be allocated. This set of
221 // registers could potentially be parameterized if we want to restrict 235 // registers could potentially be parameterized if we want to restrict
222 // registers e.g. for performance testing. 236 // registers e.g. for performance testing.
223 void TargetLowering::regAlloc(RegAllocKind Kind) { 237 void TargetLowering::regAlloc(RegAllocKind Kind) {
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 if (Target == Target_##X) \ 579 if (Target == Target_##X) \
566 return TargetHeader##X::create(Ctx); 580 return TargetHeader##X::create(Ctx);
567 #include "llvm/Config/SZTargets.def" 581 #include "llvm/Config/SZTargets.def"
568 582
569 llvm::report_fatal_error("Unsupported target header lowering"); 583 llvm::report_fatal_error("Unsupported target header lowering");
570 } 584 }
571 585
572 TargetHeaderLowering::~TargetHeaderLowering() = default; 586 TargetHeaderLowering::~TargetHeaderLowering() = default;
573 587
574 } // end of namespace Ice 588 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698