| 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 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); | 123 Variable *makeVectorOfZeros(Type Ty, int32_t RegNum = Variable::NoRegister); |
| 124 | 124 |
| 125 void makeRandomRegisterPermutation( | 125 void makeRandomRegisterPermutation( |
| 126 llvm::SmallVectorImpl<int32_t> &Permutation, | 126 llvm::SmallVectorImpl<int32_t> &Permutation, |
| 127 const llvm::SmallBitVector &ExcludeRegisters) const override; | 127 const llvm::SmallBitVector &ExcludeRegisters) const override; |
| 128 | 128 |
| 129 // The following are helpers that insert lowered ARM32 instructions | 129 // The following are helpers that insert lowered ARM32 instructions |
| 130 // with minimal syntactic overhead, so that the lowering code can | 130 // with minimal syntactic overhead, so that the lowering code can |
| 131 // look as close to assembly as practical. | 131 // look as close to assembly as practical. |
| 132 | 132 |
| 133 void _add(Variable *Dest, Variable *Src0, Operand *Src1) { |
| 134 Context.insert(InstARM32Add::create(Func, Dest, Src0, Src1)); |
| 135 } |
| 133 void _ldr(Variable *Dest, OperandARM32Mem *Addr) { | 136 void _ldr(Variable *Dest, OperandARM32Mem *Addr) { |
| 134 Context.insert(InstARM32Ldr::create(Func, Dest, Addr)); | 137 Context.insert(InstARM32Ldr::create(Func, Dest, Addr)); |
| 135 } | 138 } |
| 136 // If Dest=nullptr is passed in, then a new variable is created, | 139 // If Dest=nullptr is passed in, then a new variable is created, |
| 137 // marked as infinite register allocation weight, and returned | 140 // marked as infinite register allocation weight, and returned |
| 138 // through the in/out Dest argument. | 141 // through the in/out Dest argument. |
| 139 void _mov(Variable *&Dest, Operand *Src0, | 142 void _mov(Variable *&Dest, Operand *Src0, |
| 140 int32_t RegNum = Variable::NoRegister) { | 143 int32_t RegNum = Variable::NoRegister) { |
| 141 if (Dest == nullptr) | 144 if (Dest == nullptr) |
| 142 Dest = makeReg(Src0->getType(), RegNum); | 145 Dest = makeReg(Src0->getType(), RegNum); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 190 |
| 188 private: | 191 private: |
| 189 void lowerGlobal(const VariableDeclaration &Var) const; | 192 void lowerGlobal(const VariableDeclaration &Var) const; |
| 190 ~TargetDataARM32() override {} | 193 ~TargetDataARM32() override {} |
| 191 template <typename T> static void emitConstantPool(GlobalContext *Ctx); | 194 template <typename T> static void emitConstantPool(GlobalContext *Ctx); |
| 192 }; | 195 }; |
| 193 | 196 |
| 194 } // end of namespace Ice | 197 } // end of namespace Ice |
| 195 | 198 |
| 196 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H | 199 #endif // SUBZERO_SRC_ICETARGETLOWERINGARM32_H |
| OLD | NEW |