| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 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 // This file declares the TargetLoweringX8632 class, which | 10 // This file declares the TargetLoweringX8632 class, which |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 bool IsEbpBasedFrame; | 477 bool IsEbpBasedFrame; |
| 478 bool NeedsStackAlignment; | 478 bool NeedsStackAlignment; |
| 479 size_t FrameSizeLocals; | 479 size_t FrameSizeLocals; |
| 480 size_t SpillAreaSizeBytes; | 480 size_t SpillAreaSizeBytes; |
| 481 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; | 481 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; |
| 482 llvm::SmallBitVector ScratchRegs; | 482 llvm::SmallBitVector ScratchRegs; |
| 483 llvm::SmallBitVector RegsUsed; | 483 llvm::SmallBitVector RegsUsed; |
| 484 SizeT NextLabelNumber; | 484 SizeT NextLabelNumber; |
| 485 bool ComputedLiveRanges; | 485 bool ComputedLiveRanges; |
| 486 VarList PhysicalRegisters[IceType_NUM]; | 486 VarList PhysicalRegisters[IceType_NUM]; |
| 487 VarList FakeKilledScratchRegisters; |
| 487 static IceString RegNames[]; | 488 static IceString RegNames[]; |
| 488 | 489 |
| 489 private: | 490 private: |
| 490 ~TargetX8632() override {} | 491 ~TargetX8632() override {} |
| 492 // Ideally, this initialization would be done in the constructor, |
| 493 // but we need to defer it until after the initial CFG is built, |
| 494 // because some of the bitcode reader tests rely on the order that |
| 495 // Variables are created and their default printable names. |
| 496 void initFakeKilledScratchRegisters() { |
| 497 for (SizeT I = 0; I < ScratchRegs.size(); ++I) |
| 498 if (ScratchRegs[I]) |
| 499 FakeKilledScratchRegisters.push_back(getPhysicalRegister(I)); |
| 500 } |
| 491 template <typename T> void emitConstantPool() const; | 501 template <typename T> void emitConstantPool() const; |
| 492 }; | 502 }; |
| 493 | 503 |
| 494 class TargetGlobalInitX8632 : public TargetGlobalInitLowering { | 504 class TargetGlobalInitX8632 : public TargetGlobalInitLowering { |
| 495 TargetGlobalInitX8632(const TargetGlobalInitX8632 &) = delete; | 505 TargetGlobalInitX8632(const TargetGlobalInitX8632 &) = delete; |
| 496 TargetGlobalInitX8632 &operator=(const TargetGlobalInitX8632 &) = delete; | 506 TargetGlobalInitX8632 &operator=(const TargetGlobalInitX8632 &) = delete; |
| 497 | 507 |
| 498 public: | 508 public: |
| 499 static TargetGlobalInitLowering *create(GlobalContext *Ctx) { | 509 static TargetGlobalInitLowering *create(GlobalContext *Ctx) { |
| 500 return new TargetGlobalInitX8632(Ctx); | 510 return new TargetGlobalInitX8632(Ctx); |
| 501 } | 511 } |
| 502 | 512 |
| 503 virtual void lower(const VariableDeclaration &Var) final; | 513 virtual void lower(const VariableDeclaration &Var) final; |
| 504 | 514 |
| 505 protected: | 515 protected: |
| 506 TargetGlobalInitX8632(GlobalContext *Ctx); | 516 TargetGlobalInitX8632(GlobalContext *Ctx); |
| 507 | 517 |
| 508 private: | 518 private: |
| 509 ~TargetGlobalInitX8632() override {} | 519 ~TargetGlobalInitX8632() override {} |
| 510 }; | 520 }; |
| 511 | 521 |
| 512 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; | 522 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; |
| 513 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; | 523 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; |
| 514 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; | 524 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; |
| 515 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; | 525 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; |
| 516 | 526 |
| 517 } // end of namespace Ice | 527 } // end of namespace Ice |
| 518 | 528 |
| 519 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H | 529 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
| OLD | NEW |