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

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: Cleanup 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
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 Context.init(Node);
217 Context.setNext(Next);
218 Context.insert(Instr);
219 --Next;
220 assert(&*Next == Instr);
221 Context.setCur(Next);
222 lower();
223 }
224
214 void TargetLowering::lowerOther(const Inst *Instr) { 225 void TargetLowering::lowerOther(const Inst *Instr) {
215 (void)Instr; 226 (void)Instr;
216 Func->setError("Can't lower unsupported instruction type"); 227 Func->setError("Can't lower unsupported instruction type");
217 } 228 }
218 229
219 // Drives register allocation, allowing all physical registers (except 230 // Drives register allocation, allowing all physical registers (except
220 // perhaps for the frame pointer) to be allocated. This set of 231 // perhaps for the frame pointer) to be allocated. This set of
221 // registers could potentially be parameterized if we want to restrict 232 // registers could potentially be parameterized if we want to restrict
222 // registers e.g. for performance testing. 233 // registers e.g. for performance testing.
223 void TargetLowering::regAlloc(RegAllocKind Kind) { 234 void TargetLowering::regAlloc(RegAllocKind Kind) {
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 if (Target == Target_##X) \ 576 if (Target == Target_##X) \
566 return TargetHeader##X::create(Ctx); 577 return TargetHeader##X::create(Ctx);
567 #include "llvm/Config/SZTargets.def" 578 #include "llvm/Config/SZTargets.def"
568 579
569 llvm::report_fatal_error("Unsupported target header lowering"); 580 llvm::report_fatal_error("Unsupported target header lowering");
570 } 581 }
571 582
572 TargetHeaderLowering::~TargetHeaderLowering() = default; 583 TargetHeaderLowering::~TargetHeaderLowering() = default;
573 584
574 } // end of namespace Ice 585 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698