From 21cfedee056a1e0789bbe6cafa23549d0ff16f24 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 16 May 2014 13:02:18 +0000 Subject: Revert "Implement global merge optimization for global variables." This reverts commit r208934. The patch depends on aliases to GEPs with non zero offsets. That is not supported and fairly broken. The good news is that GlobalAlias is being redesigned and will have support for offsets, so this patch should be a nice match for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208978 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64ISelLowering.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'lib/Target/AArch64/AArch64ISelLowering.cpp') diff --git a/lib/Target/AArch64/AArch64ISelLowering.cpp b/lib/Target/AArch64/AArch64ISelLowering.cpp index a676600e5d..852d324476 100644 --- a/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -5560,17 +5560,3 @@ unsigned AArch64TargetLowering::getMaximalGlobalOffset() const { return 4095; } -/// getGlobalMergeAlignment - Set alignment to be the max size of merged -/// global variable data structure, and make it aligned up to power of 2. -/// This way, we could guarantee the merged global variable data structure -/// doesn't cross page boundary, because usually OS always allocates page at -/// 4096-byte aligned boundary. -unsigned AArch64TargetLowering::getGlobalMergeAlignment( - StructType *MergedTy) const { - unsigned Align = getDataLayout()->getTypeAllocSize(MergedTy); - if (Align & (Align - 1)) - Align = llvm::NextPowerOf2(Align); - - return Align; -} - -- cgit v1.2.3