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

Side by Side Diff: src/IceTargetLowering.cpp

Issue 1397933002: Start incorporating the ARM integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nit and add URL. Created 5 years, 2 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.cpp » ('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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return nullptr; 106 return nullptr;
107 } 107 }
108 108
109 TargetLowering::TargetLowering(Cfg *Func) 109 TargetLowering::TargetLowering(Cfg *Func)
110 : Func(Func), Ctx(Func->getContext()), Context() {} 110 : Func(Func), Ctx(Func->getContext()), Context() {}
111 111
112 std::unique_ptr<Assembler> TargetLowering::createAssembler(TargetArch Target, 112 std::unique_ptr<Assembler> TargetLowering::createAssembler(TargetArch Target,
113 Cfg *Func) { 113 Cfg *Func) {
114 #define SUBZERO_TARGET(X) \ 114 #define SUBZERO_TARGET(X) \
115 if (Target == Target_##X) \ 115 if (Target == Target_##X) \
116 return std::unique_ptr<Assembler>(new X::Assembler##X()); 116 return std::unique_ptr<Assembler>(new X::Assembler##X(Func->getContext()));
117 #include "llvm/Config/SZTargets.def" 117 #include "llvm/Config/SZTargets.def"
118 118
119 Func->setError("Unsupported target assembler"); 119 Func->setError("Unsupported target assembler");
120 return nullptr; 120 return nullptr;
121 } 121 }
122 122
123 void TargetLowering::doAddressOpt() { 123 void TargetLowering::doAddressOpt() {
124 if (llvm::isa<InstLoad>(*Context.getCur())) 124 if (llvm::isa<InstLoad>(*Context.getCur()))
125 doAddressOptLoad(); 125 doAddressOptLoad();
126 else if (llvm::isa<InstStore>(*Context.getCur())) 126 else if (llvm::isa<InstStore>(*Context.getCur()))
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 if (Target == Target_##X) \ 620 if (Target == Target_##X) \
621 return TargetHeader##X::create(Ctx); 621 return TargetHeader##X::create(Ctx);
622 #include "llvm/Config/SZTargets.def" 622 #include "llvm/Config/SZTargets.def"
623 623
624 llvm::report_fatal_error("Unsupported target header lowering"); 624 llvm::report_fatal_error("Unsupported target header lowering");
625 } 625 }
626 626
627 TargetHeaderLowering::~TargetHeaderLowering() = default; 627 TargetHeaderLowering::~TargetHeaderLowering() = default;
628 628
629 } // end of namespace Ice 629 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698