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

Side by Side Diff: src/IceTargetLowering.h

Issue 1848303003: Simplify references to command line flags. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 4 years, 8 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/IceRegAlloc.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 llvm_unreachable("Not yet implemented"); \ 44 llvm_unreachable("Not yet implemented"); \
45 abort(); \ 45 abort(); \
46 } \ 46 } \
47 } while (0) 47 } while (0)
48 48
49 // UnimplementedLoweringError is similar in style to UnimplementedError. Given 49 // UnimplementedLoweringError is similar in style to UnimplementedError. Given
50 // a TargetLowering object pointer and an Inst pointer, it adds appropriate 50 // a TargetLowering object pointer and an Inst pointer, it adds appropriate
51 // FakeDef and FakeUse instructions to try maintain liveness consistency. 51 // FakeDef and FakeUse instructions to try maintain liveness consistency.
52 #define UnimplementedLoweringError(Target, Instr) \ 52 #define UnimplementedLoweringError(Target, Instr) \
53 do { \ 53 do { \
54 if ((Target)->Ctx->getFlags().getSkipUnimplemented()) { \ 54 if (getFlags().getSkipUnimplemented()) { \
55 (Target)->addFakeDefUses(Instr); \ 55 (Target)->addFakeDefUses(Instr); \
56 } else { \ 56 } else { \
57 /* Use llvm_unreachable instead of report_fatal_error, which gives \ 57 /* Use llvm_unreachable instead of report_fatal_error, which gives \
58 better stack traces. */ \ 58 better stack traces. */ \
59 llvm_unreachable( \ 59 llvm_unreachable( \
60 (std::string("Not yet implemented: ") + Instr->getInstName()) \ 60 (std::string("Not yet implemented: ") + Instr->getInstName()) \
61 .c_str()); \ 61 .c_str()); \
62 abort(); \ 62 abort(); \
63 } \ 63 } \
64 } while (0) 64 } while (0)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Each target must define a public static method: 174 // Each target must define a public static method:
175 // static void staticInit(GlobalContext *Ctx); 175 // static void staticInit(GlobalContext *Ctx);
176 static bool shouldBePooled(const class Constant *C); 176 static bool shouldBePooled(const class Constant *C);
177 177
178 static std::unique_ptr<TargetLowering> createLowering(TargetArch Target, 178 static std::unique_ptr<TargetLowering> createLowering(TargetArch Target,
179 Cfg *Func); 179 Cfg *Func);
180 180
181 virtual std::unique_ptr<Assembler> createAssembler() const = 0; 181 virtual std::unique_ptr<Assembler> createAssembler() const = 0;
182 182
183 void translate() { 183 void translate() {
184 switch (Ctx->getFlags().getOptLevel()) { 184 switch (getFlags().getOptLevel()) {
185 case Opt_m1: 185 case Opt_m1:
186 translateOm1(); 186 translateOm1();
187 break; 187 break;
188 case Opt_0: 188 case Opt_0:
189 translateO0(); 189 translateO0();
190 break; 190 break;
191 case Opt_1: 191 case Opt_1:
192 translateO1(); 192 translateO1();
193 break; 193 break;
194 case Opt_2: 194 case Opt_2:
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 virtual void lower() {} 617 virtual void lower() {}
618 618
619 protected: 619 protected:
620 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 620 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
621 GlobalContext *Ctx; 621 GlobalContext *Ctx;
622 }; 622 };
623 623
624 } // end of namespace Ice 624 } // end of namespace Ice
625 625
626 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 626 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW
« no previous file with comments | « src/IceRegAlloc.cpp ('k') | src/IceTargetLowering.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698