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

Side by Side Diff: src/IceTargetLoweringMIPS32.h

Issue 1838753002: Subzero: Remove IceString. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes 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/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringMIPS32.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/IceTargetLoweringMIPS32.h - MIPS32 lowering ---*- C++-*-===// 1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 lowering ---*- 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 16 matching lines...) Expand all
27 27
28 class TargetMIPS32 : public TargetLowering { 28 class TargetMIPS32 : public TargetLowering {
29 TargetMIPS32() = delete; 29 TargetMIPS32() = delete;
30 TargetMIPS32(const TargetMIPS32 &) = delete; 30 TargetMIPS32(const TargetMIPS32 &) = delete;
31 TargetMIPS32 &operator=(const TargetMIPS32 &) = delete; 31 TargetMIPS32 &operator=(const TargetMIPS32 &) = delete;
32 32
33 public: 33 public:
34 ~TargetMIPS32() override = default; 34 ~TargetMIPS32() override = default;
35 35
36 static void staticInit(GlobalContext *Ctx); 36 static void staticInit(GlobalContext *Ctx);
37 static bool shouldBePooled(const Constant *C) {
38 (void)C;
39 return false;
40 }
37 static std::unique_ptr<::Ice::TargetLowering> create(Cfg *Func) { 41 static std::unique_ptr<::Ice::TargetLowering> create(Cfg *Func) {
38 return makeUnique<TargetMIPS32>(Func); 42 return makeUnique<TargetMIPS32>(Func);
39 } 43 }
40 44
41 std::unique_ptr<::Ice::Assembler> createAssembler() const override { 45 std::unique_ptr<::Ice::Assembler> createAssembler() const override {
42 return makeUnique<MIPS32::AssemblerMIPS32>(); 46 return makeUnique<MIPS32::AssemblerMIPS32>();
43 } 47 }
44 48
45 void translateOm1() override; 49 void translateOm1() override;
46 void translateO2() override; 50 void translateO2() override;
47 bool doBranchOpt(Inst *Instr, const CfgNode *NextNode) override; 51 bool doBranchOpt(Inst *Instr, const CfgNode *NextNode) override;
48 52
49 SizeT getNumRegisters() const override { return RegMIPS32::Reg_NUM; } 53 SizeT getNumRegisters() const override { return RegMIPS32::Reg_NUM; }
50 Variable *getPhysicalRegister(RegNumT RegNum, 54 Variable *getPhysicalRegister(RegNumT RegNum,
51 Type Ty = IceType_void) override; 55 Type Ty = IceType_void) override;
52 IceString getRegName(RegNumT RegNum, Type Ty) const override; 56 const char *getRegName(RegNumT RegNum, Type Ty) const override;
53 SmallBitVector getRegisterSet(RegSetMask Include, 57 SmallBitVector getRegisterSet(RegSetMask Include,
54 RegSetMask Exclude) const override; 58 RegSetMask Exclude) const override;
55 const SmallBitVector & 59 const SmallBitVector &
56 getRegistersForVariable(const Variable *Var) const override { 60 getRegistersForVariable(const Variable *Var) const override {
57 RegClass RC = Var->getRegClass(); 61 RegClass RC = Var->getRegClass();
58 assert(RC < RC_Target); 62 assert(RC < RC_Target);
59 return TypeToRegisterSet[RC]; 63 return TypeToRegisterSet[RC];
60 } 64 }
61 const SmallBitVector & 65 const SmallBitVector &
62 getAllRegistersForVariable(const Variable *Var) const override { 66 getAllRegistersForVariable(const Variable *Var) const override {
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 TargetDataMIPS32() = delete; 332 TargetDataMIPS32() = delete;
329 TargetDataMIPS32(const TargetDataMIPS32 &) = delete; 333 TargetDataMIPS32(const TargetDataMIPS32 &) = delete;
330 TargetDataMIPS32 &operator=(const TargetDataMIPS32 &) = delete; 334 TargetDataMIPS32 &operator=(const TargetDataMIPS32 &) = delete;
331 335
332 public: 336 public:
333 static std::unique_ptr<TargetDataLowering> create(GlobalContext *Ctx) { 337 static std::unique_ptr<TargetDataLowering> create(GlobalContext *Ctx) {
334 return std::unique_ptr<TargetDataLowering>(new TargetDataMIPS32(Ctx)); 338 return std::unique_ptr<TargetDataLowering>(new TargetDataMIPS32(Ctx));
335 } 339 }
336 340
337 void lowerGlobals(const VariableDeclarationList &Vars, 341 void lowerGlobals(const VariableDeclarationList &Vars,
338 const IceString &SectionSuffix) override; 342 const std::string &SectionSuffix) override;
339 void lowerConstants() override; 343 void lowerConstants() override;
340 void lowerJumpTables() override; 344 void lowerJumpTables() override;
341 345
342 protected: 346 protected:
343 explicit TargetDataMIPS32(GlobalContext *Ctx); 347 explicit TargetDataMIPS32(GlobalContext *Ctx);
344 348
345 private: 349 private:
346 ~TargetDataMIPS32() override = default; 350 ~TargetDataMIPS32() override = default;
347 template <typename T> static void emitConstantPool(GlobalContext *Ctx); 351 template <typename T> static void emitConstantPool(GlobalContext *Ctx);
348 }; 352 };
(...skipping 14 matching lines...) Expand all
363 explicit TargetHeaderMIPS32(GlobalContext *Ctx); 367 explicit TargetHeaderMIPS32(GlobalContext *Ctx);
364 368
365 private: 369 private:
366 ~TargetHeaderMIPS32() = default; 370 ~TargetHeaderMIPS32() = default;
367 }; 371 };
368 372
369 } // end of namespace MIPS32 373 } // end of namespace MIPS32
370 } // end of namespace Ice 374 } // end of namespace Ice
371 375
372 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H 376 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringARM32.cpp ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698