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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 1455033005: Subzero. Adds a pass for target-specific helper call generation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 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/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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 Cfg *Func) { 130 Cfg *Func) {
131 #define SUBZERO_TARGET(X) \ 131 #define SUBZERO_TARGET(X) \
132 if (Target == Target_##X) \ 132 if (Target == Target_##X) \
133 return std::unique_ptr<Assembler>(new X::Assembler##X()); 133 return std::unique_ptr<Assembler>(new X::Assembler##X());
134 #include "llvm/Config/SZTargets.def" 134 #include "llvm/Config/SZTargets.def"
135 135
136 Func->setError("Unsupported target assembler"); 136 Func->setError("Unsupported target assembler");
137 return nullptr; 137 return nullptr;
138 } 138 }
139 139
140 void TargetLowering::genTargetHelperCalls() {
141 for (CfgNode *Node : Func->getNodes()) {
142 Context.init(Node);
143 while (!Context.atEnd()) {
144 PostIncrLoweringContext _(Context);
145 genTargetHelperCallFor(Context.getCur());
146 }
147 }
148 }
149
140 void TargetLowering::doAddressOpt() { 150 void TargetLowering::doAddressOpt() {
141 if (llvm::isa<InstLoad>(*Context.getCur())) 151 if (llvm::isa<InstLoad>(*Context.getCur()))
142 doAddressOptLoad(); 152 doAddressOptLoad();
143 else if (llvm::isa<InstStore>(*Context.getCur())) 153 else if (llvm::isa<InstStore>(*Context.getCur()))
144 doAddressOptStore(); 154 doAddressOptStore();
145 Context.advanceCur(); 155 Context.advanceCur();
146 Context.advanceNext(); 156 Context.advanceNext();
147 } 157 }
148 158
149 void TargetLowering::doNopInsertion(RandomNumberGenerator &RNG) { 159 void TargetLowering::doNopInsertion(RandomNumberGenerator &RNG) {
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 if (Target == Target_##X) \ 664 if (Target == Target_##X) \
655 return TargetHeader##X::create(Ctx); 665 return TargetHeader##X::create(Ctx);
656 #include "llvm/Config/SZTargets.def" 666 #include "llvm/Config/SZTargets.def"
657 667
658 llvm::report_fatal_error("Unsupported target header lowering"); 668 llvm::report_fatal_error("Unsupported target header lowering");
659 } 669 }
660 670
661 TargetHeaderLowering::~TargetHeaderLowering() = default; 671 TargetHeaderLowering::~TargetHeaderLowering() = default;
662 672
663 } // end of namespace Ice 673 } // 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