| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 lowering ----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringARM32.h - ARM32 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 TargetLoweringARM32 class, which implements the | 10 // This file declares the TargetLoweringARM32 class, which implements the |
| 11 // TargetLowering interface for the ARM 32-bit architecture. | 11 // TargetLowering interface for the ARM 32-bit architecture. |
| 12 // | 12 // |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #ifndef SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 15 #ifndef SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
| 16 #define SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 16 #define SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
| 17 | 17 |
| 18 #include "IceDefs.h" | 18 #include "IceDefs.h" |
| 19 #include "IceInstARM32.h" |
| 19 #include "IceRegistersARM32.h" | 20 #include "IceRegistersARM32.h" |
| 20 #include "IceTargetLowering.h" | 21 #include "IceTargetLowering.h" |
| 21 | 22 |
| 22 namespace Ice { | 23 namespace Ice { |
| 23 | 24 |
| 24 class TargetARM32 : public TargetLowering { | 25 class TargetARM32 : public TargetLowering { |
| 25 TargetARM32() = delete; | 26 TargetARM32() = delete; |
| 26 TargetARM32(const TargetARM32 &) = delete; | 27 TargetARM32(const TargetARM32 &) = delete; |
| 27 TargetARM32 &operator=(const TargetARM32 &) = delete; | 28 TargetARM32 &operator=(const TargetARM32 &) = delete; |
| 28 | 29 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 const AssignList &Assignments) override; | 85 const AssignList &Assignments) override; |
| 85 void doAddressOptLoad() override; | 86 void doAddressOptLoad() override; |
| 86 void doAddressOptStore() override; | 87 void doAddressOptStore() override; |
| 87 void randomlyInsertNop(float Probability) override; | 88 void randomlyInsertNop(float Probability) override; |
| 88 void makeRandomRegisterPermutation( | 89 void makeRandomRegisterPermutation( |
| 89 llvm::SmallVectorImpl<int32_t> &Permutation, | 90 llvm::SmallVectorImpl<int32_t> &Permutation, |
| 90 const llvm::SmallBitVector &ExcludeRegisters) const override; | 91 const llvm::SmallBitVector &ExcludeRegisters) const override; |
| 91 | 92 |
| 92 static Type stackSlotType(); | 93 static Type stackSlotType(); |
| 93 | 94 |
| 95 // The following are helpers that insert lowered ARM32 instructions |
| 96 // with minimal syntactic overhead, so that the lowering code can |
| 97 // look as close to assembly as practical. |
| 98 |
| 99 void _ret(Variable *LR, Variable *Src0 = nullptr) { |
| 100 Context.insert(InstARM32Ret::create(Func, LR, Src0)); |
| 101 } |
| 102 |
| 94 bool UsesFramePointer; | 103 bool UsesFramePointer; |
| 95 bool NeedsStackAlignment; | 104 bool NeedsStackAlignment; |
| 96 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; | 105 llvm::SmallBitVector TypeToRegisterSet[IceType_NUM]; |
| 97 llvm::SmallBitVector ScratchRegs; | 106 llvm::SmallBitVector ScratchRegs; |
| 98 llvm::SmallBitVector RegsUsed; | 107 llvm::SmallBitVector RegsUsed; |
| 99 VarList PhysicalRegisters[IceType_NUM]; | 108 VarList PhysicalRegisters[IceType_NUM]; |
| 100 static IceString RegNames[]; | 109 static IceString RegNames[]; |
| 101 | 110 |
| 102 private: | 111 private: |
| 103 ~TargetARM32() override {} | 112 ~TargetARM32() override {} |
| (...skipping 17 matching lines...) Expand all Loading... |
| 121 | 130 |
| 122 private: | 131 private: |
| 123 void lowerGlobal(const VariableDeclaration &Var) const; | 132 void lowerGlobal(const VariableDeclaration &Var) const; |
| 124 ~TargetDataARM32() override {} | 133 ~TargetDataARM32() override {} |
| 125 template <typename T> static void emitConstantPool(GlobalContext *Ctx); | 134 template <typename T> static void emitConstantPool(GlobalContext *Ctx); |
| 126 }; | 135 }; |
| 127 | 136 |
| 128 } // end of namespace Ice | 137 } // end of namespace Ice |
| 129 | 138 |
| 130 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 139 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
| OLD | NEW |