| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void lowerIcmp(const InstIcmp *Inst) override; | 98 void lowerIcmp(const InstIcmp *Inst) override; |
| 99 void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override; | 99 void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override; |
| 100 void lowerInsertElement(const InstInsertElement *Inst) override; | 100 void lowerInsertElement(const InstInsertElement *Inst) override; |
| 101 void lowerLoad(const InstLoad *Inst) override; | 101 void lowerLoad(const InstLoad *Inst) override; |
| 102 void lowerPhi(const InstPhi *Inst) override; | 102 void lowerPhi(const InstPhi *Inst) override; |
| 103 void lowerRet(const InstRet *Inst) override; | 103 void lowerRet(const InstRet *Inst) override; |
| 104 void lowerSelect(const InstSelect *Inst) override; | 104 void lowerSelect(const InstSelect *Inst) override; |
| 105 void lowerStore(const InstStore *Inst) override; | 105 void lowerStore(const InstStore *Inst) override; |
| 106 void lowerSwitch(const InstSwitch *Inst) override; | 106 void lowerSwitch(const InstSwitch *Inst) override; |
| 107 void lowerUnreachable(const InstUnreachable *Inst) override; | 107 void lowerUnreachable(const InstUnreachable *Inst) override; |
| 108 void prelowerPhis() override; |
| 109 void lowerPhiAssignments(CfgNode *Node, |
| 110 const AssignList &Assignments) override; |
| 108 void doAddressOptLoad() override; | 111 void doAddressOptLoad() override; |
| 109 void doAddressOptStore() override; | 112 void doAddressOptStore() override; |
| 110 void randomlyInsertNop(float Probability) override; | 113 void randomlyInsertNop(float Probability) override; |
| 111 | 114 |
| 112 // Naive lowering of cmpxchg. | 115 // Naive lowering of cmpxchg. |
| 113 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, | 116 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, |
| 114 Operand *Desired); | 117 Operand *Desired); |
| 115 // Attempt a more optimized lowering of cmpxchg. Returns true if optimized. | 118 // Attempt a more optimized lowering of cmpxchg. Returns true if optimized. |
| 116 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr, | 119 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr, |
| 117 Operand *Expected, Operand *Desired); | 120 Operand *Expected, Operand *Desired); |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 const X86InstructionSet InstructionSet; | 478 const X86InstructionSet InstructionSet; |
| 476 bool IsEbpBasedFrame; | 479 bool IsEbpBasedFrame; |
| 477 bool NeedsStackAlignment; | 480 bool NeedsStackAlignment; |
| 478 size_t FrameSizeLocals; | 481 size_t FrameSizeLocals; |
| 479 size_t SpillAreaSizeBytes; | 482 size_t SpillAreaSizeBytes; |
| 480 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; | 483 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; |
| 481 llvm::SmallBitVector ScratchRegs; | 484 llvm::SmallBitVector ScratchRegs; |
| 482 llvm::SmallBitVector RegsUsed; | 485 llvm::SmallBitVector RegsUsed; |
| 483 SizeT NextLabelNumber; | 486 SizeT NextLabelNumber; |
| 484 bool ComputedLiveRanges; | 487 bool ComputedLiveRanges; |
| 485 VarList PhysicalRegisters; | 488 VarList PhysicalRegisters[IceType_NUM]; |
| 486 static IceString RegNames[]; | 489 static IceString RegNames[]; |
| 487 | 490 |
| 488 private: | 491 private: |
| 489 ~TargetX8632() override {} | 492 ~TargetX8632() override {} |
| 490 template <typename T> void emitConstantPool() const; | 493 template <typename T> void emitConstantPool() const; |
| 491 }; | 494 }; |
| 492 | 495 |
| 493 class TargetGlobalInitX8632 : public TargetGlobalInitLowering { | 496 class TargetGlobalInitX8632 : public TargetGlobalInitLowering { |
| 494 TargetGlobalInitX8632(const TargetGlobalInitX8632 &) = delete; | 497 TargetGlobalInitX8632(const TargetGlobalInitX8632 &) = delete; |
| 495 TargetGlobalInitX8632 &operator=(const TargetGlobalInitX8632 &) = delete; | 498 TargetGlobalInitX8632 &operator=(const TargetGlobalInitX8632 &) = delete; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 509 }; | 512 }; |
| 510 | 513 |
| 511 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; | 514 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; |
| 512 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; | 515 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; |
| 513 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; | 516 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; |
| 514 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; | 517 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; |
| 515 | 518 |
| 516 } // end of namespace Ice | 519 } // end of namespace Ice |
| 517 | 520 |
| 518 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H | 521 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
| OLD | NEW |