| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// | 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 // bit-manipulation problems below. | 949 // bit-manipulation problems below. |
| 950 AlignmentParam = std::max(AlignmentParam, 1u); | 950 AlignmentParam = std::max(AlignmentParam, 1u); |
| 951 | 951 |
| 952 // LLVM enforces power of 2 alignment. | 952 // LLVM enforces power of 2 alignment. |
| 953 assert(llvm::isPowerOf2_32(AlignmentParam)); | 953 assert(llvm::isPowerOf2_32(AlignmentParam)); |
| 954 assert(llvm::isPowerOf2_32(Traits::X86_STACK_ALIGNMENT_BYTES)); | 954 assert(llvm::isPowerOf2_32(Traits::X86_STACK_ALIGNMENT_BYTES)); |
| 955 | 955 |
| 956 uint32_t Alignment = | 956 uint32_t Alignment = |
| 957 std::max(AlignmentParam, Traits::X86_STACK_ALIGNMENT_BYTES); | 957 std::max(AlignmentParam, Traits::X86_STACK_ALIGNMENT_BYTES); |
| 958 if (Alignment > Traits::X86_STACK_ALIGNMENT_BYTES) { | 958 if (Alignment > Traits::X86_STACK_ALIGNMENT_BYTES) { |
| 959 IsEbpBasedFrame = true; |
| 959 _and(esp, Ctx->getConstantInt32(-Alignment)); | 960 _and(esp, Ctx->getConstantInt32(-Alignment)); |
| 960 } | 961 } |
| 961 if (const auto *ConstantTotalSize = | 962 if (const auto *ConstantTotalSize = |
| 962 llvm::dyn_cast<ConstantInteger32>(TotalSize)) { | 963 llvm::dyn_cast<ConstantInteger32>(TotalSize)) { |
| 963 uint32_t Value = ConstantTotalSize->getValue(); | 964 uint32_t Value = ConstantTotalSize->getValue(); |
| 964 Value = Utils::applyAlignment(Value, Alignment); | 965 Value = Utils::applyAlignment(Value, Alignment); |
| 965 if (Inst->getKnownFrameOffset()) { | 966 if (Inst->getKnownFrameOffset()) { |
| 966 _adjust_stack(Value); | 967 _adjust_stack(Value); |
| 967 FixedAllocaSizeBytes += Value; | 968 FixedAllocaSizeBytes += Value; |
| 968 } else { | 969 } else { |
| (...skipping 4888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5857 } | 5858 } |
| 5858 // the offset is not eligible for blinding or pooling, return the original | 5859 // the offset is not eligible for blinding or pooling, return the original |
| 5859 // mem operand | 5860 // mem operand |
| 5860 return MemOperand; | 5861 return MemOperand; |
| 5861 } | 5862 } |
| 5862 | 5863 |
| 5863 } // end of namespace X86Internal | 5864 } // end of namespace X86Internal |
| 5864 } // end of namespace Ice | 5865 } // end of namespace Ice |
| 5865 | 5866 |
| 5866 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 5867 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
| OLD | NEW |