| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 lowering ----*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringX86Base.h - x86 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 void lowerPhi(const InstPhi *Inst) override; | 173 void lowerPhi(const InstPhi *Inst) override; |
| 174 void lowerSelect(const InstSelect *Inst) override; | 174 void lowerSelect(const InstSelect *Inst) override; |
| 175 void lowerStore(const InstStore *Inst) override; | 175 void lowerStore(const InstStore *Inst) override; |
| 176 void lowerSwitch(const InstSwitch *Inst) override; | 176 void lowerSwitch(const InstSwitch *Inst) override; |
| 177 void lowerUnreachable(const InstUnreachable *Inst) override; | 177 void lowerUnreachable(const InstUnreachable *Inst) override; |
| 178 void lowerOther(const Inst *Instr) override; | 178 void lowerOther(const Inst *Instr) override; |
| 179 void lowerRMW(const typename Traits::Insts::FakeRMW *RMW); | 179 void lowerRMW(const typename Traits::Insts::FakeRMW *RMW); |
| 180 void prelowerPhis() override; | 180 void prelowerPhis() override; |
| 181 void doAddressOptLoad() override; | 181 void doAddressOptLoad() override; |
| 182 void doAddressOptStore() override; | 182 void doAddressOptStore() override; |
| 183 void randomlyInsertNop(float Probability) override; | 183 void randomlyInsertNop(float Probability, |
| 184 RandomNumberGenerator &RNG) override; |
| 184 | 185 |
| 185 /// Naive lowering of cmpxchg. | 186 /// Naive lowering of cmpxchg. |
| 186 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, | 187 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, |
| 187 Operand *Desired); | 188 Operand *Desired); |
| 188 /// Attempt a more optimized lowering of cmpxchg. Returns true if optimized. | 189 /// Attempt a more optimized lowering of cmpxchg. Returns true if optimized. |
| 189 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr, | 190 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr, |
| 190 Operand *Expected, Operand *Desired); | 191 Operand *Expected, Operand *Desired); |
| 191 void lowerAtomicRMW(Variable *Dest, uint32_t Operation, Operand *Ptr, | 192 void lowerAtomicRMW(Variable *Dest, uint32_t Operation, Operand *Ptr, |
| 192 Operand *Val); | 193 Operand *Val); |
| 193 void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal, | 194 void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 Variable *makeVectorOfHighOrderBits(Type Ty, | 284 Variable *makeVectorOfHighOrderBits(Type Ty, |
| 284 int32_t RegNum = Variable::NoRegister); | 285 int32_t RegNum = Variable::NoRegister); |
| 285 Variable *makeVectorOfFabsMask(Type Ty, | 286 Variable *makeVectorOfFabsMask(Type Ty, |
| 286 int32_t RegNum = Variable::NoRegister); | 287 int32_t RegNum = Variable::NoRegister); |
| 287 /// @} | 288 /// @} |
| 288 | 289 |
| 289 /// Return a memory operand corresponding to a stack allocated Variable. | 290 /// Return a memory operand corresponding to a stack allocated Variable. |
| 290 typename Traits::X86OperandMem * | 291 typename Traits::X86OperandMem * |
| 291 getMemoryOperandForStackSlot(Type Ty, Variable *Slot, uint32_t Offset = 0); | 292 getMemoryOperandForStackSlot(Type Ty, Variable *Slot, uint32_t Offset = 0); |
| 292 | 293 |
| 293 void makeRandomRegisterPermutation( | 294 void |
| 294 llvm::SmallVectorImpl<int32_t> &Permutation, | 295 makeRandomRegisterPermutation(llvm::SmallVectorImpl<int32_t> &Permutation, |
| 295 const llvm::SmallBitVector &ExcludeRegisters) const override; | 296 const llvm::SmallBitVector &ExcludeRegisters, |
| 297 uint64_t Salt) const override; |
| 296 | 298 |
| 297 /// The following are helpers that insert lowered x86 instructions | 299 /// The following are helpers that insert lowered x86 instructions |
| 298 /// with minimal syntactic overhead, so that the lowering code can | 300 /// with minimal syntactic overhead, so that the lowering code can |
| 299 /// look as close to assembly as practical. | 301 /// look as close to assembly as practical. |
| 300 void _adc(Variable *Dest, Operand *Src0) { | 302 void _adc(Variable *Dest, Operand *Src0) { |
| 301 Context.insert(Traits::Insts::Adc::create(Func, Dest, Src0)); | 303 Context.insert(Traits::Insts::Adc::create(Func, Dest, Src0)); |
| 302 } | 304 } |
| 303 void _adc_rmw(typename Traits::X86OperandMem *DestSrc0, Operand *Src1) { | 305 void _adc_rmw(typename Traits::X86OperandMem *DestSrc0, Operand *Src1) { |
| 304 Context.insert(Traits::Insts::AdcRMW::create(Func, DestSrc0, Src1)); | 306 Context.insert(Traits::Insts::AdcRMW::create(Func, DestSrc0, Src1)); |
| 305 } | 307 } |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 } | 717 } |
| 716 | 718 |
| 717 BoolFolding FoldingInfo; | 719 BoolFolding FoldingInfo; |
| 718 }; | 720 }; |
| 719 } // end of namespace X86Internal | 721 } // end of namespace X86Internal |
| 720 } // end of namespace Ice | 722 } // end of namespace Ice |
| 721 | 723 |
| 722 #include "IceTargetLoweringX86BaseImpl.h" | 724 #include "IceTargetLoweringX86BaseImpl.h" |
| 723 | 725 |
| 724 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H | 726 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASE_H |
| OLD | NEW |