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.h

Issue 1418853005: Subzero: Refactor some common TargetLowering initializations. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes 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/IceGlobalContext.cpp ('k') | src/IceTargetLowering.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.h - Lowering interface -----*- C++ -*-===// 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===//
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 }; 129 };
130 130
131 class TargetLowering { 131 class TargetLowering {
132 TargetLowering() = delete; 132 TargetLowering() = delete;
133 TargetLowering(const TargetLowering &) = delete; 133 TargetLowering(const TargetLowering &) = delete;
134 TargetLowering &operator=(const TargetLowering &) = delete; 134 TargetLowering &operator=(const TargetLowering &) = delete;
135 135
136 public: 136 public:
137 // TODO(jvoung): return a unique_ptr like the other factory functions. 137 // TODO(jvoung): return a unique_ptr like the other factory functions.
138 static TargetLowering *createLowering(TargetArch Target, Cfg *Func); 138 static TargetLowering *createLowering(TargetArch Target, Cfg *Func);
139 static void staticInit(TargetArch Target);
140 // Each target must define a public static method:
141 // static void staticInit();
139 static std::unique_ptr<Assembler> createAssembler(TargetArch Target, 142 static std::unique_ptr<Assembler> createAssembler(TargetArch Target,
140 Cfg *Func); 143 Cfg *Func);
141 void translate() { 144 void translate() {
142 switch (Ctx->getFlags().getOptLevel()) { 145 switch (Ctx->getFlags().getOptLevel()) {
143 case Opt_m1: 146 case Opt_m1:
144 translateOm1(); 147 translateOm1();
145 break; 148 break;
146 case Opt_0: 149 case Opt_0:
147 translateO0(); 150 translateO0();
148 break; 151 break;
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 virtual void lower() {} 477 virtual void lower() {}
475 478
476 protected: 479 protected:
477 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 480 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
478 GlobalContext *Ctx; 481 GlobalContext *Ctx;
479 }; 482 };
480 483
481 } // end of namespace Ice 484 } // end of namespace Ice
482 485
483 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 486 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698