From cebabc07fba286988a6b7fdb32262f3dbd382e38 Mon Sep 17 00:00:00 2001 From: Ruiling Song Date: Fri, 8 Nov 2013 11:12:44 +0800 Subject: [PATCH] GBE: Remove max_limit for struct alignment a struct may have vector field (like int8/16), max_limit is meaningless. Signed-off-by: Ruiling Song Tested-by: Zhigang Gong --- backend/src/llvm/llvm_passes.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/backend/src/llvm/llvm_passes.cpp b/backend/src/llvm/llvm_passes.cpp index 60c9df1..6097f80 100644 --- a/backend/src/llvm/llvm_passes.cpp +++ b/backend/src/llvm/llvm_passes.cpp @@ -128,8 +128,6 @@ namespace gbe uint32_t getAlignmentByte(const ir::Unit &unit, Type* Ty) { - const uint32_t MAX_ALIGN = 8; //maximum size is 8 for doubles - switch (Ty->getTypeID()) { case Type::VoidTyID: NOT_SUPPORTED; case Type::VectorTyID: @@ -153,8 +151,6 @@ namespace gbe for(uint32_t subtype = 0; subtype < StrTy->getNumElements(); subtype++) { maxa = std::max(getAlignmentByte(unit, StrTy->getElementType(subtype)), maxa); - if(maxa==MAX_ALIGN) - return maxa; } return maxa; } -- 2.7.4